Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Strong success criteria let you loop independently. Weak criteria ("make it work

- **ТЗ и архитектура (бывший AGENTS.md):** `docs/spec.md:1` — стек, структура монорепо, описание каждого микросервиса, FFmpeg-параметры, кодстайл, коммит-конвенции.
- **Сервисы и пайплайн (на русском):** `docs/services-pipeline.md:1` — зачем каждый сервис (gateway/auth/metadata/upload/transcoder/nginx-vod/frontend) и полный пайплайн `upload → RabbitMQ → transcode → MinIO → HLS` с диаграммой и сценариями отладки.
- **План по фазам:** `docs/PLAN.md:1` — 8 фаз, граф зависимостей, DDL `deploy/postgres/init.sql:1`, контракты событий `video.uploaded`/`video.transcoded`.
- **Тикеты и роадмап:** только в GitHub project — в репо файлов с фазами/тикетами нет, не создавай их.
- **Swagger / Zed:** `docs/SWAGGER.md:1`, `docs/ZED.md:1` — генерация OpenAPI для Go, настройки IDE.

### Стек и структура (кратко)
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Strong success criteria let you loop independently. Weak criteria ("make it work

- **ТЗ и архитектура (бывший AGENTS.md):** `docs/spec.md:1` — стек, структура монорепо, описание каждого микросервиса, FFmpeg-параметры, кодстайл, коммит-конвенции.
- **Сервисы и пайплайн (на русском):** `docs/services-pipeline.md:1` — зачем каждый сервис (gateway/auth/metadata/upload/transcoder/nginx-vod/frontend) и полный пайплайн `upload → RabbitMQ → transcode → MinIO → HLS` с диаграммой и сценариями отладки.
- **План по фазам:** `docs/PLAN.md:1` — 8 фаз, граф зависимостей, DDL `deploy/postgres/init.sql:1`, контракты событий `video.uploaded`/`video.transcoded`.
- **Тикеты и роадмап:** только в GitHub project — в репо файлов с фазами/тикетами нет, не создавай их.
- **Swagger / Zed:** `docs/SWAGGER.md:1`, `docs/ZED.md:1` — генерация OpenAPI для Go, настройки IDE.

### Стек и структура (кратко)
Expand Down
17 changes: 3 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
└─► PATCH /internal/videos/:id/status (X-Internal-Token) → metadata
```

> Full breakdown: [`docs/services-pipeline.md`](docs/services-pipeline.md) (services & pipeline, RU) · Spec: [`docs/spec.md`](docs/spec.md) · Plan: [`docs/PLAN.md`](docs/PLAN.md) (Phases 9-11 DONE, 12 in progress)
> Full breakdown: [`docs/services-pipeline.md`](docs/services-pipeline.md) (services & pipeline, RU) · Spec: [`docs/spec.md`](docs/spec.md)

## 🧩 Tech Stack

Expand Down Expand Up @@ -64,7 +64,7 @@
│ ├── migrations/000001_init.up.sql # golang-migrate source of truth
│ ├── postgres/init.sql # legacy fallback
│ └── nginx/{nginx.conf,nginx.prod.conf,Dockerfile} # envsubst INTERNAL_TOKEN
├── docs/ # spec.md, services-pipeline.md, PLAN.md (Phases 9-11 DONE), ZED.md, SWAGGER.md
├── docs/ # spec.md, services-pipeline.md, ZED.md, SWAGGER.md
├── scripts/e2e.sh # upload → poll ready → master.m3u8 → ffprobe aligned segments → gateway HLS
└── Makefile # migrate-up/down/create, lint/test, e2e, swagger
```
Expand Down Expand Up @@ -116,18 +116,7 @@ Zed IDE auto-fix on save — see [`.zed/settings.json`](.zed/settings.json) and

## 🗺 Roadmap

- [x] Phase 0–1 — infra & DB schema (`deploy/migrations/000001_init.up.sql` golang-migrate, `init.sql` legacy)
- [x] Phase 2 — Auth + Metadata (chi + FastAPI, JWT HS256/Argon2, `owner_email` JOIN)
- [x] Phase 3 — Upload (multipart `MaxBytesReader 5GB` → MinIO raw + `video.uploaded`, `video/*` allowlist)
- [x] Phase 4 — Transcoder (pika + FFmpeg, aligned GOP `-g fps*2 -force_key_frames`, shared `audio.m4a`, `heartbeat 600`)
- [x] Phase 5 — Streaming nginx-vod JIT (`vod_mode mapped`, 3 MP4 → HLS, `vod_segment_duration 2000`, `INTERNAL_TOKEN` envsubst)
- [x] Phase 6 — Gateway (reverse proxy, CORS, rate-limit, JWT, `InternalAuth` proxy, `MaxBytesReader`)
- [x] Phase 7 — Frontend (Next 14, `hls.js` `maxBufferLength 4` seamless, `/watch/[id]` + `playbackRate` + owner badge + delete)
- [x] Phase 8 — Integration & hardening (`scripts/e2e.sh` + `healthcheck` + `docker-compose.prod.yml` CDN)
- [x] Phase 9 — Security & Upload streaming (P0) — `INTERNAL_TOKEN`, `MaxBytesReader 5GB`, `private` raw, `DELETE` + S3 cleanup
- [x] Phase 10 — Transcoder limits & reliability (P0) — sequential, `threads 2` `veryfast`, `fps` preserve, `heartbeat 600`, `4G` limits
- [ ] Phase 10b — Queue DLX/retries & idempotency → Phase 11 presigned multipart → Phase 12 adaptive ladder/HW accel (fan-out, NVENC)
- See [`docs/PLAN.md`](docs/PLAN.md) — 15 phases, event contracts `video.uploaded` / `video.transcoded`
Roadmap and tickets are tracked in the GitHub project.

## 🤝 Contributing

Expand Down
2 changes: 1 addition & 1 deletion deploy/migrations/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ Single source of truth — `deploy/migrations/*.sql` (golang-migrate).
- Apply: `make migrate-up` (local) or `migrate` service in `deploy/docker-compose.yml` (auto on `make up`).
- Auth's `services/auth/migrations` (alembic) is kept for Python autogen, but **not used in prod** — prod uses this directory. If you add a column via SQLAlchemy, generate alembic version then port SQL to a new `deploy/migrations/00000N_*.up.sql`.

See `Makefile: migrate-*` and `docs/PLAN.md: Фаза 9`.
See `Makefile: migrate-*`.
Loading
Loading