Context
Jess's half of the M4 split. Depends on #78 (scaffold + shared modules).
Sam is working on #79 (React islands) in parallel.
These are the form-driven pages — data entry, submission, and analytics.
Scope
1. Create Page (#35)
Page: pages/create.astro
- Creator profile form with fields:
- Tone (text input)
- Vocabulary (comma-separated → array)
- Catchphrases (comma-separated → array)
- Topics to avoid (comma-separated → array)
- Model selection dropdowns:
- Reasoning model: populated from
getProviders() → providers.reasoning
- Video model: populated from
getProviders() → providers.video, plus "Skip video" option
- Optional pipeline params (collapsed "Advanced" section):
- Number of videos (default 100)
- Number of scripts (default 50)
- Number of personas (default 100)
- Top N (default 10)
- Start button:
- Validates required fields (tone is required, at least one catchphrase)
- Calls
startPipeline(req) from lib/api-client.ts
- On success: redirect to
/pipeline/{run_id}
- On error: show error message inline
- Alternative: "Upload JSON" option — file input for
creator_profile.json
2. Performance Tracking Page (#39)
Page: pages/track/[id].astro
- Loads run results from
getPipelineResults(runId) to show which scripts were generated
- For each posted video, a form with:
- Platform dropdown: TikTok / YouTube / Instagram
- Post URL (text input)
- Views, likes, comments, shares (number inputs)
- Watch time avg (optional, seconds)
- Completion rate (optional, 0-100%)
- Submit button calls
submitPerformance(req) from lib/api-client.ts
- Show existing performance data for this run from
getPerformance(runId)
- Success feedback: "Performance data saved" with checkmark
3. Insights Dashboard + Runs Page (#40)
Pages: pages/insights.astro, pages/runs.astro
Runs page:
- List of session's pipeline runs from
listRuns(sessionId)
- Each run shows: run_id (truncated), status badge (pending/running/completed/failed), timestamp
- Links to
/pipeline/{run_id} or /results/{run_id} depending on status
Insights page:
- Loads from
getInsights() (currently returns placeholder data — that's fine)
- Layout prepared for:
- Top patterns by performance (bar chart or table)
- Committee prediction vs actual (scatter or comparison)
- Improvement over iterations (line chart or table)
- Can use static placeholder data until the backend insights endpoint is fleshed out
- Chart library suggestion: lightweight option like Chart.js or just HTML tables for now
Dependencies
Acceptance Criteria
Suggested Order
#35 (create page) → #39 (performance) → #40 (insights/runs)
Create page is the entry point for the whole app — get it working first. Performance tracking and insights follow naturally.
Notes
- Session ID management: for now, generate a UUID on first visit and store in localStorage. Pass as query param to API calls.
- All API calls go through
lib/api-client.ts — don't use raw fetch() in page components.
Context
Jess's half of the M4 split. Depends on #78 (scaffold + shared modules).
Sam is working on #79 (React islands) in parallel.
These are the form-driven pages — data entry, submission, and analytics.
Scope
1. Create Page (#35)
Page:
pages/create.astrogetProviders()→providers.reasoninggetProviders()→providers.video, plus "Skip video" optionstartPipeline(req)fromlib/api-client.ts/pipeline/{run_id}creator_profile.json2. Performance Tracking Page (#39)
Page:
pages/track/[id].astrogetPipelineResults(runId)to show which scripts were generatedsubmitPerformance(req)fromlib/api-client.tsgetPerformance(runId)3. Insights Dashboard + Runs Page (#40)
Pages:
pages/insights.astro,pages/runs.astroRuns page:
listRuns(sessionId)/pipeline/{run_id}or/results/{run_id}depending on statusInsights page:
getInsights()(currently returns placeholder data — that's fine)Dependencies
lib/api-client.ts— import all API functions from thereAcceptance Criteria
/api/providers/pipeline/{run_id}on successBaseLayout.astrofor consistent navSuggested Order
#35(create page) →#39(performance) →#40(insights/runs)Create page is the entry point for the whole app — get it working first. Performance tracking and insights follow naturally.
Notes
lib/api-client.ts— don't use raw fetch() in page components.