|
| 1 | +# py4web Todo Tutorial — Remotion Video |
| 2 | + |
| 3 | +A ~2:22 captioned walkthrough of building the `apps/todo_tutorial/` app |
| 4 | +(Auth + Form + Grid + JSON API, no JavaScript). |
| 5 | + |
| 6 | +## Layout |
| 7 | + |
| 8 | +``` |
| 9 | +src/ |
| 10 | + index.ts registerRoot |
| 11 | + Root.tsx <Composition id="Main" .../> |
| 12 | + Main.tsx timeline: intro → 6 chapters → outro |
| 13 | + components/ |
| 14 | + theme.ts colors / fonts |
| 15 | + highlight.tsx tiny Python tokenizer + colorizer |
| 16 | + Terminal.tsx animated zsh window (typing + output reveal) |
| 17 | + CodePane.tsx animated code window (line-by-line reveal, optional highlight) |
| 18 | + Caption.tsx lower-third caption with fade in/out |
| 19 | + SplitScene.tsx ChapterScene wrapper (STEP NN + title bar) |
| 20 | + Intro.tsx opening + closing cards |
| 21 | + chapters/ |
| 22 | + Chapter1Setup.tsx pip install / py4web setup / run |
| 23 | + Chapter2Clone.tsx cp -r _scaffold todo_tutorial |
| 24 | + Chapter3Basic.tsx models.py + controllers.py for the basic todo |
| 25 | + Chapter4Assign.tsx extend the model with deadline + assigned_to + auth.signature |
| 26 | + Chapter5Views.tsx three views via three different filters |
| 27 | + Chapter6Api.tsx JSON endpoints + curl demo |
| 28 | +``` |
| 29 | + |
| 30 | +## Run |
| 31 | + |
| 32 | +```bash |
| 33 | +npm install |
| 34 | +npm start # opens Remotion Studio at http://localhost:3000 |
| 35 | +npm run build # renders out/py4web-todo-tutorial.mp4 |
| 36 | +``` |
| 37 | + |
| 38 | +## Knobs |
| 39 | + |
| 40 | +- Composition is **1920×1080 @ 30 fps**, `MAIN_DURATION_FRAMES` in `src/Main.tsx`. |
| 41 | +- Chapter durations are constants in `Main.tsx` — adjust to retime. |
| 42 | +- Caption text is inline in each chapter file; edit & restart the studio. |
| 43 | +- Code-reveal speed is the `revealDuration` prop on `<CodePane>`. |
| 44 | +- Type-speed for terminal lines is `typeDuration` per `TerminalLine`. |
0 commit comments