Some checks failed
build-images / web (push) Has been cancelled
vision2026-ci / Python SDK resource tests (push) Has been cancelled
build-images / api (push) Has been cancelled
build-images / worker-gpu (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (comfy-workflow-schema) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (effects-core) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (eventbus-types) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (growth-analytics) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (provider-adapter-kit) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (publishing-connectors) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (render-core) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (shot-template-schema) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (trends-schema) (push) Has been cancelled
vision2026-ci / Desktop engine crates (test + clippy + fmt) (push) Has been cancelled
codeql / Analyze (javascript-typescript) (push) Has been cancelled
codeql / Analyze (python) (push) Has been cancelled
perf / API hot-path micro-smoke (budgeted) (push) Has been cancelled
perf / Desktop engine crates (release build check) (push) Has been cancelled
vision2026-ci / API phase modules (ruff + pytest) (push) Has been cancelled
vision2026-ci / Alembic upgrade + drift check (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (caption-engine) (push) Has been cancelled
Paid, hosted product at menivor.com, now retired as a company project. Fresh squashed history of the cleaned working tree (secret-scanned, no .env, no customer data, no outreach logs). Built on MoneyPrinterTurbo (MIT, harry0703) — see NOTICE.
91 lines
13 KiB
Markdown
91 lines
13 KiB
Markdown
# ReelForge Vision 2026 — Blueprint Index
|
||
|
||
> **What this is.** The single consolidated entry point to the Vision-2026 architecture blueprint. The per-directory docs under `architecture/` each specify — with real repo paths and one-line responsibilities — the **additive** work needed to grow ReelForge from "wallet + catalog + routing + compose + B-roll" into a full **creation × clipfarm × publishing × growth** platform with a resellable multi-model wallet. Everything is additive: the already-shipped baseline (microdollar wallet ledger, catalog + price_versions, OpenRouter-style routing, Fernet BYOK, FFmpeg compose pipeline, URL→reel, repurposing, MCP server, EDL editor, publishing/insights stubs, SDKs) is assumed to exist and is treated as a stable integration seam, never rebuilt.
|
||
|
||
> **File counts** below are the number of **file-manifest rows** (table rows headed `Path | …` / `File | …`) across each architecture doc — i.e. the count of distinct planned files each doc specifies. They are a lower bound on real work (prose-only files and DB-table rows are excluded).
|
||
|
||
---
|
||
|
||
## 1. Architecture documents
|
||
|
||
All docs live under `/Users/arhansubasi/videogen/docs/reelforge/vision2026/architecture/`.
|
||
|
||
| Doc | Covers | Target directory | Planned files |
|
||
|---|---|---|---|
|
||
| `apps-api.md` | New FastAPI/Celery/SQLAlchemy domains, services, workers, ORM models: templates, publishing, routing/providers (22 adapters), characters, storyboard, film, series, trends, gateway, clipmarket, growth, moderation, presets, assets; async-GPU render envelope; event/outbox bus. | `apps/api` | 312 |
|
||
| `apps-web.md` | Next.js app-router feature surfaces mirroring mobile: templates picker, review/hook-gate, publishing composer, scheduler, experiments, retention viewer, wallet/gateway, marketplace, clipfarm console, film/series, studio hub; typed resource clients. | `apps/web` | 455 |
|
||
| `apps-mobile.md` | Expo app: `shared/{ui,net,api,telemetry,push,cache}` foundation, 24 typed Zod resource clients, and `features/*` (onboarding, templates, review, publishing, scheduler, experiments, retention, wallet, captions, film, series, clipfarm, trends, repurpose, marketplace, affiliate, plans, notifications). | `apps/mobile` | 376 |
|
||
| `apps-desktop.md` | Tauri/Rust desktop: internal Cargo workspace `crates/rf-*` (jobs, render, encode, comfy, capture, assets, project, clipfarm, sync, hardware, ffmpeg, devproto, plugins, testkit) = local $0-wallet render farm + ComfyUI bridge + bulk operator console; GUI glue; packaging. | `apps/desktop` | 274 |
|
||
| `packages.md` | Shared `packages/{api-contract, sdk-python, sdk-typescript}`: OpenAPI/contract source of truth, codegen, typed clients, contract-check across surfaces. | `packages` | 300 |
|
||
| `external.md` | Vendored OSS under `external/`: worker images (`workers/*`), provider/service refs (`services/*`, `gateway-refs`, `film-blueprints`, `timeline`, `render`, `ingest`, `story-bots`), `_contract` shim, `_meta` pins/licenses/SBOM. | `external` | 95 |
|
||
| `infra-docs.md` | New top-level `infra/` (terraform, k8s/helm, render-workers, gpu-autoscale, queues, observability, deploy, secrets, cdn, dns, policy) + `.github/` CI/CD/security/release automation + a minimal `docs/` skeleton for infra. | `docs` + `infra` | 310 |
|
||
| `docs.md` | Full `docs/` information architecture: specs, references, runbooks, ADRs, onboarding, CODEMAPS, contributor docs — for builders, operators, creators, and contributors. Supersedes the infra-docs skeleton for docs structure. | `docs` + `infra` | 400 |
|
||
| `media-gateway.md` | **Cross-cutting feature (SHIPPED):** the OpenRouter-style unified media gateway — one key + one balance → any image/video/audio model, with real provider adapters, success-only wallet billing, and clients across API + web + mobile + SDKs + desktop + infra observability. | all layers | (shipped) |
|
||
|
||
**Grand total planned files: 2522.**
|
||
|
||
---
|
||
|
||
## 2. Seven-directory coverage map
|
||
|
||
Every top-level directory of the monorepo has a governing blueprint. `docs` and `infra` are co-owned by two docs (`infra-docs.md` owns infra content + a docs skeleton; `docs.md` owns the full docs IA), so they are combined into one bucket.
|
||
|
||
| # | Directory | Governing doc(s) | Planned files | What lands here |
|
||
|---|---|---|---|---|
|
||
| 1 | `apps/api` | `apps-api.md` | 312 | Backend source of truth: new domains, services, workers, ORM models, async-GPU envelope, event bus. |
|
||
| 2 | `apps/web` | `apps-web.md` | 455 | Next.js app-router creator/operator UI + typed API clients. |
|
||
| 3 | `apps/mobile` | `apps-mobile.md` | 376 | Expo capture→review→publish→measure app + shared design system + 24 Zod clients. |
|
||
| 4 | `apps/desktop` | `apps-desktop.md` | 274 | Tauri/Rust `rf-*` engine crates: local render farm, ComfyUI bridge, clipfarm console. |
|
||
| 5 | `packages` | `packages.md` | 300 | `api-contract` + Python/TypeScript SDKs; contract-check plumbing. |
|
||
| 6 | `external` | `external.md` | 95 | Vendored OSS worker images, service refs, blueprints, `_contract`/`_meta`. |
|
||
| 7 | `docs` + `infra` | `infra-docs.md` + `docs.md` | 710 | Cross-cutting infra planes, `.github/` automation, and the full documentation IA. |
|
||
| | **Total** | **8 docs** | **2522** | |
|
||
|
||
> Bucket 7: `infra-docs.md` (310) and `docs.md` (400) overlap slightly on a handful of `docs/` paths (runbooks, ADRs). `docs.md` is authoritative for docs *structure*; `infra-docs.md` for the *infra content* inside those folders. 710 is the raw sum; de-duplicated real-file count is marginally lower.
|
||
|
||
---
|
||
|
||
## 3. OSS clone checklist
|
||
|
||
Before building any new capability, consult the vetted upstream-adoption plan:
|
||
|
||
- **`/Users/arhansubasi/videogen/docs/reelforge/vision2026/OSS_CLONE_CHECKLIST.md`**
|
||
|
||
It lists ~55 open-source repositories (verified live against the GitHub API on 2026-08-18) to clone into `external/`, each with: recommended upstream (`owner/name`, stars, SPDX license, last push), `external/<subdir>` target, **integration approach** (provider adapter | worker | library | reference), a **commercial license-fit verdict** (Green adopt / Amber isolate behind network boundary / Red do-not-ship), and a **priority** (P0 build-now = 22 · P1 next = 36 · P2 later/reference = 23). Sections: Render/Compose/Auto-edit, Captioning, TTS/Voice-clone, Talking-Avatar/Lipsync, Diffusion Video (T2V/I2V), Image/Keyframe, Workflow Orchestration, Media Ingest, Social Publishing, Trend/Hashtag Discovery, plus a pinned clone script, product-side shim files, priority summary, and cross-cutting adoption gates.
|
||
|
||
> **Legal invariant:** SPDX labels cover *repository code* only. Model **weights**, datasets, custom nodes, and generated-output terms carry separate licenses and MUST be reviewed in `external/REGISTRY.md` before commercial deployment — a permissive code license does NOT imply commercial weight rights.
|
||
|
||
---
|
||
|
||
## 4. How to navigate
|
||
|
||
1. **Start here** for the map and totals, then open the doc that owns the directory you are working in (§1 / §2 tables).
|
||
2. **Each architecture doc is self-contained**: overview + design rules, a directory tree, then `Path | Responsibility` manifest tables you read top-to-bottom as a build list. Those rows are the atomic units of work counted in this index.
|
||
3. **Before writing new code**, check `OSS_CLONE_CHECKLIST.md` (§3) — prefer adopting/porting a vetted upstream over hand-rolling.
|
||
4. **For sequencing**, read `PHASES.md` (P6→P12) and `MASTER_ROADMAP.md`; the build sequence in §5 ties directory work to those phases.
|
||
5. **Load-bearing contracts** (defined once, referenced everywhere): unified async-GPU job envelope (`apps/api/app/services/render`, mirrored by desktop `rf-jobs` and `external/workers/_contract`); capability registry (`infra/render-workers/registry.yaml`); signed release-manifest (`infra/deploy`); wallet-authoritative billing (Lago/OpenMeter observe-only — ADR-0001/0002); template→RenderSpec compiler (seam into existing compose).
|
||
|
||
### Supporting research / planning corpus (context, not counted)
|
||
- `MASTER_ROADMAP.md` — chief-architect unification of the per-directory docs into one program.
|
||
- `PHASES.md` — phased build plan P6→P12 with per-phase scope, dependencies, and gates.
|
||
- `RESEARCH_DIGEST.md`, `research/RAW_RESEARCH.md`, `research/higgsfield-and-models.md` — market + model research backing the priority bets.
|
||
- `NEW_DIRECTORIES.md` — the top-level directories introduced by the vision.
|
||
|
||
---
|
||
|
||
## 5. Recommended build sequence (ties into PHASES.md)
|
||
|
||
Dependency spine (must be built in this order): **async-GPU envelope → event bus → templates compiler → publishing loop → routing depth → consistency → automation → gateway/monetization → scale hardening.** Each phase lands infra just-in-time ahead of the product track it enables, follows the thin-router→service→repository→policy convention, and ships 80%+ TDD coverage. Gated (NC/territorial) endpoints stay deferred behind review across all phases.
|
||
|
||
| Phase | Theme | Primary directories | Key deliverables | Gate |
|
||
|---|---|---|---|---|
|
||
| **P6** | Foundation: async-GPU envelope, event bus, Templates crown jewel | `apps/api` (services/render, events, domains/templates, models/db), `external/workers/_contract`+`comfyui-runtime`, `infra/{render-workers,docker,queues}`, `.github`, `apps/mobile` shared+templates+onboarding, `docs` IA | Unified job envelope + versioned ComfyUI workflow registry; internal outbox/DAG bus; templates domain + 15 seeded genres; first signed worker image; authors `apps-web.md` (closes known gap) | template→RenderSpec compiler passes; first image signed |
|
||
| **P7** | Close the loop: publishing hub + retention + 1-body/N-hooks A/B | `apps/api/domains/publishing`, `services/{captions,loops,audio}`, `workers/tasks_publish`, `external/{services,ingest,workers}`, `infra/{queues,observability}`, mobile/web `features/{review,publishing,scheduler,experiments,retention}` | OAuth connectors + self-hosted scheduler + watermark-safe re-encode + retention ingestion + hook-strength predictor; `JobCompleted→publish→RetentionIngested→WinnerSelected→regenerate` | loop-completion event fires end-to-end |
|
||
| **P8** | Routing depth: 22 real adapters, per-shot cost-cap, transparent burn, watermark loop | `apps/api/domains/routing/providers`, `external/workers/*`, `external/_meta`, `infra/{gpu-autoscale,render-workers}`, mobile/web `features/{wallet,captions}` | 22 license-class + deprecation-aware adapters; deploy-time + route-time NC/territorial exclusion; per-model burn preview; watermark double-win | license-gate blocks NC for paid; burn-preview accurate |
|
||
| **P9** | Consistency & AI-film: character/style lock, storyboard, multi-agent orchestrator | `apps/api/domains/{characters,storyboard,film,presets,assets}`, `workers/tasks_film`, `external/{film-blueprints,timeline,render}`, `infra/queues`, mobile/web `features/{film,series}` | Soul-ID-like character lock (+Wan 2.2 LoRA); screenplay→shotlist→animatic; ViMax-style multi-agent orchestrator over NCP; OTIO/FCPXML export | identity holds across re-entry; OTIO export |
|
||
| **P10** | Clipfarm automation + trends + series + desktop local render farm | `apps/api/domains/{series,trends}`, `workers/tasks_series`, `external/{ingest,story-bots}`, `apps/desktop/crates/*`+`src/*`+`packaging/*`, mobile/web `features/{clipfarm,trends,series,repurpose}`, `infra/{queues,observability}` | Episodic series/batch/cadence engine; trend/sound ingestion; desktop `rf-*` crates = local $0-wallet render farm + ComfyUI bridge + bulk operator console | 150+ videos/mo unattended; $0-wallet local render |
|
||
| **P11** | Monetization platform: gateway resell, clipmarket, growth, affiliate | `apps/api/domains/{gateway,clipmarket,moderation,growth}`, `services/lago`, `external/{gateway-refs,services}`, `infra/{cdn,dns,secrets,env,policy}`, mobile/web `features/{marketplace,affiliate,gateway,plans,studio}` | Provisioning/management keys + per-workspace markup + white-label reseller + Lago bridge; pay-per-view clipmarket + viewbot fraud detection; growth funnels + Sora-shutdown migration | reseller sub-key spend-cap reset; CPM payout + fraud block |
|
||
| **P12** | Scale hardening + GA: full infra planes, blue-green, canaries, polish | `infra/{terraform,k8s,gpu-autoscale,queues,observability,deploy,secrets,scripts}`, `.github/{workflows,actions}`, `apps/desktop/crates/rf-plugins`, mobile/web polish, `packages/*` contract sync | Terraform + K8s/Helm + full observability; ~29 workflows + composite actions; blue-green + canary + digest-pinned rollback; contract-check across all packages | blue-green canary + rollback; SLOs green |
|
||
|
||
**Cross-cutting throughout:** `packages/{api-contract,sdk-python,sdk-typescript}` evolve alongside `apps/api` (contract-first), and `docs/` specs/ADRs/runbooks/CODEMAPS are authored in the phase that produces the code they describe.
|