Re-create the structure of any viral video — then make it your own, refilled with your own words at the creator's exact pacing.
Paste a TikTok / Reels / Shorts / YouTube link. The app downloads it, transcribes it word-by-word, and has Claude map the script into its structural beats — hook, points, money line, CTA. Open a card to rewrite the script line-by-line (it estimates your line's duration at the creator's pace) and play it back as a teleprompter while you record.
The premise: videos don't go viral because of editing — they go viral because every sentence has a job. The theory behind the beat labels lives in docs/structure-anatomy.md: five viral videos annotated sentence-by-sentence, the two retention engines (withhold vs. deepen), and seven laws that repeat across all of them. Worth reading even if you never run the app.
git clone https://github.com/louisedesadeleer/winning-structures
cd winning-structures
python3 server.py # → http://localhost:8756That's it for browsing the library and using the prompter — no dependencies, no build step (the frontend ships prebuilt in static/).
To analyze new videos, the server shells out to a few tools:
| Tool | For | Install |
|---|---|---|
| yt-dlp | downloading the video | brew install yt-dlp / pipx install yt-dlp |
| ffmpeg | audio probing + thumbnails | brew install ffmpeg |
| Whisper | word-level transcription | Apple Silicon: pipx install mlx-whisper · anywhere else: pipx install openai-whisper |
| Claude | beat mapping | Claude Code on PATH, or export ANTHROPIC_API_KEY=sk-ant-... |
The server tells you at startup which of these it can't find. Analysis of a new video takes ~1–2 minutes (download → Whisper → Claude). Videos are downloaded to a temp dir and deleted after processing — only the thumbnail and beat data are kept.
- Download —
yt-dlpgrabs the video. (TikTok quirk handled: some formats claim audio but ship video-only, so downloads are probed with ffprobe and retried with h264 formats.) - Transcribe — Whisper with word timestamps, so every sentence knows exactly how long the creator took to say it.
- Beat-map — Claude groups the sentences into beats, each with one structural job (HOOK, MECHANISM, MONEY LINE, GATE, RECAP…), and identifies which retention engine the video runs on.
- Rewrite & record — click any line, replace it with your own; the app estimates your line's duration at the creator's words-per-second. Then play the whole thing as a teleprompter (mirror mode, speed control, per-beat countdown) and record on your phone.
Your edits persist in localStorage; "Copy my script" exports the full rewritten script.
server.py— stdlib-only Python server + the ingestion pipeline. No pip installs.frontend/— the SPA source: React + Vite + Tailwind v4 + shadcn/ui. Rebuild withcd frontend && npm install && npm run build(outputs tostatic/).static/— the prebuilt bundle, committed so the app runs with zero build steps.library.json— your growing library, seeded with two analyzed examples.docs/structure-anatomy.md— the theory: two retention engines, seven laws.
MIT
