We use cookies for secure login and hiding this banner. For more information view our privacy policy.

prompter-visualizer

prompt
MIT

A convincing stand-in for an AI chat prompt bar, built to be screen recorded. Write your prompts in advance as a script, and it types them into a floating bar over a black stage, character by character, with a live aurora glow. It is not a real AI and makes no network calls, so there are no keys and nothing to pay for. The send is manual with no timeout, which is the whole point: the answer appears on your voiceover line instead of on a timer. Three modes for prompts, title cards and a screen pivot over your own footage, and it runs entirely in the browser.

prompter-visualizer screenshot
Clone repository
https://liivo-liivogit.go-gitea-gitea.auto.prod.osaas.io/oscadmin/skills-prompter-visualizer.git
Prompt

1. Core brief

Read this section first. It is the whole app in one page. If you only ever read this section and built from it, you would build recognisably the right thing.

What it is. Prompter is a local, single user web tool for making short videos about AI coding. It fakes the chat interface of an AI coding assistant so that one person, the operator holding the screen recorder, can film a prompt being typed and sent without a real model, a real API key or a single network call. The operator writes the prompts in advance, presses Play, and the app types them into a convincing floating prompt bar on a pure black canvas with an animated aurora glow behind it. Its only user is whoever is filming, so there are no accounts, no sharing and no multi user anything.

Screens.

  • / Prompts editor. Left rail of named scripts, right pane of beat cards, a settings panel underneath, a Play button.
  • /play?id=... Prompts play canvas. Fullscreen black, one floating prompt bar, no chrome at all. This is the thing that gets filmed.
  • /titles Title card editor. Same shell, headline and subtitle fields.
  • /title-play?id=... Title play canvas. Fullscreen black, headline pops in and pivots, subtitle follows.
  • /video Screen pivot. Drop a flat screen recording or a still, see it floating in a 3D pose over the aurora in a live preview, then a fullscreen Record overlay to film.

The features that define it.

  • A fake AI prompt bar that is never a real AI: no model, no key, no backend, no runtime network request.
  • Scripted prompts type themselves in one character at a time with human jitter, at a speed the operator sets.
  • The send is manual. When the text is fully typed the bar just sits there with the caret blinking, indefinitely, until the operator presses Enter.
  • Space mid typing snaps the rest of the text in instantly, without sending.
  • A live animated aurora behind the bar: a slowly rotating conic gradient ring hugging it, and a wide blurred bloom bleeding out into the black.
  • The bar grows taller as the prompt wraps, with the icon row staying directly under the last line, and stays dead centre at any line count and any scale.
  • The send animation: the send button compresses, then the whole bar blurs, fades, lifts and scales slightly as it leaves, then a black hold, then the next prompt fades back in and starts typing.
  • Scripts are ordered lists of beats. A beat is one prompt going in and out. A beat can carry optional response text, which exists only to make a short italic thinking... show inside the bar before the send.
  • Titles mode: a headline pops in with an overshoot and a soft settle, then keeps swaying gently in 3D, with an optional subtitle revealed by a second Enter or on a timer.
  • Video mode: a flat clip or still floats in a 3D pose over the same aurora with sway, sideways drift and a slow Ken Burns zoom, so dead B roll feels alive.
  • One shared aspect ratio, 9:16 or 16:9, letterboxed on pure black so cropping in post is a rectangle selection and nothing else.
  • Every number that affects how it looks on camera is a slider with its live value on screen, because the difference between footage that looks right and footage that looks fake lives entirely in those numbers.
  • Everything except the uploaded clip autosaves to localStorage under one key. No login, no server, opens instantly.
  • Filming is keyboard only: Enter to type and to send, Space to skip or pause, arrows to jump beats, R to restart on a clean frame, Esc to leave.
  • After the last beat the canvas returns to the clean idle frame rather than looping, so the take ends where it started.

The feel. This is the part that decides whether the app is any good, so treat it as a requirement and not as decoration. Everything on the filmed canvas must be unhurried and calm. The typing is deliberate, not a machine gun and not a metronome: the jitter is what makes a viewer read it as a person at a keyboard. The pause after the typing finishes is not dead air, it is the product. That is the beat the operator talks over, and it lasts exactly as long as their sentence does, because nothing on that canvas is on a timer. The aurora is slow, wide and soft. Eighteen seconds for one rotation, a fourteen second pulse under it. You should not be able to catch it moving if you look straight at it, only notice that the frame is alive. The send is the one moment of energy, and even that is a soft blur upward rather than a snap.

The chrome, by contrast, is a dense, unglamorous dev tool: mono font, hairline borders, tight rows, sliders with numbers next to them, no illustrations and no onboarding. That contrast is deliberate. The editor is a mixing desk and the canvas is the stage. Above all, the canvas must never look like a toy. It gets projected at full frame in somebody's video, next to real footage of a real tool, and every cheap detail reads instantly: a mono font in the bar, a bar that is pure black instead of very dark grey, an icon row bolted to a fake bottom edge, an overshoot that snaps back too hard, a glow that pulses like a notification. If a frame of it would make a viewer suspect it is a mock up, the app has failed at its only job. Dark only, desktop only, pure black backgrounds. No light theme, and do not add one.

You are expected to make your own version. This is not a reproduction exercise. Different names, different palette, different copy, a different layout for the editor, different wording on the labels, different small interactions, all fine and all expected. Everything after section 2 is detail to draw on when you want it, not a specification to satisfy line by line.

2. What has to match, and what is yours

Must match, or it is a different app

  1. It fakes an AI chat prompt bar and it is never a real AI. No model, no API key, no backend, no network request at runtime. Every word on screen is text the operator typed into a textarea beforehand.
  2. The mechanism. The operator writes prompts in advance as an ordered list of beats. Play types the current beat's text, character by character with jitter, into a convincing floating prompt bar centred on a pure black frame. That is the product. A version where the operator types live, or where the text just appears, is a different app.
  3. The operator triggers the send manually, and there is no timeout. When the text is fully typed the bar holds it, caret blinking, for as long as it takes. Enter fires the send. This is the single feature the whole tool exists for, because the send has to land on the operator's voiceover line, which is a thing only they know the length of. See the note below: this also sits in the next group.
  4. The bar has to be convincing. A live rotating aurora ring around it and a soft bloom behind it, a grotesque sans in the bar text and never the mono UI font, a very dark grey inner surface rather than pure black, and a plausible control row of small icons and a model label along the bottom. The specific icons, colours and label text are yours. Looking real is not.
  5. The filmed canvas carries no chrome. Fullscreen, pure black, letterboxed to a chosen aspect ratio, no header, no counter, no exit button, no hint text in Prompts mode. It opens on a clean frame and it ends on a clean frame.
  6. Every on camera number is a live slider with its value visible. The operator tunes against the picture, not against a config file, and they do it while looking at the canvas.
  7. Local, single operator, instant. State in the browser, no login, no sharing, no sync. It has to be open and filming within seconds of a thought.

Must be right, or it breaks

These are not taste. Get one of them wrong and you get a broken app rather than a different one.

  • Port binding. "start": "next start -p ${PORT:-8080}". The hosting platform injects PORT and the container is unreachable if the process listens anywhere else. Never hardcode a port. 8080 is a load bearing number: it is the platform's injected value and the sensible local default.
  • useSearchParams and Suspense. Both play routes read the query string. Each page must split the reading component out and wrap it in <Suspense fallback={...}>. Next 14 fails the production build otherwise, and a static export needs the same thing.
  • Client only browser access. "use client" at the top of every page and canvas component, and every window or localStorage read inside a useEffect. Touching either during render gives a blank white page in production and nothing useful in the console.
  • Settings backfill on load. loadState must spread the defaults underneath the parsed settings, { ...DEFAULT_SETTINGS, ...parsed.settings }, on every read. Skip it and every slider you add later is dead for anyone with an older saved state, silently.
  • The rotating ring animates a registered custom property, not a transform. Declare @property --aurora-angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; } and animate that inside the conic gradient. Rotate the element instead and the bar's own contents spin with the ring.
  • The uploaded clip is never persisted. Hold it as an in memory object URL, revoke it when it changes, and keep it out of localStorage. A screen recording will blow the quota and take the whole saved state down with it.
  • Video element flags. A video source needs autoPlay, muted and playsInline together, or browsers refuse to start it. An image source must render as an <img> with no playback controls, and anything whose MIME type does not start with video/ or image/ is ignored silently.
  • Screen sizing and resting yaw in Video mode. Size the screen against the canvas in cqw and cqh units, and keep the resting yaw at exactly 0. A non zero constant yaw makes the perspective projected box sit off centre, and the offset is unstable across sizes and even flips sign at large scales. Get the laid back look from pitch alone. Both of these are correctness, not taste.
  • The glow spread clamp of 4. The bloom is sized in absolute pixels, so on a large or high density display the same value covers much less of the frame. The slider maximum and the internal clamp are both 4 for that reason. Do not lower them to 1 because the default sits below 1.
  • Guards in the timing math. max(1, wpm) in the tick formula and the 8ms floor on the jittered tick keep a corrupted or extreme stored value from producing a zero or negative delay and locking the animation loop. Clamp every derived value in section 10.3 the same way.
  • The playback loop needs two race guards, not one. Give every beat run its own AbortController, and also a run id that increments on each run and is rechecked after every await. Without the recheck a beat jump or a restart leaves the old coroutine alive, it wakes up after its sleep and advances the index, and the canvas jumps to a beat nobody asked for mid take. The abortable sleep(ms, signal) must resolve on abort rather than reject, or every beat jump throws an unhandled promise rejection. The promise the ready phase awaits keeps its resolver in a ref and the abort listener resolves it too, or exiting while the bar is holding text leaves that promise pending forever.
  • No API, no secrets. No app/api/**, no server actions, no auth, no cookies, no runtime fetch. There is nothing to leak because nothing exists to leak. If you find yourself adding an API key, you have misunderstood the app.

On the manual send appearing in both groups. It belongs in "must match" because it is the product: the reason this tool exists rather than a screen recording of a real assistant is that the operator controls the exact frame the prompt goes. But it also belongs here, because the failure mode is not a cosmetic difference. An assistant building this will reach for a timeout on the ready phase out of habit, since almost every animation demo advances itself, and the result is an app that cannot do its job at all: the send fires in the middle of a sentence, every take is ruined, and the operator has no way to fix it from the UI. So: the ready phase awaits a promise that only a keypress resolves. No setTimeout, no fallback duration, no "safety" auto advance. Same for the title reveal, except there the timed option is a real feature the operator opts into with a toggle.

Yours to change

Generously. All of this is taste, and the original's answers are just one set of answers.

Everything cosmetic and verbal. The name Prompter, the aurora's six colour stops, the editor palette, both fonts, every label, every placeholder, every help sentence, the demo seed content, the model label in the bar (5.5 and Medium are deliberately generic and name no real product, so pick your own), the icons in the control row, the layout of the editor, the rail width, the order of anything.

The 32 controls in section 10.2 are not a target. They are what accumulated in the original over many shoots, and you almost certainly do not want all of them. Build the handful you will actually reach for while filming, and add the rest only when a take makes you want one. If you build three, build typing speed, bar size and glow (spread and intensity together on one slider is fine). Those three are what actually get dragged. Everything else, thinking pause, corner radius, pivot speed, motion speed, auto reveal delay, the disabled state logic between dependent sliders, is a nice to have that costs you a row in a panel and a field in a type. A version of this app with four sliders is a better tool than one with thirty two you never touch.

The three modes are separable, and Prompts mode alone is a complete, useful tool. Titles mode and Video mode share the aurora and the canvas geometry, but they share nothing else, and neither one is needed for the app to do its job. If you only ever build Prompts mode, you have a finished product. That also makes for a much better stage 1 than trying to stand all three up at once: get one bar typing and sending on a black frame, deploy it, film with it, and decide afterwards whether you want title cards and B roll in the same tool or in separate ones.

Both sets of tuning numbers are starting points, not settings. There are two in this document and neither is authoritative. The DEFAULT_SETTINGS in section 8 are the code defaults, which is what a fresh browser gets. The values noted at the end of section 10.2 are a set the app was left on after a run of real shoots, and they drift a long way from the defaults, mostly toward more glow and slower motion on a large screen. Start from either one, then change anything that looks wrong on your own monitor at your own aspect ratio. The point of the sliders is that these numbers were never meant to be final.

Structural choices too. Next.js and Tailwind are not required, any client side stack works, because there is no server. The legacy betweenBeatsMs and streamCps fields exist only to keep old saved states valid, so on a fresh build just leave them out. Shiki and the unrendered chat transcript components are pure history, skip them. localStorage under one key is the simplest thing that works, but a single JSON file export and import would be a defensible improvement, since losing a script to cleared site data is the app's one real weakness.

Build it in stages

The build is staged, and the full staging is in section 17. What matters if you are working from sections 1 and 2 alone is this:

Stage 1 is Prompts mode only, deployed. One script, an ordered list of beats, a bar that types the current beat and sends it when the operator presses Enter, on a black fullscreen canvas, plus three sliders (typing speed, bar size, glow) and the aspect ratio toggle. No Titles mode, no Video mode, no settings panel full of controls. Get that reachable at a URL and film something with it before you build anything else, because thirty seconds of footage will tell you more about what to build next than another hour of guessing. Stage 1 is a finished, useful tool on its own.

Stage 2 adds whatever the footage made you want, then Titles mode and Video mode if you want them at all. Stage 3 is feel and defensive reads. Everything after section 2 in this document is reference for those later stages.

3. What you are building

Everything from here on is the long version, written as description rather than as instruction. It expands section 1 and it exists so you have an answer when you want one, not so you can tick it off. Where it gives a number, treat it as the value the original settled on after real use, not as a target.

Build me Prompter, a local, single user web tool for making short vertical videos about AI coding. It fakes the chat UI of an AI coding assistant so the operator can screen record it and cut the footage into a tutorial or a social short. Nothing about it is a real AI: there is no model, no API key and no network call. The operator writes the prompts in advance, then hits Play and the app types those prompts into a convincing floating prompt bar on a pure black canvas, at a controllable speed, with an animated aurora glow behind it. The operator presses Enter when they want the send animation to fire, so the timing lands on their voiceover instead of on a timer.

Three modes share one canvas look:

  1. Prompts, the core mode. A single floating prompt bar that types scripted prompts and sends them.
  2. Titles, animated title cards for video intros. A headline pops in and pivots in 3D, with an optional subtitle revealed afterwards.
  3. Video, also called Screen pivot. Drop in a flat screen recording or a screenshot and it floats in a 3D pose over the same aurora, drifting and slowly zooming, so dead B roll feels alive.

The audience is one person: whoever is filming. So there are no accounts, no sharing, no multi user anything. All state lives in the browser's localStorage under a single key. Every control that affects how it looks on camera is exposed as a slider with a live number, because the difference between footage that looks right and footage that looks fake is entirely in those numbers.

4. How to use this prompt

Pick whichever path matches your setup. In any of them you can paste sections 1 and 2 on their own, build stage 1 of section 17 from just those, and paste or refer back to the rest afterwards. That is the practical answer to this document's length, and it also gets you to a deployed URL sooner.

(a) Liivo MCP connector (no local dev needed)

  1. Go to liivo.ai/connect and follow the connect flow. The MCP address is my.liivo.ai/mcp.
  2. Send as your first message: Use setup-project for Prompter, a fake AI chat prompt bar for screen recording
  3. Then paste the rest of this prompt. Let it scaffold, build and deploy. It will hand you back a generated public URL.

(b) Any AI in a local folder, then deploy to Liivo

  1. Make an empty folder and open it with your AI assistant of choice.
  2. Paste this whole prompt.
  3. Run it locally with npm run dev and check it against the acceptance checklist in section 16.
  4. Push it to a git repo, then deploy it through the Liivo MCP connector or the OSC control panel. See section 15.

(c) Claude Code or Codex in a terminal

  1. mkdir prompter && cd prompter
  2. Start your CLI agent in that folder.
  3. Paste this prompt. Ask it to build in the order given in section 17.

5. Tech stack

These are the versions the original ships, and they are a known good set rather than a requirement. Newer majors are fine, as is a different stack entirely, since there is no server side code in the app at all. If you do move off Next.js, the one thing to carry over is the Suspense rule for the query string reading routes in section 2.

| Thing | Version | Why it matters | | --- | --- | --- | | Next.js | 14.2.x, App Router | The whole app is client rendered, but the App Router gives clean routes and next start binds to an injected port, which is what the hosting platform needs. | | React | 18.3.x | Nothing exotic. Hooks only. | | TypeScript | 5.5.x, strict: true | The settings object has around 25 fields. Strict mode is what keeps a rename from silently breaking a slider. | | Tailwind CSS | 3.4.x | All the chrome (left rail, editor, settings) is Tailwind. All the on camera visuals are hand written CSS in globals.css, because they need @property, conic gradients and keyframes that Tailwind will not express. | | Shiki | 1.22.x | Syntax highlighting for the optional response code blocks. Loaded lazily, one cached highlighter. | | Fonts | next/font/google: JetBrains Mono and Inter | JetBrains Mono is the editor UI font. Inter is used only inside the fake prompt bar and title cards, because it is the closest free substitute for the proprietary grotesque that real AI chat UIs use. Using the mono font in the bar instantly reads as fake. | | Package manager | npm | Platform runs npm run build then npm start. |

No database. No backend. No API routes. No auth. No server actions. Do not add any. Every page is a client component.

package.json

{
  "name": "prompter",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start -p ${PORT:-8080}",
    "lint": "next lint",
    "typecheck": "tsc --noEmit"
  },
  "dependencies": {
    "next": "14.2.15",
    "react": "18.3.1",
    "react-dom": "18.3.1",
    "shiki": "1.22.0"
  },
  "devDependencies": {
    "@types/node": "20.14.10",
    "@types/react": "18.3.3",
    "@types/react-dom": "18.3.0",
    "autoprefixer": "10.4.20",
    "eslint": "8.57.0",
    "eslint-config-next": "14.2.15",
    "postcss": "8.4.47",
    "tailwindcss": "3.4.13",
    "typescript": "5.5.4"
  }
}

File layout

app/
  layout.tsx              dark theme, both fonts, metadata
  globals.css             all on camera CSS: aurora, bar, title, pivot
  page.tsx                Prompts editor (route /)
  play/page.tsx           Prompts play canvas (route /play?id=...)
  titles/page.tsx         Title card editor (route /titles)
  title-play/page.tsx     Title card play canvas (route /title-play?id=...)
  video/page.tsx          Screen pivot: upload, live preview, Record
components/
  ModeTabs.tsx            Prompts / Titles / Video switcher
  ScriptList.tsx          left rail list of prompt scripts
  ScriptEditor.tsx        beat list plus "Add beat"
  BeatEditor.tsx          one beat: prompt, optional response, overrides
  SettingsPanel.tsx       Prompts settings
  PlayCanvas.tsx          the prompt bar state machine
  TitleCardList.tsx
  TitleCardEditor.tsx
  TitleSettingsPanel.tsx
  TitleCanvas.tsx         title pop in plus 3D pivot
  VideoSettingsPanel.tsx
  VideoCanvas.tsx         3D pivot of an uploaded clip, preview and fullscreen
lib/
  types.ts                Beat, Script, TitleCard, Settings, DEFAULT_SETTINGS
  storage.ts              load and save AppState, seed demo, migrations
  typing.ts               WPM math and jittered sleep
  highlight.ts            lazily created cached Shiki highlighter
public/
  favicon.svg

6. Complete page and screen inventory

There are five routes. Three are editors with the same shell. Two are fullscreen canvases meant to be filmed.

6.1 / Prompts editor

Two column layout, full viewport height, no page scroll on the shell.

  • Left rail, fixed 260px, right border, surface background:
    • Small muted label at the top with the app name, lowercase.
    • ModeTabs: three equal width segmented links, Prompts / Titles / Video. Active tab is accent background with canvas coloured text; inactive is surface2 with muted text, hovering to border background.
    • Full width button + New script.
    • Scrollable script list below. Each row shows the script name, truncated, and under it N beats (singular beat when N is 1) in 10px muted text. The active row gets surface2 background and a visible border. On hover a row reveals two tiny text buttons on the right, dup and del. del asks Delete "<name>"? through window.confirm first.
    • Empty state: No scripts yet. in small muted text.
  • Right pane:
    • Header row: a borderless text input holding the script name, placeholder Script name, large medium weight. On the right a solid accent Play button with canvas coloured text. Play is disabled at 40% opacity when there is no active script or the script has zero beats. Clicking it routes to /play?id=<scriptId>.
    • Scrollable body: the beat list, then the settings panel pinned underneath it as the last block (it scrolls with the content, it is not a fixed footer).
    • Empty state when nothing is selected: No script selected. Create one on the left.

Each beat card in the list is a rounded bordered surface box containing:

  • Header line: Beat <n> on the left, and on the right three tiny text buttons up, down, del. up is disabled on the first beat, down on the last, both at 30% opacity. del confirms with Delete this beat?.
  • Label Prompt and a 2 row resizable monospace textarea. Placeholder: a short hint that this is what the operator types on camera.
  • A text toggle that reads add response (optional) when collapsed and hide response (optional) when open. It starts open only if the beat already has response text. Opened, it shows label Response, optional. If set, Play mode shows a brief "thinking..." beat after the prompt. and a 6 row resizable monospace textarea.
  • A text toggle show overrides / hide overrides. Opened, it shows a three column grid of number inputs: WPM, Thinking (ms), Stream (cps), each with placeholder global. An empty field means null, which means fall back to the global setting. A non numeric entry also becomes null.
  • Below the list, a + Add beat button.

States: loading (renders just Loading... in muted text on a padded main while localStorage is read in an effect), loaded, and no active script. There is no error state, because there is nothing that can fail. A corrupt localStorage value silently falls back to the seeded default state.

6.2 /play?id=<scriptId> Prompts play canvas

Fullscreen, position: fixed, inset 0, pure black, centred, text selection disabled. Inside it a single aspect ratio locked canvas, also pure black, with overflow: hidden. Nothing else. No header, no counter, no hint text, no exit button. It is designed to be filmed as is, so any chrome would have to be cropped out.

The canvas holds exactly one thing: the floating prompt bar, positioned left: 50%; top: 50% with transform: translate(-50%, -50%) scale(promptScale), width 88% of the canvas capped at 640px. It is dead centre vertically at any line count and any scale.

States, driven by a six value phase machine:

| Phase | What is on screen | | --- | --- | | idle | The bar is fully visible with an empty text area, the caret blinking, and the aurora already rotating. Waiting for Enter. There is no fade in from black and no hint text. | | typing | Text appears one character at a time, caret blinking at the end, the bar growing taller as lines wrap. | | ready | Full text held, caret still blinking, waiting indefinitely for Enter. Nothing auto advances here. | | thinking | Only when the beat has response text. The text area is replaced by italic thinking... at 70% white. | | sending | The send button compresses, and the whole bar blurs, fades, lifts and scales up slightly as it leaves. | | hidden | Bar invisible. A short all black hold. |

If id does not match a script: centred Script not found. plus a Back to editor button. While localStorage is being read: centred Loading.... Both the play routes read useSearchParams, so they must be wrapped in <Suspense> with a Loading... fallback or the build will fail.

6.3 /titles Title card editor

Same shell as /. Left rail button reads + New title card, list rows show the card name and, underneath, the card's headline truncated (or no title). Header input placeholder Card name. Play is disabled unless the headline has non whitespace content, and routes to /title-play?id=<cardId>.

Right pane body has two fields:

  • Title, a 2 row non resizable sans serif textarea at 18px, with helper text The headline that zooms into view. Press Enter in Play mode to reveal it.
  • Description (optional), a 2 row non resizable sans serif textarea, with helper text explaining it is revealed by a second Enter or automatically after a delay when enabled in Settings, and that leaving it blank gives a title only card.

Then the Titles settings panel.

6.4 /title-play?id=<cardId> Title play canvas

Same fullscreen black aspect locked canvas. Three steps:

  • Step 0, idle: completely clean black canvas with one small hint, Press Enter to reveal, at 11px in 30% white, bottom centred 32px up. It is deliberately tiny and near the edge so it is easy to crop and it disappears the instant the reveal starts.
  • Step 1: aurora bloom fades up behind the centre, and the headline pops in.
  • Step 2: the subtitle fades and rises into place under the headline.

Enter advances one step. R restarts to step 0 and replays the one shot animations from the top. Esc returns to /titles. Not found state mirrors /play.

6.5 /video Screen pivot

Same shell, but the left rail has no list.

  • Left rail: mode tabs, then a button that reads + Choose file when nothing is loaded and Replace file when something is. It opens a hidden file input accepting image/*,video/*. Below it, either the loaded file's name and size in MB to one decimal, or the prompt Drop a screen recording or image on the right, or use the button above. Then a permanent note that the clip stays in this browser tab and is not saved between sessions, while settings are remembered.
  • Right pane header: the title Screen pivot and an accent Record button, disabled until a file is loaded.
  • Right pane body, empty state: a 460px tall dashed border drop zone with an upload arrow icon, the text Drop a screen recording or image, or click to choose and under it Video (MP4, MOV, WebM) or image (PNG, JPG, GIF). While a file is dragged over it, the border and background switch to accent and surface2.
  • Right pane body, loaded state: the drop zone is replaced by a 460px tall bordered box containing a live preview of the exact composition, sized to the box, updating as the sliders move. Under it the note Live preview. Hit Record for the fullscreen version, then screen-record the browser window.
  • Then the Video settings panel.
  • Pressing Record mounts the same canvas component again as a fixed inset-0 z-50 fullscreen overlay on top of everything. Esc closes it.

7. Complete feature list

Prompts mode

  • Unlimited named scripts, each an ordered list of beats.
  • Create, select, rename, duplicate (name gets (copy) and beats get fresh ids), delete a script. New scripts and copies are prepended to the list, not appended.
  • Add, reorder (up and down, one step), delete a beat.
  • Per beat optional response text, which exists only to trigger a thinking... beat before the send.
  • Per beat optional overrides for WPM, thinking milliseconds and stream characters per second. Blank means inherit.
  • Play mode with manual send: the operator, not a timer, decides when the prompt goes.
  • Typing has human jitter, not a metronome.
  • The caret blinks with a hard step, not a fade.
  • The bar auto grows in height as the prompt wraps to more lines, and the control row stays directly under the last line of text rather than pinned to a fake bottom edge.
  • After the last beat the canvas returns to idle rather than looping, so the take ends on a clean frame.

Titles mode

  • Unlimited named title cards, same create / select / rename / duplicate / delete verbs as scripts.
  • Headline pop in with an overshoot and a soft settle.
  • Continuous gentle 3D pivot on the headline, optional and adjustable.
  • Optional minimal 3D depth on the glyphs (a short darkened extrusion, not a blocky 3D).
  • Subtitle revealed either by a second Enter or automatically after a delay.
  • R remounts the text block so the one shot animations replay exactly.

Video mode

  • Drag and drop or file picker for a video (MP4, MOV, WebM) or a still image (PNG, JPG, GIF). Anything whose MIME type does not start with video/ or image/ is ignored silently.
  • Video sources render as an autoplaying, muted, playsInline <video>. Image sources render as an <img> with no playback controls at all.
  • Live in editor preview and a separate fullscreen record overlay, driven by the same component with a fullscreen flag.
  • Resting 3D pose, sway, horizontal drift, Ken Burns zoom, all independent and all composable.
  • Aurora or clean black background.
  • Loop or play once while filming.
  • Space pauses and resumes, R restarts the clip from zero and replays the entrance animation, Esc exits. Only in the fullscreen overlay, never in the preview.
  • The clip is held in memory as an object URL, revoked when it changes. It is deliberately not persisted, because a screen recording will not fit in localStorage.

Cross cutting

  • Everything except the uploaded clip autosaves to localStorage with a 250ms debounce. Refreshing keeps all of it.
  • One shared Settings object across all three modes, so aspect ratio and glow are set once and apply everywhere. Each mode's panel shows only the sliders that mean something for it, plus the shared ones.
  • reset defaults link at the top right of every settings panel, restoring the whole Settings object.
  • Every settings panel collapses and expands by clicking its own heading, which reads Settings (click to collapse) or Settings (click to expand).
  • Every slider shows its live value, formatted with its unit, right aligned on the same line as its label, and a one or two line help sentence underneath.
  • Sliders that would do nothing are rendered disabled at 40% opacity, not hidden. Pivot speed is disabled while pivot amount is 0. Motion speed is disabled while sway, side movement and zoom are all 0. The three glow sliders are disabled while the video background is set to black.
  • A keyboard shortcut reference is printed at the bottom of each settings panel, per mode. It is not shown on the canvas.
  • Dark only. There is no light theme and there should not be. The tool exists to produce black frames.
  • Desktop only in practice. Nothing is built for touch, because the operator is at a machine with a screen recorder.
  • Fully offline after first load. No network request is made at runtime except the Google font fetch that next/font inlines at build time.
  • Every state read defends against a corrupt or older stored object: unknown settings keys are backfilled from defaults, retired keys are deleted, and a parse failure falls back to a freshly seeded state.
  • First run seeds one demo script with one beat and one demo title card, so no mode is ever empty on a fresh browser.

8. Data model

There is no database. This is the entire persisted shape, stored as JSON under the single localStorage key cte:state:v1.

// lib/types.ts

export interface Beat {
  id: string;
  /** The text that types itself into the bar. */
  prompt: string;
  /** Optional. If non empty, a "thinking..." beat plays before the send. */
  response: string;
  wpmOverride?: number | null;
  thinkingMsOverride?: number | null;
  streamCpsOverride?: number | null;
}

export interface Script {
  id: string;
  name: string;
  beats: Beat[];
  createdAt: number;   // epoch ms
  updatedAt: number;   // epoch ms
}

export interface TitleCard {
  id: string;
  /** Internal name shown in the left rail list. */
  name: string;
  /** The big headline that pops in. */
  title: string;
  /** Optional subtitle, revealed after the headline. */
  description: string;
  createdAt: number;
  updatedAt: number;
}

export type AspectRatio = "9:16" | "16:9";
export type VideoBg = "aurora" | "black";

export interface Settings {
  // Prompts
  wpm: number;
  thinkingMs: number;
  streamCps: number;
  betweenBeatsMs: number;
  promptScale: number;

  // Shared canvas
  aspectRatio: AspectRatio;
  glowSpeed: number;
  glowSpread: number;
  glowIntensity: number;

  // Titles
  titleScale: number;
  titlePivot: number;
  titlePivotSpeed: number;
  title3D: boolean;
  titleAutoReveal: boolean;
  titleRevealDelayMs: number;

  // Video (screen pivot)
  videoScale: number;
  videoTilt: number;
  videoPivot: number;
  videoDriftX: number;
  videoZoom: number;
  videoPivotSpeed: number;
  videoRadius: number;
  videoBg: VideoBg;
  videoLoop: boolean;
}

export interface AppState {
  scripts: Script[];
  activeScriptId: string | null;
  titleCards: TitleCard[];
  activeTitleCardId: string | null;
  settings: Settings;
}

export const DEFAULT_SETTINGS: Settings = {
  wpm: 310,
  thinkingMs: 900,
  streamCps: 60,
  betweenBeatsMs: 800,
  glowSpeed: 0.5,
  glowSpread: 0.94,
  glowIntensity: 1.0,
  aspectRatio: "9:16",
  promptScale: 0.93,
  titleScale: 0.9,
  titlePivot: 1.0,
  titlePivotSpeed: 1.0,
  title3D: false,
  titleAutoReveal: false,
  titleRevealDelayMs: 1200,
  videoScale: 0.8,
  videoTilt: 0.6,
  videoPivot: 1.0,
  videoDriftX: 0.6,
  videoZoom: 0.5,
  videoPivotSpeed: 1.0,
  videoRadius: 14,
  videoBg: "aurora",
  videoLoop: true,
};

Those defaults are the values the original settled on after real shoots. They are a good opening position and nothing more. Every one of them is exposed as a slider precisely because it was never meant to be final, so change anything that looks wrong on your monitor. The second set at the end of section 10.2 drifts a long way from these and is equally provisional. The one number here that is not taste is the 4 ceiling on glow spread, explained in section 2.

Ids are generated locally, no library: Math.random().toString(36).slice(2, 10) + Date.now().toString(36).slice(-4).

Storage rules

const KEY = "cte:state:v1";

// loadState():
//  - returns null when there is no window (server render)
//  - when the key is missing: build the seeded default state, write it, return it
//  - when it parses: settings = { ...DEFAULT_SETTINGS, ...parsed.settings }
//                    if titleCards is not an array, seed one demo card
//                    if activeTitleCardId is null, point it at titleCards[0]
//                    delete any retired keys
//  - on any throw: return a freshly seeded default state
// saveState(): JSON.stringify into the key, swallow quota errors silently

Seeded demo script: one beat, prompt Build me an app that teaches me math, and remembers which questions I got wrong and right, empty response, all overrides null. Seeded demo title card: name Demo: episode intro, title Build a math tutor in 60 seconds, description with Codex. Change the description to whatever assistant you are filming.

9. API contract

There is none, and adding one is a mistake. To be explicit:

| Method | Path | Notes | | --- | --- | --- | | GET | / | Static Next.js page, client rendered. 200. | | GET | /play | Static page, reads ?id= on the client. 200. | | GET | /titles | Static page. 200. | | GET | /title-play | Static page, reads ?id=. 200. | | GET | /video | Static page. 200. |

No app/api/** routes. No server actions. No auth. No cookies. No fetch at runtime. The only persistence layer is window.localStorage.

10. Interaction rules and the real numbers

This is the section that decides whether it looks right on camera, so the numbers are given precisely. They are still tuned defaults: what the original settled on after real use, offered as a starting point because a starting point is far more useful than a blank. Change anything that feels wrong to you. The only exceptions are the guards called out in section 2, the max(1, wpm) divisor, the 8ms tick floor, the clamps in section 10.3 and the 4 glow spread ceiling, which exist to stop a bad stored value from breaking the visual rather than to express a preference.

10.1 The beat and script format (the core abstraction)

A beat is one prompt going into the bar and out again. A script is an ordered list of beats. That is the whole authoring model, and the operator never thinks about frames or timelines, only about the next thing they type.

The playback contract for one beat, in order:

  1. Reappear, 250ms, skipped for the first beat of a take. The bar fades and un blurs back in from the previous send. The first beat skips it because the bar is already fully visible in idle, and fading it in would flicker.
  2. Type. One character per tick. Base tick is 60000 / (max(1, wpm) * 5) milliseconds, since 5 characters per word is the standard assumption. Each tick is jittered by plus or minus 35% of the base, floored at 8ms. Space during this phase sets a skip flag that snaps the full text in on the next tick.
  3. Ready. Indefinite. Full text, caret blinking. Resolves only when the operator presses Enter. There is no timeout, ever. This is the whole point: the operator sends on their own line of voiceover.
  4. Thinking, only when response is non empty after trimming. Text area becomes italic thinking... for thinkingMs.
  5. Send. Send button press animation runs 220ms. In parallel, the bar blurs, fades, lifts 12px and scales to 1.02 over 550ms.
  6. Black hold, 400ms with the bar invisible.
  7. Advance to the next beat, or, if this was the last, set the current index back to the idle sentinel so the canvas ends clean. No auto restart.

betweenBeatsMs (default 800) and streamCps (default 60) are carried in the data model and shown as sliders but are legacy: the prompt bar rebuild replaced a streaming chat transcript, so nothing reads them during playback any more. Keep the fields and the sliders so old saved states stay valid, and do not wire them into the timing.

Worked example, paste ready. Open DevTools on the running app and run this to load a three beat script plus a title card:

localStorage.setItem("cte:state:v1", JSON.stringify({
  scripts: [
    {
      id: "demoscript1",
      name: "Ep 12: math tutor",
      createdAt: 1760000000000,
      updatedAt: 1760000000000,
      beats: [
        {
          id: "beat1",
          prompt: "Build me an app that teaches me math, and remembers which questions I got wrong and right",
          response: "",
          wpmOverride: null,
          thinkingMsOverride: null,
          streamCpsOverride: null
        },
        {
          id: "beat2",
          prompt: "Add a streak counter and a daily summary",
          response: "",
          wpmOverride: 200,
          thinkingMsOverride: null,
          streamCpsOverride: null
        },
        {
          id: "beat3",
          prompt: "Now deploy it",
          response: "working on it",
          wpmOverride: null,
          thinkingMsOverride: 1400,
          streamCpsOverride: null
        }
      ]
    }
  ],
  activeScriptId: "demoscript1",
  titleCards: [
    {
      id: "demotitle1",
      name: "Ep 12 intro",
      title: "Build a math tutor in 60 seconds",
      description: "no code, one prompt",
      createdAt: 1760000000000,
      updatedAt: 1760000000000
    }
  ],
  activeTitleCardId: "demotitle1",
  settings: {
    wpm: 310, thinkingMs: 900, streamCps: 60, betweenBeatsMs: 800,
    glowSpeed: 0.5, glowSpread: 0.94, glowIntensity: 1.0,
    aspectRatio: "9:16", promptScale: 0.93,
    titleScale: 0.9, titlePivot: 1.0, titlePivotSpeed: 1.0,
    title3D: false, titleAutoReveal: false, titleRevealDelayMs: 1200,
    videoScale: 0.8, videoTilt: 0.6, videoPivot: 1.0, videoDriftX: 0.6,
    videoZoom: 0.5, videoPivotSpeed: 1.0, videoRadius: 14,
    videoBg: "aurora", videoLoop: true
  }
}));
location.reload();

Beat 1 uses global speed. Beat 2 types slower at 200 WPM. Beat 3 has a response, so it shows thinking... for 1400ms before the send fires.

10.2 Every control in every settings panel

Values are min / max / step / default. All sliders are native <input type="range">.

Prompts panel (/)

| Control | Type | Range | Step | Default | Displayed as | | --- | --- | --- | --- | --- | --- | | Aspect ratio | 2 way toggle | 9:16 (labelled 1080x1920) or 16:9 (1920x1080) | n/a | 9:16 | the raw value | | Prompt size | slider | 0.5 to 1.0 | 0.01 | 0.93 | percent, 93% | | Typing speed (WPM) | slider | 60 to 400 | 10 | 310 | raw integer | | Thinking pause (ms) | slider | 300 to 3000 | 50 | 900 | raw integer | | Response stream (chars/sec) | slider | 20 to 200 | 5 | 60 | raw integer (legacy, unused in playback) | | Between beats (ms) | slider | 400 to 2000 | 50 | 800 | raw integer (legacy, unused in playback) | | Glow speed | slider | 0.25 to 3 | 0.05 | 0.5 | 2dp with an x, 0.50x | | Glow spread | slider | 0 to 4 | 0.05 | 0.94 | 2dp, 0.94 | | Glow intensity | slider | 0.3 to 1.6 | 0.05 | 1.0 | 2dp with an x, 1.00x |

Shortcut list printed underneath: Enter: start typing / send prompt, Space: skip current typing animation, Left arrow / Right arrow: jump between beats, R: restart from beginning, Esc: exit play mode.

Titles panel (/titles)

| Control | Type | Range | Step | Default | Displayed as | | --- | --- | --- | --- | --- | --- | | Aspect ratio | 2 way toggle | 9:16 or 16:9 | n/a | 9:16 | raw value | | Title size | slider | 0.5 to 1.0 | 0.01 | 0.9 | percent, 90% | | Pivot amount | slider | 0 to 2 | 0.05 | 1.0 | 1.00x | | Pivot speed | slider | 0.25 to 3 | 0.05 | 1.0 | 1.00x, disabled while Pivot amount is 0 | | 3D depth | 2 way toggle | Flat or 3D hint | n/a | Flat (false) | the active label | | Description reveal | 2 way toggle | Manual (Enter) or Auto (timed) | n/a | Manual (false) | manual or auto | | Auto-reveal delay (ms) | slider | 300 to 5000 | 100 | 1200 | raw integer, disabled while reveal is Manual | | Glow speed | slider | 0.25 to 3 | 0.05 | 0.5 | 0.50x | | Glow spread | slider | 0 to 4 | 0.05 | 0.94 | 0.94 | | Glow intensity | slider | 0.3 to 1.6 | 0.05 | 1.0 | 1.00x |

Shortcut list: Enter: reveal title, then description, R: restart from a clean canvas, Esc: exit play mode.

Video panel (/video)

| Control | Type | Range | Step | Default | Displayed as | | --- | --- | --- | --- | --- | --- | | Aspect ratio | 2 way toggle | 9:16 or 16:9 | n/a | 9:16 | raw value | | Background | 2 way toggle | Aurora or Black | n/a | Aurora | aurora or black | | Screen size | slider | 0.3 to 2.0 | 0.01 | 0.8 | percent, 80% | | Corner radius | slider | 0 to 40 | 1 | 14 | pixels, 14px | | 3D tilt | slider | 0 to 1.5 | 0.05 | 0.6 | 0.60x | | Sway amount | slider | 0 to 2 | 0.05 | 1.0 | 1.00x | | Side movement | slider | 0 to 2 | 0.05 | 0.6 | 0.60x | | Zoom | slider | 0 to 1.5 | 0.05 | 0.5 | 0.50x | | Motion speed | slider | 0.25 to 3 | 0.05 | 1.0 | 1.00x, disabled while sway, side movement and zoom are all 0 | | Playback | 2 way toggle | Loop or Play once | n/a | Loop (true) | loop or once | | Glow speed | slider | 0.25 to 3 | 0.05 | 0.5 | 0.50x, disabled while Background is Black | | Glow spread | slider | 0 to 4 | 0.05 | 0.94 | 0.94, disabled while Background is Black | | Glow intensity | slider | 0.3 to 1.6 | 0.05 | 1.0 | 1.00x, disabled while Background is Black |

Shortcut list, headed Keyboard shortcuts (record mode): Space: pause / resume the recording, R: restart from the beginning, Esc: exit record mode.

There are two sets of tuning numbers in this document and neither is authoritative. The defaults in the tables above are what a fresh browser gets. The set below is what the app was actually left on after a run of real shoots: Typing speed 370, Glow speed 0.35x, Glow spread 1.55, Glow intensity 1.40x, Title size 55%, Pivot amount 1.95x, Pivot speed 0.65x, Auto reveal on at 1000ms, 3D tilt 1.20x, Sway 1.85x, Side movement 0.15x. Ship the defaults above for a neutral opening position, or ship these to start where somebody who actually filmed with it ended up. Either way expect to move them again once you watch your own footage. The higher glow spread in particular is a large screen correction, see the note in section 10.4.

10.3 Derived values, exactly

Every slider is a multiplier, not a pixel value. These are the formulas that turn them into CSS. The coefficients in them are tuned defaults like everything else, so scale them to taste. The clamps are not: they are there so a corrupted stored value cannot produce a zero duration or a negative blur. Clamp defensively so a corrupted stored value cannot kill the visual.

// shared aurora, all three canvases
glowSpeed      = max(0.1, settings.glowSpeed)
glowSpread     = clamp(settings.glowSpread, 0, 4)
glowIntensity  = max(0.1, settings.glowIntensity)

rotateDuration = 9 / glowSpeed   seconds   // default 0.5 gives 18s
pulseDuration  = 7 / glowSpeed   seconds   // default 0.5 gives 14s
saturationScale = glowIntensity

// prompt bar canvas
blur          = 18 + glowSpread * 78   px   // default 0.94 gives 91.3px
inset         = -(12 + glowSpread * 88) px  // default 0.94 gives -94.7px
opacityScale  = (0.85 + glowSpread * 0.4) * glowIntensity  // default 1.226

// title canvas
blur          = 40 + glowSpread * 90   px   // default 124.6px
opacityScale  = (0.6 + glowSpread * 0.35) * glowIntensity  // default 0.929

// video canvas
blur          = 50 + glowSpread * 90   px   // default 134.6px
opacityScale  = (0.6 + glowSpread * 0.35) * glowIntensity  // default 0.929

// prompt bar
promptScale   = clamp(settings.promptScale, 0.5, 1.0)

// title
titleScale    = clamp(settings.titleScale, 0.4, 1.0)
pivotDeg      = max(0, titlePivot * 7)              // default 7deg
pivotDuration = 9 / max(0.1, titlePivotSpeed)  s    // default 9s

// video
videoScale    = clamp(settings.videoScale, 0.3, 2.0)
radius        = max(0, videoRadius) px
baseYawDeg    = 0                                   // deliberately zero, see below
pitchDeg      = max(0, videoTilt) * 6               // default 3.6deg
swayAmpDeg    = max(0, videoPivot) * 7              // default 7deg
motionSpeed   = max(0.1, videoPivotSpeed)
swayDuration  = 9  / motionSpeed  s                 // default 9s
driftDuration = 13 / motionSpeed  s                 // default 13s
zoomDuration  = 17 / motionSpeed  s                 // default 17s
driftAmp      = max(0, videoDriftX) * 8   percent   // default 4.8%
zoomMax       = 1 + max(0, videoZoom) * 0.12        // default 1.06

The sway, drift and zoom periods are 9, 13 and 17 seconds on purpose. They are coprime enough that the compound motion never settles into a visible loop inside a short clip.

10.4 Canvas geometry

Both aspect ratios letterbox inside the viewport on pure black, so any crop in post is trivial.

/* 9:16 */
width:  min(100vw, calc(100vh * 9 / 16));
height: min(100vh, calc(100vw * 16 / 9));
aspect-ratio: 9 / 16;

/* 16:9 */
width:  min(100vw, calc(100vh * 16 / 9));
height: min(100vh, calc(100vw * 9 / 16));
aspect-ratio: 16 / 9;

The title and video canvases also set container-type: size so text and screen sizing can use cqw and cqh units and therefore scale with the canvas rather than the viewport. The video preview differs: it is driven by height: 100% with width: auto and max-width: 100%, because the preview box is wide and short, so a height driven canvas of either aspect always fits.

The glow bloom is sized in absolute pixels, not in canvas units. On a large or high density display the same spread value therefore looks much smaller relative to the frame. That is why the Glow spread slider goes to 4 rather than to 1, and why the internal clamp is 4. Do not lower it.

11. Look and feel

Every colour, radius, duration and offset below is one worked answer, not a palette you owe anybody. Recolour it, resize it, change the timings. Two things in here are mechanism rather than taste and are flagged where they appear: the registered --aurora-angle custom property, without which the bar's contents rotate with the ring, and the single continuous spring curve on the title pop in, which is what stops the overshoot from snapping back.

Design tokens

/* Tailwind theme.extend.colors, editor chrome */
canvas    #0a0b0d   page background
surface   #101216   rails, cards, settings panel
surface2  #161a20   inputs, inactive tab, hover targets
border    #1f2227   every hairline
textmain  #e6e7ea   body text
muted     #8a8f98   labels, help text, meta
accent    #7dd3fc   Play / Record buttons, active tab, focus rings
codebg    #0d1117   code block background

/* on camera, hard coded in globals.css */
canvas black        #000000  the filmed background, pure black, not #0a0b0d
bar inner           #0d0d10  very dark grey, deliberately not pure black
bar text            #ffffff
caret               #ffffff  (2px wide in the bar; the legacy chat caret is #7dd3fc)
send button         #ffffff fill, #0a0a0a glyph
model name          #ffffff
model effort        rgba(255,255,255,0.55)
icons               rgba(255,255,255,0.9)
chevrons            rgba(255,255,255,0.55)
title text          #ffffff
title subtitle      rgba(255,255,255,0.72)
screen edge         rgba(255,255,255,0.08)

/* the aurora, one conic gradient reused by all three canvases */
conic-gradient(
  from 0deg,
  #b46cff 0%,    /* violet  */
  #5b8cff 18%,   /* blue    */
  #34d0ff 35%,   /* cyan    */
  #ff7ad1 55%,   /* pink    */
  #ffa657 72%,   /* orange  */
  #b46cff 100%
)

Fonts

  • JetBrains_Mono from next/font/google, display: swap, CSS variable --font-jetbrains-mono, mapped to Tailwind font-mono, applied to <body>. This is the whole editor UI, and it is what makes the tool feel like a dev tool.
  • Inter from next/font/google, display: swap, variable --font-inter, mapped to Tailwind font-sans, applied only to the prompt bar text, the bar control row, the title headline and the title subtitle. Real AI chat UIs use a proprietary grotesque. Inter is the closest free stand in. Rendering the bar in the mono font is the single biggest tell that it is fake.

The prompt bar, precisely

Three nested layers plus a wrapper.

/* layer 0: the outer bloom, a wide blurred conic gradient bleeding into black */
.prompt-bar-glow {
  position: absolute;
  inset: var(--aurora-inset, -40px);
  border-radius: 32px;
  background: <the conic gradient above>;
  filter: blur(var(--aurora-blur, 48px))
          saturate(calc(140% * var(--aurora-saturation-scale, 1)));
  opacity: calc(0.7 * var(--aurora-opacity-scale, 1));
  pointer-events: none;
  z-index: 0;
  animation:
    aurora-rotate-transform var(--aurora-rotate-duration, 9s) linear infinite,
    aurora-pulse            var(--aurora-pulse-duration, 7s) ease-in-out infinite;
}

/* layer 1: the gradient ring hugging the bar */
.prompt-bar-ring {
  position: relative;
  z-index: 1;
  padding: 1.5px;              /* this padding IS the ring thickness */
  border-radius: 22px;
  background: conic-gradient(from var(--aurora-angle, 0deg), <same 6 stops>);
  animation: aurora-rotate-angle var(--aurora-rotate-duration, 9s) linear infinite;
}

/* layer 2: the bar itself */
.prompt-bar-inner {
  position: relative;
  border-radius: 20px;
  background: #0d0d10;
  padding: 14px 18px 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;                   /* the space between last text line and icon row */
}

.prompt-bar-text {
  color: #ffffff;
  font-size: 17px;
  line-height: 1.45;
  letter-spacing: -0.005em;
  min-height: 1.45em;          /* holds one line's height when empty */
  font-weight: 400;
  flex: 0 0 auto;
  align-self: stretch;
}

.prompt-bar-caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  background: #ffffff;
  margin-left: 2px;
  vertical-align: text-bottom;
  border-radius: 1px;
  animation: caret-blink 1.05s steps(1) infinite;
}

@keyframes caret-blink {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0; }
}

The rotating ring must animate a registered custom property, not a transform, or the bar contents rotate with it:

@property --aurora-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}
@keyframes aurora-rotate-angle { 0% { --aurora-angle: 0deg; } 100% { --aurora-angle: 360deg; } }

The outer bloom has no content inside it, so it can rotate with a plain transform:

@keyframes aurora-rotate-transform { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes aurora-pulse {
  0%, 100% {
    opacity: calc(0.55 * var(--aurora-opacity-scale, 1));
    filter: blur(var(--aurora-blur, 48px)) saturate(calc(140% * var(--aurora-saturation-scale, 1)));
  }
  50% {
    opacity: calc(0.85 * var(--aurora-opacity-scale, 1));
    filter: blur(calc(var(--aurora-blur, 48px) + 8px)) saturate(calc(160% * var(--aurora-saturation-scale, 1)));
  }
}

The bar control row

A single flex row, justify-content: space-between, all decorative and all aria-hidden. Left group, gap 12px:

  1. A bare + glyph, 16px, no circle and no border around it, at 90% white.
  2. A hand or palm outline icon, 17px, plus a 10px chevron down at 55% white.
  3. A quarter filled circle (a context window indicator), 14px, then the model label: 5.5 in white at 13px weight 500, then Medium at 55% white 13px weight 400 with a 4px left margin, then another 10px chevron down.

Right group, gap 12px:

  1. A microphone outline icon, 16px, 90% white.
  2. A 26px white filled circle with a black up arrow inside it, stroke width 2.6.

Keep the label text as a constant so it is trivial to change. It is deliberately generic and does not name a real product.

Motion

/* send button press */
@keyframes send-btn-press {
  0%   { transform: scale(1);    opacity: 1; }
  40%  { transform: scale(0.88); opacity: 0.75; }
  100% { transform: scale(1);    opacity: 1; }
}
.prompt-send-btn.is-pressed { animation: send-btn-press 220ms ease-out; }

/* the bar leaving */
@keyframes prompt-bar-send-out {
  0%   { opacity: 1; filter: blur(0);     transform: translateY(0)     scale(1); }
  100% { opacity: 0; filter: blur(12px);  transform: translateY(-12px) scale(1.02); }
}
.prompt-bar-wrap.is-sending { animation: prompt-bar-send-out 550ms ease-out forwards; }

/* the bar coming back, faster than it left */
@keyframes prompt-bar-reappear {
  0%   { opacity: 0; filter: blur(8px); transform: translateY(-6px) scale(1.01); }
  100% { opacity: 1; filter: blur(0);   transform: translateY(0)    scale(1); }
}
.prompt-bar-wrap.is-reappearing { animation: prompt-bar-reappear 250ms ease-out forwards; }

.prompt-bar-wrap.is-hidden { opacity: 0; }

Title card motion

/* the headline arrives: a pop, not a fade */
@keyframes title-pop-in {
  0%   { opacity: 0; transform: scale(0.35); filter: blur(12px); }
  100% { opacity: 1; transform: scale(1);    filter: blur(0); }
}
.title-pop-in { animation: title-pop-in 900ms cubic-bezier(0.33, 1.3, 0.5, 1) both; }

Use that single spring style Bezier with an overshoot baked into it. Do not hand place an overshoot peak in the keyframes: the shrink back from the peak then inherits a fast start curve and snaps hard. One continuous curve turns at the peak with near zero velocity and decelerates softly into rest.

/* the continuous 3D pivot: a sine sampled at 8 points across one full sway */
@keyframes title-pivot {
  0%    { transform: rotateY(0deg); }
  12.5% { transform: rotateY(calc(var(--pivot-deg, 7deg) *  0.707)); }
  25%   { transform: rotateY(var(--pivot-deg, 7deg)); }
  37.5% { transform: rotateY(calc(var(--pivot-deg, 7deg) *  0.707)); }
  50%   { transform: rotateY(0deg); }
  62.5% { transform: rotateY(calc(var(--pivot-deg, 7deg) * -0.707)); }
  75%   { transform: rotateY(calc(var(--pivot-deg, 7deg) * -1)); }
  87.5% { transform: rotateY(calc(var(--pivot-deg, 7deg) * -0.707)); }
  100%  { transform: rotateY(0deg); }
}
.title-pivot { transform-style: preserve-3d; }
.title-pivot.is-pivoting { animation: title-pivot var(--pivot-duration, 9s) linear infinite; }

Two reasons for that shape. It starts and ends at 0 degrees, which is exactly where the static element already sits, so there is no snap on entry. And the keyframe spacing follows a sine, so velocity peaks through centre and eases to zero at the extremes, which is how a pendulum actually moves. Use linear timing so the sampled curve itself provides the easing.

.title-text {
  color: #ffffff;
  font-size: clamp(28px, 9cqw, 220px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.55);
}

/* the optional "3D hint": a short darkened extrusion, not a blocky 3D */
.title-text.is-3d {
  text-shadow:
    0 1px 0   rgba(0, 0, 0, 0.45),
    0 2px 0   rgba(0, 0, 0, 0.4),
    0 3px 0   rgba(0, 0, 0, 0.34),
    0 4px 1px rgba(0, 0, 0, 0.3),
    0 7px 18px rgba(0, 0, 0, 0.6);
}

.title-desc {
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(14px, 3.6cqw, 80px);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0.5em 0 0 0;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(14px);
}
.title-desc.is-revealed { animation: title-desc-reveal 480ms cubic-bezier(0.22, 1, 0.36, 1) forwards; }
@keyframes title-desc-reveal {
  0%   { opacity: 0; transform: translateY(14px); }
  100% { opacity: 1; transform: translateY(0); }
}

The title bloom is a large centred circle, width 70% of the canvas, aspect 1/1, default blur 80px, opacity 0.6 * scale, running the same rotate and pulse animations plus a one shot 700ms ease-out fade up so it does not hard cut in. The title stage sets perspective: 1200px and the uniform scale(titleScale).

Screen pivot motion

.pivot-stage { position: absolute; inset: 0; z-index: 10; display: flex;
               align-items: center; justify-content: center; perspective: 1500px; }

/* one shot entrance, 2D only so it does not fight the 3D pose inside it */
@keyframes video-pivot-in {
  0%   { opacity: 0; transform: scale(0.86); filter: blur(10px); }
  100% { opacity: 1; transform: scale(1);    filter: blur(0); }
}
.pivot-in { animation: video-pivot-in 720ms cubic-bezier(0.22, 1, 0.36, 1) both; }

Nest the motions on separate wrappers, outermost first: drift, then zoom, then the 3D rotate. Each animates its own transform, so they compose instead of overwriting each other. Drift uses the same 8 point sine sampling as the title pivot with linear timing; zoom is a simple in and out so ease-in-out suits it.

@keyframes video-drift {
  0%, 100% { transform: translateX(0); }
  12.5%    { transform: translateX(calc(var(--vx-amp, 0%) *  0.707)); }
  25%      { transform: translateX(var(--vx-amp, 0%)); }
  37.5%    { transform: translateX(calc(var(--vx-amp, 0%) *  0.707)); }
  50%      { transform: translateX(0); }
  62.5%    { transform: translateX(calc(var(--vx-amp, 0%) * -0.707)); }
  75%      { transform: translateX(calc(var(--vx-amp, 0%) * -1)); }
  87.5%    { transform: translateX(calc(var(--vx-amp, 0%) * -0.707)); }
}
@keyframes video-zoom { 0%, 100% { transform: scale(1); } 50% { transform: scale(var(--vz-max, 1)); } }

.pivot-video-wrap {
  transform-style: preserve-3d;
  transform: rotateX(var(--vp-pitch, 0deg)) rotateY(var(--vp-base, 0deg));
}
/* sway oscillates the yaw around the base pose, 8 point sine again, both ends
   exactly at the base pose so there is no snap on start */
.pivot-video-wrap.is-pivoting { animation: video-pivot var(--vp-duration, 9s) linear infinite; }

.pivot-video {
  display: block;
  max-width:  calc(var(--vs, 0.8) * 100cqw);
  max-height: calc(var(--vs, 0.8) * 100cqh);
  width: auto; height: auto;
  border-radius: var(--vr, 14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.05) inset,
    0 10px 30px  rgba(0, 0, 0, 0.45),
    0 50px 130px rgba(0, 0, 0, 0.55);
  background: #000;
}

Two things there are not optional. Size the screen against the canvas (cqw, cqh) rather than against an ambiguous shrink wrapping parent, or it drifts off centre once the scale goes past 100% and starts bleeding over the edges. And keep the resting yaw at 0: a constant yaw makes the perspective projected box sit off centre, the offset is not stable across sizes, and it even flips sign at large scales. Get the laid back look from pitch alone and let the sway supply all the side to side.

The video bloom is a centred circle at width 118% of the canvas, default blur 90px, opacity 0.5 * scale.

Responsive and accessibility

  • The editor shell is a flex row with a fixed 260px rail. Settings grids are one column below the md breakpoint and two columns at or above it. That is the only breakpoint in the app.
  • The canvases are inherently responsive: they letterbox to whatever the window is, and the composition sizes itself in canvas relative units.
  • color-scheme: dark on :root. html, body { height: 100% }.
  • Toggles are real <button> elements carrying aria-pressed. Sliders are real range inputs inside <label> so the label text is their accessible name. All decorative SVG and the bloom layers are aria-hidden="true" and pointer-events: none.
  • The scrollbar inside the play canvas is hidden via .play-canvas::-webkit-scrollbar { width: 0; height: 0; } so it never shows up in a take.
  • The fullscreen canvases set user-select: none so a stray drag cannot highlight the fake prompt text mid take.
  • Deliberate omission: there is no prefers-reduced-motion handling, because the motion is the product. If you add it, gate it behind a setting rather than a media query, or a reduced motion machine will film still frames.

Legacy CSS to keep

The original evolved out of a full chat transcript view. Three components (PromptBubble, ResponseBubble with its Shiki code segments, and ThinkingDots) plus their CSS survive in the repo but are not rendered by any route. Building the prompt bar version made them dead. You can either skip them entirely or build them and leave them unrendered so a chat transcript mode is easy to bring back. If you keep them, keep their CSS too: .caret (0.55ch wide, #7dd3fc), .thinking (three 6px #8a8f98 dots, dot-pulse 1.2s ease-in-out infinite, delays 0.15s and 0.3s on the second and third), and .codeblock (background #0d1117, 1px #1f2227 border, 10px radius, 12px 14px padding, 8px vertical margin, font-size: 0.92em, overflow-x: auto, white-space: pre).

Shiki, if you build the response path: one lazily imported, module cached highlighter, github-dark theme, languages tsx, ts, javascript, jsx, json, bash, shell, html, css, python, yaml, markdown, anything else falling back to text, and a plain escaped <pre><code> fallback if codeToHtml throws. Highlight a fenced block only once its closing fence has arrived, so a half streamed block does not flash rehighlighted colours.

12. The recording workflow this app is built for

This is the operator's loop. The app's whole design follows from it, so build for this order.

Before filming

  1. Open /titles, write the episode headline and subtitle, and set Title size low enough that there is black margin on all sides. Post edit zoom ins need somewhere to zoom into, and a clipped headline cannot be fixed later.
  2. Open /, create a script, and write each thing you will "type" on camera as its own beat, in order. Keep each prompt short enough to wrap to at most three or four lines at the chosen prompt size. A prompt that wraps to seven lines makes the bar tall and clumsy on a 9:16 frame.
  3. Set the aspect ratio once, in any panel. It is shared. 9:16 for Shorts, Reels and TikTok, 16:9 for YouTube.
  4. Tune Typing speed. Higher (300 and up) reads as a confident fast typer. Lower (180 to 220) reads as natural. Then tune the three glow sliders while watching the canvas, not the numbers.

Filming a title

  1. Hit Play on the title card. Put the browser into fullscreen (F11 or the OS equivalent) so there is no browser chrome in the frame.
  2. Start your screen recorder (OBS, Loom, the OS recorder).
  3. Press Enter. The headline pops in and starts pivoting. Press Enter again for the subtitle, or leave it on Auto and let it come by itself.
  4. Hold on the frame for a couple of seconds so you have handles to cut on.
  5. R for another take, Esc when done.

Filming prompts

  1. Hit Play on the script. Fullscreen the browser. Start recording.
  2. The bar is already sitting there with the caret blinking, on a black frame. That is your clean in point.
  3. Press Enter. The first prompt starts typing itself into the bar. If the typing is running long against your voiceover, press Space to snap the rest of the text in instantly.
  4. When the prompt is fully typed the bar just sits there with the caret blinking, indefinitely. This is the beat you talk over. There is no timer forcing you.
  5. When your line lands, press Enter. The send button presses, the bar blurs away upward, the frame goes black for a moment, and the next beat fades back in and starts typing.
  6. Repeat to the end of the script. After the last send the canvas returns to the clean idle frame, which is your out point.
  7. Blew a take mid script? Left arrow and Right arrow jump between beats, R restarts from a clean canvas. Esc returns to the editor.

Filming B roll from a flat recording

  1. Screen record the real thing separately (a terminal, an editor, a browser), flat and boring, and save it.
  2. Open /video, drop the file on the drop zone. The live preview shows the finished composition immediately.
  3. Drag Screen size, 3D tilt, Sway, Side movement and Zoom while watching the preview. Push Screen size past 100% when you want it to bleed off the edges for an immersive look. Switch Background to Black when the aurora fights the clip's own colours.
  4. Hit Record for the fullscreen version, start your screen recorder, and let it run. Space pauses, R restarts from the top, Esc exits.
  5. Note that the clip is not saved. Reloading the page loses it and you drop it again. The settings are remembered, so only the file is lost.

In post

  1. Every canvas is letterboxed on pure black, so cropping to the exact target frame is a rectangle selection and nothing else.
  2. The scale sliders exist so you can push in during the edit without hitting a clipped edge. That is why they default below 100%.

13. External services

None. Zero. This is worth stating plainly because it is unusual.

| Thing you might expect | What this app actually does | | --- | --- | | AI model or API | None. Every "response" is text the operator typed into a textarea. There is no key to leak. | | Database | None. window.localStorage, one key. | | Auth provider | None. Single operator, single browser. | | File storage | None. The uploaded clip is an in memory object URL, revoked on change. | | Analytics | None. | | Fonts | Google Fonts, but through next/font/google, which downloads and self hosts them at build time. No runtime request to Google. |

If you are not on Liivo or OSC, this runs anywhere that can run a Node process: any container host, a VPS with pm2, Vercel, Netlify, Render, Fly. You can also go fully static by adding output: "export" to next.config.mjs and serving out/ from any static host or CDN, since there is no server side code at all. Both play routes already wrap their useSearchParams usage in <Suspense>, which is the one thing a static export needs here. Verify the export before committing to it.

14. Environment variables

The app reads exactly one variable, and the platform injects it.

# .env.example
# The HTTP port the production server binds to. Liivo and OSC inject this
# automatically (8080). Only set it yourself for local production testing.
PORT=8080

Nothing else. No secrets exist, so never commit a .env, and add .env* to .gitignore anyway out of habit. If you find yourself adding an API key to this app, you have misunderstood what it is.

15. Deploying to Liivo

The whole contract, and how each piece connects.

Repo layout. One deployable app at the repo root. package.json at the root with both a build and a start script. The platform clones the repo, runs npm run build, then npm start.

Port binding. This is the one platform specific line in the entire project:

"start": "next start -p ${PORT:-8080}"

The platform injects PORT (8080). next start does not read PORT on its own in a way you should rely on, so pass it explicitly with -p. npm runs scripts through a shell, so the ${PORT:-8080} default expansion works and the same script also runs locally. Never hardcode a port. Next's production server already listens on all interfaces, so you do not need to set a host, but if you add a custom server, bind 0.0.0.0 and not localhost.

Health. / returns 200 immediately. It renders Loading... on the server and hydrates on the client, which is fine for a platform health check and is why the first paint is a muted Loading... rather than a blank page.

Dockerfile. Not needed. A Dockerfile is only worth adding when the app needs system packages, for example openssl for Prisma or ffmpeg for media work. This app needs neither. If you add one anyway for some other reason, do not set PORT in it, because that would override the value the platform injects.

Managed services. None to request. No PostgreSQL, no Valkey or Redis, no MinIO bucket, no SMTP. If you extend the app so that scripts sync across machines, then ask the platform for a managed PostgreSQL through the MCP connector rather than assuming one exists, take the injected DATABASE_URL from the environment, and save the provisioned credentials the moment they are shown, because platforms typically display them once and cannot recover them.

Filesystem. Do not write anything to disk expecting it to survive. Container storage is ephemeral. As built, this app writes nothing at all: the only state is in the visitor's own browser. That has a real consequence worth telling the operator about, so put it in your README: the deployed instance does not "have" your scripts. Each browser profile has its own. Clearing site data loses everything. Back a precious script up by copying the JSON out of DevTools under Application, Local Storage, key cte:state:v1.

Public URL. Generated by the platform, at a hostname derived from the app name. Never hardcode it, and note that you do not need it: this app never needs to know its own address. There are no callbacks, no redirect URIs, no absolute links and no server side code, so there is nothing to wire up. If you later add something that does need the address, see the note on injected URL variables in section 18.

Naming. Call the deployed app something short and neutral, for example prompter. The generated hostname is derived from the app name, and you will be typing it a lot.

When it fails.

| Symptom | Cause and fix | | --- | --- | | Build fails on useSearchParams | Both play routes read the query string. Each must be split into an inner component wrapped in <Suspense fallback={...}> by the exported page. Next 14 fails the build otherwise. | | Deploy succeeds but the URL times out | The process is listening on the wrong port. Check that start passes -p and that nothing hardcodes 3000. | | Blank white page in production | A component that touches window or localStorage outside an effect. Every read must happen inside useEffect, and every page and canvas component needs "use client" at the top. | | Fonts fall back to system | next/font needs network access at build time to fetch and inline the font files. Check the build log. | | The ring rotates the bar's contents with it | You animated a transform on the ring. Animate the registered --aurora-angle custom property instead. | | Glow looks tiny on a big monitor | Expected. The bloom is in absolute pixels. Push Glow spread up, that is what the range to 4 is for. | | Settings sliders do nothing after an upgrade | An old stored object is missing new keys. loadState must spread DEFAULT_SETTINGS under the parsed settings on every read. |

16. Acceptance checklist

Walk this on the running app. Every line is observable, which is the point of it. It is written against the defaults and against all three modes, so if you shipped a different palette, fewer sliders or Prompts mode only, skip the lines that do not apply and keep the ones that describe behaviour. Lines 8 to 12 and line 34 are the ones worth caring about most: they are the manual send and the port binding.

  1. / shows a 260px left rail with tabs Prompts, Titles, Video, a + New script button, and one seeded script named for a demo, showing 1 beat under it.
  2. The right pane shows one beat card, Beat 1, with a prompt textarea already containing the seeded prompt, plus collapsed add response (optional) and show overrides toggles.
  3. The settings panel below shows Aspect ratio set to 9:16, Prompt size 93%, Typing speed 310, Thinking pause 900, Response stream 60, Between beats 800, Glow speed 0.50x, Glow spread 0.94, Glow intensity 1.00x, and a five row keyboard shortcut list ending in Esc: exit play mode.
  4. Drag Glow spread to its far right and the readout says 4.00, not 1.00.
  5. Edit the script name, reload the page, and the new name is still there. That proves the 250ms debounced autosave and the localStorage round trip.
  6. Click Play. The whole viewport goes black with a portrait canvas letterboxed in it, and one rounded bar sitting exactly in the vertical centre with a soft multi coloured bloom behind it. The bar is already visible, its caret is blinking, and there is no hint text and no fade in from black.
  7. The bar's bottom row reads, left to right: a bare +, a hand icon with a chevron, a part filled circle, 5.5 in white, Medium in grey, another chevron; then on the right a microphone and a white circle holding a black up arrow.
  8. Press Enter. The prompt types itself in one character at a time with visibly uneven timing, not a metronome. The bar grows taller as the text wraps, and the icon row stays directly under the last line rather than pinned to a fixed bottom edge.
  9. Press Space while it is still typing. The rest of the text appears instantly, and it does not send.
  10. Wait. The bar holds the full text with the caret blinking, indefinitely. Nothing auto advances. Time thirty seconds and it is still sitting there.
  11. Press Enter. The send button visibly compresses, then the whole bar blurs, fades, lifts slightly and scales up as it leaves, over roughly half a second. The frame is then fully black for a beat.
  12. On a single beat script the canvas returns to the clean idle frame with the bar visible again, and it does not loop.
  13. Add a second beat with text, and a third beat that has response text. Play through: beats 1 and 2 send straight after Enter, beat 3 shows italic thinking... inside the bar first.
  14. In Play mode Right arrow jumps forward a beat, Left arrow back, R returns to the clean idle frame, Esc returns to the editor.
  15. Set Aspect ratio to 16:9 and re enter Play. The canvas is now landscape and the bar is still dead centre.
  16. Drag Prompt size to 60%. The bar and its bloom shrink together as one unit and stay centred, leaving a wide black margin all round.
  17. /titles shows one seeded card. Its Play button is disabled if you clear the Title field and enabled again as soon as you type in it.
  18. Title Play opens on a completely clean black frame with only a tiny Press Enter to reveal line, bottom centred, in dim grey.
  19. Press Enter. A bloom fades up behind the centre and the headline scales in from small and blurred, overshoots slightly past full size, and settles back without snapping. It then keeps swaying gently side to side in 3D, fastest through centre, slowest at the extremes.
  20. Press Enter again. The subtitle fades and rises 14px into place under the headline.
  21. Set Description reveal to Auto (timed) and Auto reveal delay to 300. Press R, then one Enter. The subtitle now arrives by itself, quickly.
  22. Set 3D depth to 3D hint. The headline gains a short dark extrusion under the glyphs. It is subtle. If it looks like blocky 3D lettering, you have overdone it.
  23. Set Pivot amount to 0. The Pivot speed slider goes dim and disabled, and the headline sits perfectly still.
  24. /video shows a dashed drop zone reading Drop a screen recording or image, or click to choose.
  25. Drop a PNG on it. A live preview appears immediately, showing the image floating over the aurora with rounded corners, a faint light edge and a deep soft shadow beneath it, drifting slowly sideways and breathing in and out. The left rail now shows the file name and its size in MB.
  26. Drag Screen size past 100%. The image grows past the canvas edges and stays centred. It does not slide off to one side.
  27. Switch Background to Black. The bloom disappears and all three glow sliders go dim and disabled.
  28. Set Sway, Side movement and Zoom all to 0. Motion speed goes dim, and the screen holds perfectly still in its tilted pose.
  29. Hit Record. The same composition fills the viewport as a fullscreen overlay. Esc closes it back to the editor.
  30. Drop an MP4 instead. It autoplays, silently, and loops. Switch Playback to Play once and it stops at the end. In the fullscreen overlay Space pauses and resumes and R restarts it.
  31. Reload /video. The settings are all still there, and the clip is gone, with the drop zone back. That is intended.
  32. reset defaults in any panel restores every value in section 10.2, including the ones belonging to the other two modes.
  33. npm run typecheck and npm run lint are clean. npm run build succeeds.
  34. PORT=4321 npm start after a build serves the app on port 4321.

17. Build order, in three passes

Build this in passes, not in one sitting. A practical note on the length of this document: you can paste section 1 on its own, build stage 1 from it, and only then paste or refer back to the rest. Section 1 is written to stand alone for exactly that reason, and stage 1 below needs almost nothing else.

Stage 1: one bar, typing and sending, deployed

The smallest thing that is recognisably this app is Prompts mode only. One script, beats, a bar that types and sends on Enter, on a black canvas. No Titles mode, no Video mode, and only the three or four sliders you will actually drag. Get it deployed and reachable at a URL before you build anything else, then film something with it. That is a finished, useful tool on its own.

  1. Scaffold. create-next-app with TypeScript, Tailwind, App Router, no src/ directory. Versions from section 5 if you want a known good set. Set up the colour tokens and the two font families, and app/layout.tsx with both next/font loaders, dark metadata, and the mono font on the body.
  2. Types and storage. lib/types.ts with Beat, Script, Settings and DEFAULT_SETTINGS cut down to only the settings you are shipping, then lib/storage.ts with loadState, saveState, the id generator, the factories, the seed, and the defaults backfill from section 2. Getting this right first is what stops the settings panel from fighting you later.
  3. lib/typing.ts. wpmToMsPerChar, jitteredMs, and an abortable sleep that resolves on abort rather than rejecting. The abortable sleep is what makes jumping beats and exiting mid animation clean.
  4. The editor shell. / with the rail, the script list, the beat list, and the debounced autosave. Confirm the reload round trip works before you write a single line of animation.
  5. The aurora and the bar, statically. All the on camera CSS from section 11 with hardcoded text in the bar and no state machine at all, until it looks right on a black background. This is the part that decides whether the whole thing works, so spend the time here and look at it fullscreen.
  6. PlayCanvas and the phase machine. The six phases from section 6.2, an AbortController per beat, the promise that the ready phase awaits and that only a keypress resolves, and the keyboard handler for Enter and Space. Wire the Play button and /play, with the <Suspense> wrapper from section 2.
  7. Three sliders and an aspect toggle. Typing speed, bar size, glow. Live value next to each label. Skip the rest for now.
  8. Deploy. Set the start script with the -p ${PORT:-8080} binding, write .env.example and the README note about localStorage being per browser, and push it out. Then open the URL, fullscreen it, and record a take. You will learn more from thirty seconds of footage than from another hour of building.

Stage 2: the rest of the core brief

Whatever from section 1 you still want, roughly in this order.

  1. The settings you found yourself wanting while filming with stage 1. Thinking pause, between beat feel, whatever the footage asked for. Add them because a take made you want them, not because section 10.2 lists them.
  2. Beat plumbing. Optional response text driving the thinking... beat, per beat speed overrides, reordering, duplicate and delete, arrow key beat jumping and R to restart.
  3. Titles mode. /titles, /title-play, the three step machine, the pop in and the pivot CSS, its own settings panel. Separable from everything else, so this is a clean standalone chunk of work.
  4. Video mode. /video, the drop zone and the object URL lifecycle, one canvas component driving both the live preview and the fullscreen record overlay, the nested drift, zoom and rotate wrappers, its own panel. Also fully separable.

Stage 3: polish and feel

  1. Feel. Go back through section 11 with real footage next to you. The jitter range, the send blur, the black hold length, the pop in curve, the glow rotation speed. This is where the app stops looking like a mock up.
  2. The small stuff. Disabled states on dependent sliders, window.confirm on both deletes, hover reveal on the list row buttons, the hidden play canvas scrollbar, user-select: none on the canvases, reset defaults, the shortcut lists at the bottom of each panel, the favicon.
  3. Defensive reads. Unknown settings keys backfilled, retired keys deleted, a parse failure falling back to a freshly seeded state, quota errors on save swallowed silently.

Defer or skip entirely: the response streaming path. Shiki, ResponseBubble, PromptBubble and ThinkingDots belong to an earlier chat transcript design and nothing renders them. Skip them. Only build them if you actually want a transcript mode, in which case it is a fourth mode rather than something bolted onto the prompt bar. Same for betweenBeatsMs and streamCps: they exist only so old saved states stay valid, so on a fresh build leave them out.

Do not build: accounts, sharing, a backend, cloud sync, a real AI integration, a built in video recorder, or an export to MP4. The operator already has a screen recorder, and every one of those additions turns a tool that opens instantly into one that needs a login.

18. Hard won facts and gotchas

Reference material for when something goes wrong, not part of the build sequence. Everything here cost somebody time to discover and none of it is derivable from a framework doc. Skip it on the way through and come back when a symptom matches.

A leftover baseline offset is what breaks vertical centring. The bar was once positioned with top: 55% to leave room for content below it. When the layout changed, that 55% survived on the wrapper, and the result was a bar that sat correctly at some line counts and prompt scales and visibly off centre at others, which is a maddening bug to chase because it looks intermittent. Centring is top: 50% with transform: translate(-50%, -50%) and nothing else. If the bar is off centre, look for a second offset rather than adjusting the first one.

The bar must be a flex column with a gap, not a fixed bottom icon row. Text on top, the control row underneath, the two separated by a gap. If you pin the icon row to the bottom edge of a bar whose height is driven by its text, a one line prompt leaves a visible dead band between the text and the icons, and it only appears at the shortest prompts, so it survives testing with realistic content.

Do not fade the canvas in from black on entry. An earlier version faded the whole composition up when the play route mounted. It made the first frame of every take unusable, because the operator starts the screen recorder before pressing Enter and the fade is already over or half over by then. Render the bar fully visible in the idle phase with the aurora already rotating and the caret blinking, so Enter types into a bar that is already sitting there, with no flicker and no remount.

Delete retired settings keys, do not try to convert them. The prompt bar was once positioned with a promptHeadroom value, a translateY offset, and that was replaced by promptScale, a uniform scale. The two are not equivalent, so there is no honest conversion, and a clever migration produces a stored value that is wrong in a way the operator cannot see. loadState deletes the retired key and lets the new setting take its default. Renaming a setting is cheap. Reinterpreting one is not.

The outer bloom is the one aurora layer that can rotate with a transform. The ring hugging the bar must animate the registered --aurora-angle property, because the ring has the bar's contents inside it and a transform would spin them too. The outer bloom has nothing inside it, so a plain transform: rotate on it is correct and cheaper. Do not conclude from the ring rule that every rotating layer needs a registered property.

Highlight a fenced code block only once its closing fence has arrived. If you build any streaming text path with syntax highlighting, highlighting a half arrived block makes the colours flash as the tokeniser reinterprets the same characters. Wait for the closing fence, or for the stream to finish.

A purely client side app is a valid platform deployment. No API routes, no server actions, no database, no runtime fetch, and it still deploys and passes a health check, because / returns 200 immediately with a shell that then hydrates. No Dockerfile is needed either, since there are no system packages to install. If a platform guide implies you need a backend or a container image, that guidance is aimed at apps that have server side work to do.

Injected URL variables are not always the public address. This app never needs to know its own address, so the point is moot for the build as specified. If you extend it into something that does, be aware that an injected variable like APP_URL can carry the internal hostname the platform's web runner uses rather than the address a browser can reach. That makes it fine for service to service callbacks and wrong for anything a human has to open or click. Build user facing absolute URLs in the browser from window.location.origin instead.