videogen/PLAN-2026-10-23-DEEP.md
caelum0x d56639a594
Some checks are pending
build-images / api (push) Waiting to run
build-images / worker-gpu (push) Waiting to run
build-images / web (push) Waiting to run
codeql / Analyze (javascript-typescript) (push) Waiting to run
codeql / Analyze (python) (push) Waiting to run
perf / API hot-path micro-smoke (budgeted) (push) Waiting to run
perf / Desktop engine crates (release build check) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (comfy-workflow-schema) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (effects-core) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (eventbus-types) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (growth-analytics) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (trends-schema) (push) Waiting to run
vision2026-ci / API phase modules (ruff + pytest) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (provider-adapter-kit) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (publishing-connectors) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (render-core) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (shot-template-schema) (push) Waiting to run
vision2026-ci / Python SDK resource tests (push) Waiting to run
vision2026-ci / Desktop engine crates (test + clippy + fmt) (push) Waiting to run
vision2026-ci / Alembic upgrade + drift check (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (caption-engine) (push) Waiting to run
Menivor — open source release (MIT), free to use and fork
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.
2026-12-04 02:10:26 +03:00

183 lines
12 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Menivor (videogen) — Deep Build Plan, 2026-10-23
Internal build doc. Source: filesystem at this commit (`471cb054`), `apps/api/app/router.py`
inline comments (ground truth for domain purpose/gating), `docs/api/ROUTE-AUDIT.md`,
`docs/reelforge/CURRENT_STATE.md`. Not re-deriving facts already pinned in
`ARCHITECTURE-2026-10-23.md` / `STRATEGY-2026-10-23.md` — this file is the pages/APIs/
features spec those two explicitly left open.
Scope note: 241 web pages + 181 mobile screens exist. Listing every file is in the
inventory tables below (real paths, not invented). Per-element UI specs are written only
for files actually read this pass; everything else is marked `[infer]` (name-derived,
unverified) so nothing here is fabricated as verified fact.
## 0. Just shipped this pass (verified, pushed to origin/main)
- `fix(dub)` — `apps/api/sidecars/pyvideotrans/requirements-slim.txt`: pin `edge-tts==7.3.1`
to match `pyproject.toml`; added `tests/reelforge/test_dub_runner.py::test_sidecar_edge_tts_matches_the_api_pin`.
- `feat(mcp)` — `render_html` tool: agent-authored HTML → reel. Files: `apps/web/lib/mcp/html-reel.ts`
(+test), `apps/web/lib/mcp/tools.ts`, `apps/web/app/api/mcp/route.ts` (+test),
`apps/web/app/(marketing)/mcp/page.tsx` (+test), `apps/web/vitest.config.ts`.
### render_html — full spec
- Transport: `POST /api/mcp` (JSON-RPC 2.0 batch-capable, `tools/call`), auth via
`Authorization: Bearer mk_...` (caller's Menivor API key, forwarded as `x-api-key` upstream).
- `inputSchema`: `html` (string, required, ≤30000 chars), `language` (≤8), `aspect`
(enum from `ASPECTS`), `voice_name` (≤128), `avatar_id` (≤128), `caption_style` (≤64),
`variants` (int 1–3).
- Parse (`html-reel.ts`): strip HTML comments; iteratively strip
`script|style|noscript|iframe|svg|object|embed|template` tags and their content
(closed and unclosed); extract `title|h1|h2|h3|p|li` blocks; subject = first `h1` else
first `title` else first spoken block (≤500 chars); script = all spoken blocks
(title excluded) joined `\n\n` (≤5000 chars); decode `  < > " ' &`.
No heading/paragraph → `{error: "That HTML has no heading or paragraph to read."}`.
- On success: `POST {API_BASE}/jobs` with `{params: {video_subject, video_script, language?,
aspect?, voice_name?, avatar_id?}, caption_style?, variants?}` → same contract as
`create_reel`. Response: `{job_id}`; poll with `get_job`.
- Remaining for this tool: no multi-image/`<img>` → B-roll hint yet (create_reel doesn't
support one either, so parity not a gap); no markdown variant (agents already emit HTML
fine, low value).
## 1. MCP surface (`/mcp` page + `/api/mcp` route) — fully specified, all 10 tools
Single JSON-RPC endpoint. `tools/list` returns all; `tools/call` dispatches by `name`.
Every call acts as the API-key owner (no further per-tool scoping — note for any future
multi-tenant MCP key).
| tool | method→path | auth | notes |
|---|---|---|---|
| `create_reel` | `POST /jobs` | key | `video_subject`/`video_script` required |
| `render_html` | `POST /jobs` | key | shipped this pass, see above |
| `get_job` | `GET /jobs/{job_id}` | key | poll target for both reel tools |
| `ad_from_url` | `POST /ad-studio/...` | key | product URL → ad variants |
| `schedule_publish` | `POST /publish/schedule` (infer) | key | |
| `list_scheduled` | `GET /publish/scheduled` (infer) | key | |
| `get_performance` | `GET /performance` (infer) | key | |
| `generation_quote` | `GET /catalog/quote` (infer) | key | price check before spend |
| `wallet_balance` | `GET /wallet/balance` | key | |
| `list_media_models` | `GET /catalog/models` (infer) | key, read-only | |
`/mcp` page copy promises "no scheduling or publishing" is tested
(`mcp-copy.test.ts`) against a subset — if a future tool adds autopost, update that
test's allowlist, not just the tool table.
## 2. Web app — route inventory (`apps/web/app`, Next 15 app router)
### Marketing / public (`(marketing)`, 57 routes) — SEO + conversion surface
Free tools (18, `/tools/*`): `ai-voiceover-generator`, `app-store-audit`, `aso-keyword-checker`,
`aspect-ratio-calculator`, `best-time-to-post-calculator`, `engagement-rate-calculator`,
`hashtag-generator`, `script-length-calculator`, `srt-to-vtt`, `subtitle-generator`,
`subtitle-shifter`, `tiktok-caption-generator`, `tiktok-hook-generator`,
`tiktok-script-generator`, `video-bitrate-calculator`, `video-idea-generator`,
`video-title-generator`, `video-to-text`, `youtube-shorts-script-generator`, plus
dynamic `[usecase]`. Each: client-side calculator/generator, no auth, CTA to `/sign-up`.
Dependency: these are the top-of-funnel; `openseo` skill applies directly if indexing is weak.
Remainder `[infer]`: `/`, `/about`, `/contact`, `/contract`, `/creator-contract`, `/features(/[feature])`,
`/for/[platform]`, `/gallery`, `/guides(/[slug])`, `/help/install-chop`, `/integrations`,
`/launch-video`, `/legal/{acceptable-use,content-credentials,data-requests,report,subprocessors}`,
`/made-with-menivor`, `/make(/[type])`, `/mcp` (spec'd above), `/presets-gallery`, `/press`,
`/pricing`, `/privacy`, `/providers(/[provider])`, `/refunds`, `/showcase`, `/styles`, `/terms`,
`/video-ads(/[business])`.
### OTT viewer (`(ott)`, 6 routes) — `[infer]`, gated dark (see §4)
`/c/[handle]`, `/c/[handle]/[titleId]`, `/c/[handle]/live/[streamId]`, `/c/[handle]/tv`,
`/embed/[id]`, `/linear/[slug]`.
### Authenticated app (~178 routes) — grouped, `[infer]` unless noted
- Create/render: `/create(/advanced,/results,/templates)`, `/editor`, `/film`, `/motion`,
`/filtergraph`, `/effects-lab`, `/render`, `/story`, `/very-time`, `/translate`, `/enhance`,
`/broll`, `/broll-library`, `/captions`, `/voices`, `/avatars`, `/actors`, `/characters`.
- Studio (10): `/studio`, `/studio-ott`, `/studio/{avatars,broll,captions,clips,design(/[id]),
dub,my-voices,voices}`.
- Catalog (11): `/catalog`, `/catalog/{avatars(/[avatarId]),caption-styles,cover-styles,hooks,
layouts,music,templates,voices(/[voiceId])}`.
- Jobs/media: `/jobs(/[id])`, `/batch/[id]`, `/uploads`, `/media`, `/media/{models,playground,usage}`,
`/import`, `/capture(/[id])`, `/new`.
- Publish/growth: `/autopost(/accounts(/[id]),/callback,/new)`, `/ads(/[key],/connect/[platform],
/new,/report)`, `/ad-studio(/[id],/catalog(/[importId]))`, `/ad-clone`, `/ad-fatigue`,
`/publish`, `/scheduled`, `/calendar(/channels)`, `/connections(/queue)`, `/channels`,
`/review`, `/approvals`, `/competitors`.
- Insights/analytics (6+4+4): `/insights(/analytics,/presets,/referral,/winners(/[batchId]))`,
`/analytics(/hooks,/retention,/views)`, `/discover(/creators,/hashtags,/sounds)`, `/performance`,
`/trends`, `/trend-lab`, `/hook-lab`, `/hook-finder`, `/ab-lab`, `/retention-lab`, `/leaderboard`,
`/model-governance`, `/models(/compare)`.
- Workflow/brand: `/workflows`, `/workflows-lab`, `/blueprints`, `/presets`, `/brand`, `/agent`,
`/agency(/branding,/clients(/[clientId]),/keys,/margin,/revenue)` — agency = 7 routes, white-label surface.
- Money: `/wallet(/activity,/plans)`, `/billing(/cancel,/success)`, `/spend`, `/usage`.
- Account/org: `/settings` (13: root, `ad-campaigns,api-keys,audit,billing,integrations(/callback),
mcp,privacy,provider-keys,seo,sso,team`), `/account(/api-keys)`, `/team`, `/workspace`, `/invite(s)/[token]`.
- Misc: `/dashboard`, `/onboarding`, `/notifications`, `/status`, `/api-docs`, `/apps`, `/beta`,
`/ideas`, `/inbox`, `/keywords`, `/launch-kit`, `/marketplace`, `/clipmarket`, `/gateway`,
`/developer`, `/month(/[id])`, `/r/[token]` (public share), `/creators/[handle]`, `/admin`
(5: `compliance,funnel,jobs,users,workspaces`), `/sign-in(/[[...sign-in]])`, `/sign-up(/[[...sign-up]])`.
## 3. Mobile (`apps/mobile/app`, Expo Router, 181 files) — `[infer]`, not re-walked this pass
Tabs: `create`, `broll`, `jobs`, `me`. Stacks mirror web 1:1 for the hero flows:
`create`, `job/[id]`, `jobs/reels`, `studio/{avatar,captions,characters,design,motion,
preset,scripts,template}`, `catalog(/model,/studio)`, `ad-studio`, `calendar`, `capture`,
`connections`, `creator`, `inbox`, `insights(/winners)`, `repurpose/clipping`, `wallet`,
`workspaces`, `invite`, `legal`, `account/{admin,api-keys,avatars,voices,workspaces}`,
`r/[slug]`. Build-remains: confirm `render_html`-equivalent entry isn't needed on mobile
(mobile has no agent/MCP client — correctly out of scope).
## 4. API domains (`apps/api/app/router.py`, 85 routers) — grouped by production gate
### Live, ungated (core product)
`legacy`, `reels`, `media`, `editor`, `broll`(+legacy alias), `speak`, `dub`, `content`,
`identity`, `creator`, `publishing`, `store_connect`, `keyword_tracker`, `launch_kit`, `seo`,
`workspaces`, `billing`(checkout/webhook routes individually gated, see below), `developer`,
`insights`, `community`, `compliance`(+`takedown`), `funnel_readout`, `partner_launch_video`,
`presets_hub`, `gallery`, `characters_hub`, `story8`, `very_time`(+voice), `enhance`,
`apps_shelf`(scenes gated by `PRESENTER_LIVE`), `catalog`, `wallet`(transfers frozen, below),
`byok`, `repurpose`, `clipping`, `ingest`, `adstudio`, `ads`(gated on app-review env keys),
`integrations`, `brand`(+`brand_agent`), `creative_review`, `competitors`, `ad_fatigue`,
`actors`, `studio_render`, `lipsync_translate`, `workflows`, `mcp_hosted`, `stories`, `styles`,
`templates`, `motion`, `captions`, `trends`, `growth`(Jev hook ranker), `pilot`(capabilities),
`launch`(gate doc), `beta`.
### Dark until flags flip
- `adclone`: `ADCLONE_ENABLED` (default off). Engine clients coded against docs,
"none called live yet" per file comment — enabling without a live-call smoke test first
is the actual risk, not the flag flip itself.
- `ott` + 11 siblings (`ott_transcode, ott_feeds, ott_access, ott_viewers, ott_plans,
ott_commerce, ott_ads, ott_live, ott_linear, ott_analytics, ott_ai, ott_discovery`):
404 until `OTT_ENABLED` + per-surface flag. 12 fully-coded routers, zero production traffic.
`preset_drop` is public-read and already live (not gated with the OTT family despite
being listed adjacent in router.py).
### Deliberately frozen (owner decision, not a bug)
`api_surface.py` allowlist excludes in production: `wallet/transfers*`, `wallet/transfer-
challenges`, `billing/webhook/{stripe,paddle,polar,iyzico}`. P2P wallet transfer and payment
webhooks stay coded-but-unmounted — do not "fix" this by adding them back without an explicit
owner go-ahead; it's policy, not an oversight.
## 5. Desktop (`apps/desktop`, Rust/GPUI, ~30 `crates/rf-*`) — not enumerated this pass
Remains to build (from prior audit): read each `rf-*` crate's UI module to produce a real
screen inventory before writing a desktop section of this plan with the same rigor as §2.
Do not guess screen names from crate names (`rf-shots`, `rf-render`, `rf-render-core`,
`rf-capture`, `rf-encode`, `rf-compose`, `rf-jobs`, `rf-workflows`, `rf-plugins`, `rf-comfy`,
`rf-trends`, `rf-growth`, `rf-clipfarm`, ...) — crate name ≠ screen.
## 6. Next build priorities (ranked, concrete)
1. **Ad Clone live-call smoke test** — before touching `ADCLONE_ENABLED`, exercise each
non-Kling engine client in `app/domains/adclone/engine_clients.py` against its real API
once (sandbox/test mode, zero spend if the provider offers a free tier check; else skip
and note as owner-budget blocker). Flipping the flag on untested clients risks silent
production failures on first real customer use.
2. **OTT go-live decision** — 12 routers are fully built and dark. Either pick one surface
(`ott_viewers` + `ott` is the minimal watch path) and flip its flag behind a small
internal cohort, or explicitly deprioritize OTT in `STRATEGY-2026-10-23.md` so it stops
showing up as a "gap" every audit pass.
3. **Desktop screen inventory** — read the 30 `rf-*` crates' GPUI UI modules; without this,
no one can tell if `apps/desktop` is launch-ready or a shell.
4. **`render_html` adoption loop** — add a one-line example to the `/mcp` page showing the
exact MCP client call (Claude Desktop config snippet) so the tool is actually discoverable,
not just callable.
## 7. Owner blockers (noted, not blocking)
- GitHub Actions billing failure blocks CI since 2026-10-16 — never touch per standing rule.
- iOS build/submit blocked on Apple credentials (2FA/Keychain) — owner-only.
- Enabling any paid-tier provider account for Ad Clone engine smoke tests needs a card —
skip, zero-budget rule.