feat: intro video + /how-it-works page (spec-v7) — Remotion video/ project (62s explainer, centered scene composition), self-hosted MP4 + poster + EN/VI VTT, lazy page + manifest + UI group 15 + nav entry, spec-v7 + AGENTS updates

This commit is contained in:
dong.nguyen committed 2026-10-28 23:12:44 +07:00
1 parent 9124f569fb
commit 7bb7bd68ae
42 files changed
+4039 -17

No files matched your search

+41
View File
@@ -0,0 +1,41 @@
# Intro video — `video/`
Standalone [Remotion](https://remotion.dev) project that renders the
`/how-it-works` explainer. It is a pnpm workspace member but the SPA never
imports it; its only output is the committed media in `public/media/`.
Spec: `docs/design/specs/v7/spec-v7-intro-video.md`.
## Render
```sh
pnpm --dir video render # → public/media/how-it-works.mp4 (captions burned in, no footage needed)
pnpm --dir video poster # → public/media/how-it-works-poster.jpg (title-card frame)
pnpm --dir video studio # interactive preview while tuning timings
```
## Captured variant (screen footage)
The composition has a `captured` input prop. With `--propsFile=captured.json`
the two animated mock-browser stages (scenes 02 and 04) are replaced by real
screen recordings — the intended final polish, recorded with Screenity or any
screen recorder:
| File (drop into `video/inputs/`) | Beat | Minimum length |
|---|---|---|
| `take-edit.mp4` | open the live site → append `?edit` → Basic-auth sign-in → edit one heading inline → Save | 18 s |
| `take-pipeline.mp4` | GitHub Actions run: build → generate-resume → deploy, then the updated live page | 12 s |
Record at 1920×1080, browser zoom 100%, dark theme. Trim so each take starts
clean (no cursor scrubbing). Then:
```sh
pnpm --dir video render-captured
```
Raw takes are gitignored — the rendered MP4 is the committed artifact.
## Timeline (source of truth: `src/Explainer.tsx`)
30 fps · 1860 frames · 62 s. Scene boundaries drive the chapter list and the
`.vtt` caption tracks in `public/media/` — if the timeline changes, those and
the `howItWorks` UI group's chapters must change with it.
+1
View File
@@ -0,0 +1 @@
{ "captured": true }
View File
Whitespace-only changes.
+22
View File
@@ -0,0 +1,22 @@
{
"name": "portfolio-intro-video",
"private": true,
"type": "module",
"description": "Standalone Remotion project for the /how-it-works intro video. Not a site dependency — the SPA never imports this tree.",
"scripts": {
"studio": "remotion studio",
"render": "remotion render src/index.ts Explainer ../public/media/how-it-works.mp4",
"render-captured": "remotion render src/index.ts Explainer ../public/media/how-it-works.mp4 --propsFile=captured.json",
"poster": "remotion still src/index.ts Explainer ../public/media/how-it-works-poster.jpg --frame=60"
},
"dependencies": {
"@remotion/cli": "^4.0.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"remotion": "^4.0.0",
"zod": "^4.5.4"
},
"devDependencies": {
"typescript": "^5.9.0"
}
}
+8
View File
@@ -0,0 +1,8 @@
import { Config } from '@remotion/cli/config';
// Output tuned for a self-hosted web asset: H.264 at CRF 23 keeps the 62-second
// 1080p explainer under ~10 MB, JPEG frames speed up stills and rendering.
Config.setVideoImageFormat('jpeg');
Config.setOverwriteOutput(true);
Config.setCodec('h264');
Config.setCrf(23);
+33
View File
@@ -0,0 +1,33 @@
import React from 'react';
import { AbsoluteFill, Sequence } from 'remotion';
import { DataLayer } from './scenes/DataLayer';
import { GitStorage } from './scenes/GitStorage';
import { LiveEdit } from './scenes/LiveEdit';
import { Outro } from './scenes/Outro';
import { Pipeline } from './scenes/Pipeline';
import { Title } from './scenes/Title';
import { SCENES, type ExplainerProps } from './timeline';
import { theme } from './theme';
export const Explainer: React.FC<ExplainerProps> = ({ captured }) => (
<AbsoluteFill style={{ background: theme.bg }}>
<Sequence durationInFrames={SCENES[0].duration}>
<Title />
</Sequence>
<Sequence from={SCENES[1].from} durationInFrames={SCENES[1].duration}>
<DataLayer />
</Sequence>
<Sequence from={SCENES[2].from} durationInFrames={SCENES[2].duration}>
<LiveEdit captured={captured} />
</Sequence>
<Sequence from={SCENES[3].from} durationInFrames={SCENES[3].duration}>
<GitStorage />
</Sequence>
<Sequence from={SCENES[4].from} durationInFrames={SCENES[4].duration}>
<Pipeline captured={captured} />
</Sequence>
<Sequence from={SCENES[5].from} durationInFrames={SCENES[5].duration}>
<Outro />
</Sequence>
</AbsoluteFill>
);
+19
View File
@@ -0,0 +1,19 @@
import React from 'react';
import { Composition } from 'remotion';
import { Explainer } from './Explainer';
import { TOTAL_FRAMES, explainerProps } from './timeline';
export const RemotionRoot: React.FC = () => (
<>
<Composition
id="Explainer"
component={Explainer}
durationInFrames={TOTAL_FRAMES}
fps={30}
width={1920}
height={1080}
schema={explainerProps}
defaultProps={{ captured: false }}
/>
</>
);
+4
View File
@@ -0,0 +1,4 @@
import { registerRoot } from 'remotion';
import { RemotionRoot } from './Root';
registerRoot(RemotionRoot);
+170
View File
@@ -0,0 +1,170 @@
import React from 'react';
import { useCurrentFrame } from 'remotion';
import { appear } from './motion';
import { theme } from './theme';
export const Fade: React.FC<{ start: number; y?: number; children: React.ReactNode }> = ({
start,
y = 16,
children,
}) => {
const frame = useCurrentFrame();
const p = appear(frame, start);
return (
<div style={{ opacity: p, transform: `translateY(${(1 - p) * y}px)` }}>{children}</div>
);
};
export const SceneChrome: React.FC<{
index: string;
title: string;
bullets: string[];
bulletStart?: number;
}> = ({ index, title, bullets, bulletStart = 60 }) => (
<>
<div style={{ position: 'absolute', top: 80, left: 120 }}>
<Fade start={4}>
<div style={{ fontSize: 20, letterSpacing: '0.22em', color: theme.accent }}>{index}</div>
</Fade>
<Fade start={14} y={20}>
<div style={{ fontSize: 44, fontWeight: 650, color: theme.textPrimary, marginTop: 10 }}>
{title}
</div>
</Fade>
</div>
<div style={{ position: 'absolute', left: 120, bottom: 90, maxWidth: 700 }}>
{bullets.map((b, i) => (
<Fade key={i} start={bulletStart + i * 40}>
<div style={{ display: 'flex', gap: 14, marginBottom: 16 }}>
<span style={{ color: theme.accent, fontSize: 22, lineHeight: 1.45 }}>▸</span>
<span style={{ fontSize: 23, color: theme.textSecondary, lineHeight: 1.45 }}>{b}</span>
</div>
</Fade>
))}
</div>
</>
);
export const Panel: React.FC<{
width: number;
accent?: boolean;
success?: boolean;
children: React.ReactNode;
style?: React.CSSProperties;
}> = ({ width, accent, success, children, style }) => (
<div
style={{
position: 'absolute',
width,
background: theme.surface,
border: `1px solid ${accent ? theme.accent : success ? theme.success : theme.borderStrong}`,
borderRadius: 10,
padding: '16px 20px',
boxShadow: accent ? `0 0 32px ${theme.accentSoft}` : success ? `0 0 32px ${theme.successSoft}` : 'none',
...style,
}}
>
{children}
</div>
);
export const Mono: React.FC<{ children: string; size?: number; color?: string }> = ({
children,
size = 20,
color = theme.textMuted,
}) => (
<span style={{ fontFamily: theme.mono, fontSize: size, color }}>{children}</span>
);
export const Label: React.FC<{ children: string; size?: number; color?: string }> = ({
children,
size = 20,
color = theme.textPrimary,
}) => (
<span style={{ fontSize: size, fontWeight: 600, color }}>{children}</span>
);
// The recurring mock-browser stage. `chrome` is the URL-bar row content; the
// caller animates everything below it.
export const BrowserFrame: React.FC<{
width: number;
height: number;
chrome?: React.ReactNode;
children: React.ReactNode;
style?: React.CSSProperties;
}> = ({ width, height, chrome, children, style }) => (
<div
style={{
position: 'absolute',
width,
height,
borderRadius: 14,
border: `1px solid ${theme.borderStrong}`,
background: theme.bg,
overflow: 'hidden',
display: 'flex',
flexDirection: 'column',
boxShadow: '0 24px 60px rgba(0, 0, 0, 0.45)',
...style,
}}
>
<div
style={{
minHeight: 52,
display: 'flex',
alignItems: 'center',
gap: 10,
padding: '0 16px',
background: theme.elevated,
borderBottom: `1px solid ${theme.border}`,
}}
>
<span style={{ width: 11, height: 11, borderRadius: 6, background: theme.borderStrong }} />
<span style={{ width: 11, height: 11, borderRadius: 6, background: theme.borderStrong }} />
<span style={{ width: 11, height: 11, borderRadius: 6, background: theme.borderStrong }} />
{chrome}
</div>
<div style={{ flex: 1, position: 'relative' }}>{children}</div>
</div>
);
// A paragraph of grey blocks — the universal "rendered page" stand-in.
export const PageSkeleton: React.FC<{ active?: boolean }> = ({ active }) => (
<div style={{ padding: '26px 30px', display: 'flex', flexDirection: 'column', gap: 14 }}>
<div
style={{
width: '55%',
height: 26,
borderRadius: 6,
background: active ? theme.accentTint : '#2c302d',
border: active ? `1px solid ${theme.accent}` : '1px solid transparent',
}}
/>
{[92, 84, 88, 70].map((w, i) => (
<div key={i} style={{ width: `${w}%`, height: 12, borderRadius: 4, background: '#262a27' }} />
))}
</div>
);
export const SceneBackground: React.FC = () => (
<div
style={{
position: 'absolute',
inset: 0,
backgroundImage: `linear-gradient(${theme.grid} 1px, transparent 1px), linear-gradient(90deg, ${theme.grid} 1px, transparent 1px)`,
backgroundSize: '64px 64px',
}}
/>
);
// Arrowhead shared by every connector drawing.
export const ArrowDefs: React.FC = () => (
<defs>
<marker id="arrow" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
<path d="M 0 0 L 10 5 L 0 10 z" fill={theme.textMuted} />
</marker>
<marker id="arrow-accent" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
<path d="M 0 0 L 10 5 L 0 10 z" fill={theme.accent} />
</marker>
</defs>
);
+23
View File
@@ -0,0 +1,23 @@
import { interpolate } from 'remotion';
// Every reveal in the film is the same primitive: a frame window mapped to
// opacity 0→1 with a short rise. Scenes stay consistent because nothing
// hand-rolls its own fade.
export const appear = (frame: number, start: number, duration = 14): number =>
interpolate(frame, [start, start + duration], [0, 1], {
extrapolateLeft: 'clamp',
extrapolateRight: 'clamp',
});
// Frame-driven substring for the typing effects (URLs, commands, edited text).
export const typed = (text: string, frame: number, start: number, charsPerFrame: number): string => {
const n = Math.floor((frame - start) * charsPerFrame);
return text.slice(0, Math.max(0, Math.min(text.length, n)));
};
// Stroke-draw progress for SVG connectors: 1 hides the path, 0 reveals it.
export const drawIn = (frame: number, start: number, duration: number): number =>
interpolate(frame, [start, start + duration], [1, 0], {
extrapolateLeft: 'clamp',
extrapolateRight: 'clamp',
});
+118
View File
@@ -0,0 +1,118 @@
import React from 'react';
import { AbsoluteFill, interpolate, useCurrentFrame } from 'remotion';
import { ArrowDefs, BrowserFrame, Fade, Label, Mono, PageSkeleton, Panel, SceneBackground, SceneChrome } from '../kit';
import { appear, drawIn } from '../motion';
import { theme } from '../theme';
// Composition: the visual group is centered on x=960 inside the band
// y 220–670 — below the title row (y 80–175), above the bullet row (y 840+).
const DOCS = [
{ label: 'Structure', path: 'src/data/*.json', note: 'ids · order · links' },
{ label: 'Text — per language', path: 'src/i18n/locales/{vi,en}/…', note: 'every word, both languages' },
{ label: 'Manifests', path: 'src/data/pages/*.json', note: 'which page renders which field' },
];
export const DataLayer: React.FC = () => {
const frame = useCurrentFrame();
const joinOn = appear(frame, 120);
const pageOn = appear(frame, 175);
const arrowA = drawIn(frame, 95, 35);
const arrowB = drawIn(frame, 150, 35);
const pulse = interpolate(frame % 60, [0, 30, 60], [0, 0.55, 0], { extrapolateLeft: 'clamp', extrapolateRight: 'clamp' });
return (
<AbsoluteFill style={{ background: theme.bg, fontFamily: theme.sans }}>
<SceneBackground />
<SceneChrome
index="01 · CONTENT AS DOCUMENTS"
title="Everything the site shows is a JSON document"
bullets={[
'Structure documents — language-neutral ids and order',
'Per-language dictionaries — EN and VI text, joined at build time',
'Field manifests — a missing key fails the build, never the page',
]}
bulletStart={70}
/>
{DOCS.map((d, i) => (
<Fade key={d.path} start={30 + i * 28} y={22}>
<Panel width={360} style={{ left: 420, top: 220 + i * 165 }}>
<Label size={22}>{d.label}</Label>
<div style={{ marginTop: 8 }}>
<Mono size={18}>{d.path}</Mono>
</div>
<div style={{ marginTop: 6, fontSize: 16, color: theme.textMuted }}>{d.note}</div>
</Panel>
</Fade>
))}
<Fade start={110} y={18}>
<Panel width={240} accent style={{ left: 900, top: 410, textAlign: 'center', background: theme.accentTint }}>
<Label size={24} color={theme.accent}>joined once</Label>
<div style={{ marginTop: 6, fontSize: 16, color: theme.textSecondary }}>at build time</div>
<div
style={{
position: 'absolute',
inset: -4,
borderRadius: 14,
border: `1px solid ${theme.accent}`,
opacity: pulse,
}}
/>
</Panel>
</Fade>
<svg width={1920} height={1080} style={{ position: 'absolute', inset: 0 }}>
<ArrowDefs />
{DOCS.map((_, i) => (
<path
key={i}
d={`M 785 ${280 + i * 165} C 830 ${280 + i * 165}, 845 ${455}, 895 455`}
fill="none"
stroke={theme.textMuted}
strokeWidth={2}
pathLength={1}
strokeDasharray={1}
strokeDashoffset={arrowA}
markerEnd="url(#arrow)"
opacity={0.8}
/>
))}
<path
d="M 1145 455 L 1195 455"
fill="none"
stroke={theme.accent}
strokeWidth={2.5}
pathLength={1}
strokeDasharray={1}
strokeDashoffset={arrowB}
markerEnd="url(#arrow-accent)"
/>
</svg>
<Fade start={165} y={24}>
<BrowserFrame width={300} height={420} style={{ left: 1200, top: 245 }}>
<div style={{ display: 'flex', gap: 8, padding: '14px 16px 0' }}>
{['EN', 'VI'].map((l, i) => (
<span
key={l}
style={{
fontFamily: theme.mono,
fontSize: 14,
padding: '4px 10px',
borderRadius: 6,
border: `1px solid ${i === 0 ? theme.accent : theme.borderStrong}`,
color: i === 0 ? theme.accent : theme.textMuted,
}}
>
{l}
</span>
))}
</div>
<PageSkeleton active={joinOn > 0.5} />
<div style={{ position: 'absolute', left: 0, right: 0, bottom: 0, height: 3, background: theme.accent, opacity: pageOn }} />
</BrowserFrame>
</Fade>
</AbsoluteFill>
);
};
+132
View File
@@ -0,0 +1,132 @@
import React from 'react';
import { AbsoluteFill, interpolate, useCurrentFrame } from 'remotion';
import { ArrowDefs, Fade, Label, Mono, Panel, SceneBackground, SceneChrome } from '../kit';
import { appear, drawIn } from '../motion';
import { theme } from '../theme';
const TREE = [
{ line: '├── src/data/projects.json', hot: false },
{ line: '├── src/data/pages/*.json', hot: false },
{ line: '├── src/i18n/locales/vi/content/projects.json', hot: false },
{ line: '└── src/i18n/locales/en/content/projects.json', hot: true },
];
// Centered group: tree panel 480–950, branch graph 1010–1410 (center 945≈960).
// Vertical band 200–730 — below the title row, above the bullet row.
export const GitStorage: React.FC = () => {
const frame = useCurrentFrame();
const branchDraw = drawIn(frame, 55, 45);
const mergeDraw = drawIn(frame, 130, 45);
const pulse = interpolate(frame % 50, [0, 25, 50], [0, 0.6, 0], { extrapolateLeft: 'clamp', extrapolateRight: 'clamp' });
const commitOn = appear(frame, 180);
return (
<AbsoluteFill style={{ background: theme.bg, fontFamily: theme.sans }}>
<SceneBackground />
<SceneChrome
index="03 · GIT AS THE STORAGE"
title="A content edit is a file edit"
bullets={[
'Drafts live on a branch; master stays the published site',
'A branch preview is a URL: ?edit=preview',
'History, review and rollback come from git, free of charge',
]}
bulletStart={70}
/>
<Panel width={470} style={{ left: 480, top: 200 }}>
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'baseline' }}>
<Label size={18}>the repository</Label>
<Mono size={14} color={theme.textMuted}>main branch view</Mono>
</div>
<div style={{ marginTop: 14, display: 'flex', flexDirection: 'column', gap: 8 }}>
{TREE.map((t, i) => (
<Fade key={t.line} start={25 + i * 20}>
<div
style={{
fontFamily: theme.mono,
fontSize: 14,
padding: '6px 10px',
borderRadius: 6,
whiteSpace: 'nowrap',
color: t.hot ? theme.accent : theme.textSecondary,
background: t.hot ? theme.accentTint : 'transparent',
border: t.hot ? `1px solid ${theme.accent}` : '1px solid transparent',
}}
>
{t.line}
</div>
</Fade>
))}
</div>
</Panel>
<Fade start={170} y={20}>
<Panel width={470} style={{ left: 480, top: 480 }}>
<div style={{ display: 'flex', gap: 10, alignItems: 'center' }}>
<span style={{ width: 12, height: 12, borderRadius: 6, background: theme.accent }} />
<Label size={18} color={theme.accent}>commit: edit projects.json (en)</Label>
</div>
<div style={{ marginTop: 14, fontFamily: theme.mono, fontSize: 15, lineHeight: 1.6 }}>
<div style={{ color: theme.textMuted }}>src/i18n/locales/en/content/projects.json</div>
<div style={{ color: theme.accent }}>− "summary": "Logistics dashboard…"</div>
<div style={{ color: theme.success }}>+ "summary": "Logistics platform…"</div>
<div style={{ color: theme.textMuted }}>1 file changed, 1 insertion(+), 1 deletion(−)</div>
</div>
<div style={{ marginTop: 12, display: 'flex', gap: 10, alignItems: 'center', opacity: commitOn }}>
<span style={{ background: theme.accentTint, border: `1px solid ${theme.accent}`, borderRadius: 6, padding: '4px 10px' }}>
<Label size={15} color={theme.accent}>+1 −1</Label>
</span>
<span style={{ fontSize: 15, color: theme.textMuted }}>the whole diff of a headline change</span>
</div>
</Panel>
</Fade>
<svg width={1920} height={1080} style={{ position: 'absolute', inset: 0 }}>
<ArrowDefs />
<path d="M 1010 680 L 1410 680" fill="none" stroke={theme.borderStrong} strokeWidth={5} />
<path
d="M 1100 680 C 1160 680, 1190 460, 1240 460"
fill="none"
stroke={theme.accent}
strokeWidth={4}
pathLength={1}
strokeDasharray={1}
strokeDashoffset={branchDraw}
/>
<path
d="M 1240 460 C 1300 460, 1320 680, 1370 680"
fill="none"
stroke={theme.success}
strokeWidth={4}
pathLength={1}
strokeDasharray={1}
strokeDashoffset={mergeDraw}
markerEnd="url(#arrow-success)"
/>
<circle cx={1100} cy={680} r={9} fill={theme.borderStrong} />
<circle cx={1240} cy={460} r={11} fill={theme.accent} />
<circle cx={1240} cy={460} r={11 + 12 * pulse} fill="none" stroke={theme.accent} strokeWidth={2} opacity={1 - pulse} />
<circle cx={1370} cy={680} r={11} fill={theme.success} />
</svg>
<Fade start={40}>
<div style={{ position: 'absolute', left: 1110, top: 380, width: 260, textAlign: 'center' }}>
<Label size={18}>preview branch · drafts</Label>
</div>
</Fade>
<Fade start={10}>
<div style={{ position: 'absolute', left: 1010, top: 705 }}>
<Label size={18} color={theme.textMuted}>master · deploys</Label>
</div>
</Fade>
<Fade start={165}>
<div style={{ position: 'absolute', left: 1250, top: 728 }}>
<span style={{ background: 'rgba(107, 184, 134, 0.14)', border: `1px solid ${theme.success}`, borderRadius: 8, padding: '6px 12px' }}>
<Label size={16} color={theme.success}>merge = publish</Label>
</span>
</div>
</Fade>
</AbsoluteFill>
);
};
+173
View File
@@ -0,0 +1,173 @@
import React from 'react';
import { AbsoluteFill, OffthreadVideo, staticFile, useCurrentFrame } from 'remotion';
import { BrowserFrame, Fade, Label, Mono, PageSkeleton, SceneBackground, SceneChrome } from '../kit';
import { appear, typed } from '../motion';
import { theme } from '../theme';
const BASE_URL = 'cv.vugado.com/projects';
const OLD_TEXT = 'Logistics dashboard';
const NEW_TEXT = 'Logistics platform';
const Pencil: React.FC = () => (
<svg width={22} height={22} viewBox="0 0 24 24" fill="none" stroke={theme.accent} strokeWidth={2} strokeLinecap="round" strokeLinejoin="round">
<path d="M4 16.5 14 6.5l3.5 3.5L7.5 20H4v-3.5Z" />
<path d="m12.5 8 3.5 3.5" />
</svg>
);
const Lock: React.FC = () => (
<svg width={26} height={26} viewBox="0 0 24 24" fill="none" stroke={theme.textSecondary} strokeWidth={2} strokeLinecap="round">
<rect x="5" y="11" width="14" height="9" rx="2" />
<path d="M8 11V8a4 4 0 0 1 8 0v3" />
</svg>
);
const Check: React.FC = () => (
<svg width={34} height={34} viewBox="0 0 24 24" fill="none" stroke={theme.success} strokeWidth={2.5} strokeLinecap="round" strokeLinejoin="round">
<circle cx="12" cy="12" r="10" />
<path d="m7.5 12.5 3 3 6-6.5" />
</svg>
);
// The stage is centered on x=960 (580–1340) in the band y 200–760 — below the
// title row, above the bullet row. Absolute anchors inside the stage are
// wrapped by a positioned div, never by Fade: Fade's transform would become
// the containing block and anchor them after the skeleton instead of the stage.
export const LiveEdit: React.FC<{ captured: boolean }> = ({ captured }) => {
const frame = useCurrentFrame();
const url = typed(BASE_URL, frame, 20, 0.55);
const query = typed('?edit', frame, 130, 0.35);
const authIn = appear(frame, 200, 18);
const authOut = 1 - appear(frame, 285, 18);
const typedNew = typed(NEW_TEXT, frame, 345, 0.7);
const saveIn = appear(frame, 445, 20);
const saveLine = typed('Save → PUT contents/projects.json', frame, 450, 1.1);
return (
<AbsoluteFill style={{ background: theme.bg, fontFamily: theme.sans }}>
<SceneBackground />
<SceneChrome
index="02 · LIVE EDITING"
title="?edit turns the live site into the editor"
bullets={[
'The page you are looking at becomes the editor — same components visitors see',
'HTTP Basic at the nginx proxy is the only gate',
'Text, tags, records and settings edit inline on the preview',
'Every save is a commit through the GitHub Contents API',
]}
bulletStart={70}
/>
<BrowserFrame
width={760}
height={560}
style={{ left: 580, top: 200 }}
chrome={
<div style={{ marginLeft: 14, flex: 1, display: 'flex', alignItems: 'center' }}>
<div style={{ background: theme.bg, border: `1px solid ${theme.border}`, borderRadius: 8, padding: '7px 14px', maxWidth: 520 }}>
<Mono size={17} color={theme.textSecondary}>{url}</Mono>
<span style={{ fontFamily: theme.mono, fontSize: 17, color: theme.accent }}>{query}</span>
</div>
</div>
}
>
{captured ? (
<OffthreadVideo
src={staticFile('inputs/take-edit.mp4')}
style={{ position: 'absolute', inset: 0, width: '100%', height: '100%', objectFit: 'cover' }}
/>
) : (
<>
<PageSkeleton active={frame > 300} />
<div style={{ position: 'absolute', left: 30, top: 22 }}>
<Fade start={310}>
<div style={{ display: 'flex', gap: 8, alignItems: 'center' }}>
<span style={{ fontSize: 17, color: theme.textMuted }}>heading</span>
<span style={{ background: theme.accentTint, border: `1px solid ${theme.accent}`, borderRadius: 6, padding: 3 }}>
<Pencil />
</span>
</div>
</Fade>
</div>
<div style={{ position: 'absolute', left: 34, top: 64, height: 26 }}>
<span style={{ fontSize: 22, fontWeight: 650, color: theme.textSecondary, opacity: frame > 335 ? 0 : 1 }}>
{OLD_TEXT}
</span>
<span style={{ position: 'absolute', left: 0, fontSize: 22, fontWeight: 650, color: frame > 420 ? theme.textPrimary : theme.accent }}>
{typedNew}
{frame > 345 && frame < 430 ? <span style={{ color: theme.accent }}>▍</span> : ''}
</span>
</div>
<div style={{ position: 'absolute', left: 0, right: 0, bottom: 0, transform: `translateY(${(1 - saveIn) * 70}px)` }}>
<div style={{ background: theme.elevated, borderTop: `1px solid ${theme.borderStrong}`, padding: '14px 20px' }}>
<div style={{ display: 'flex', alignItems: 'center', gap: 12 }}>
<span style={{ background: theme.accentTint, border: `1px solid ${theme.accent}`, borderRadius: 6, padding: '5px 12px' }}>
<Label size={16} color={theme.accent}>Save</Label>
</span>
<Mono size={16} color={theme.textMuted}>{saveLine}</Mono>
</div>
<Fade start={495}>
<div style={{ display: 'flex', alignItems: 'center', gap: 8, marginTop: 10 }}>
<Check />
<span style={{ fontSize: 17, color: theme.success }}>commit created on branch preview</span>
</div>
</Fade>
<Fade start={512}>
<div style={{ marginTop: 6, fontSize: 15, color: theme.textMuted }}>
conflict 409 → three-way rebase keeps your edit
</div>
</Fade>
</div>
</div>
<div
style={{
position: 'absolute',
inset: 0,
background: 'rgba(10, 12, 10, 0.72)',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
opacity: authIn * authOut,
pointerEvents: 'none',
}}
>
<div style={{ width: 400, background: theme.surface, border: `1px solid ${theme.borderStrong}`, borderRadius: 12, padding: '26px 30px' }}>
<div style={{ display: 'flex', gap: 12, alignItems: 'center' }}>
<Lock />
<div>
<div style={{ fontSize: 15, color: theme.textMuted }}>cv.vugado.com says</div>
<div style={{ fontSize: 21, fontWeight: 650, color: theme.textPrimary }}>Sign in to edit</div>
</div>
</div>
<div style={{ marginTop: 22, display: 'flex', flexDirection: 'column', gap: 12 }}>
<div style={{ height: 38, borderRadius: 8, border: `1px solid ${theme.borderStrong}`, background: theme.bg, padding: '9px 12px' }}>
<Mono size={16} color={theme.textSecondary}>editor</Mono>
</div>
<div style={{ height: 38, borderRadius: 8, border: `1px solid ${theme.borderStrong}`, background: theme.bg, padding: '9px 12px' }}>
<Mono size={16} color={theme.textSecondary}>••••••••</Mono>
</div>
</div>
<Fade start={250}>
<div style={{ marginTop: 18, display: 'flex', justifyContent: 'flex-end' }}>
<span style={{ background: theme.accentTint, border: `1px solid ${theme.accent}`, borderRadius: 8, padding: '8px 18px', fontSize: 17, color: theme.accent, fontWeight: 600 }}>
Sign in
</span>
</div>
</Fade>
<Fade start={262}>
<div style={{ marginTop: 14, display: 'flex', justifyContent: 'center' }}>
<Check />
</div>
</Fade>
</div>
</div>
</>
)}
</BrowserFrame>
</AbsoluteFill>
);
};
+36
View File
@@ -0,0 +1,36 @@
import React from 'react';
import { AbsoluteFill } from 'remotion';
import { Fade, Mono, SceneBackground } from '../kit';
import { theme } from '../theme';
export const Outro: React.FC = () => (
<AbsoluteFill style={{ background: theme.bg, fontFamily: theme.sans, justifyContent: 'center', alignItems: 'center' }}>
<SceneBackground />
<div
style={{
position: 'absolute',
inset: 0,
background: `radial-gradient(1000px 560px at 50% 45%, ${theme.accentSoft}, transparent 70%)`,
}}
/>
<Fade start={20} y={24}>
<div style={{ fontSize: 52, color: theme.textPrimary, fontWeight: 650 }}>Edit on the live site.</div>
</Fade>
<Fade start={55} y={24}>
<div style={{ fontSize: 52, color: theme.textPrimary, fontWeight: 650, marginTop: 18 }}>
Stored in <span style={{ color: theme.accent }}>git</span>.
</div>
</Fade>
<Fade start={90} y={24}>
<div style={{ fontSize: 52, color: theme.textPrimary, fontWeight: 650, marginTop: 18 }}>
Live on merge to <span style={{ color: theme.success }}>master</span>.
</div>
</Fade>
<Fade start={145}>
<div style={{ marginTop: 70, display: 'flex', gap: 26, alignItems: 'baseline' }}>
<Mono size={24} color={theme.accent}>cv.vugado.com</Mono>
<Mono size={20}>github.com/dong-nz/cv</Mono>
</div>
</Fade>
</AbsoluteFill>
);
+109
View File
@@ -0,0 +1,109 @@
import React from 'react';
import { AbsoluteFill, OffthreadVideo, staticFile, useCurrentFrame } from 'remotion';
import { ArrowDefs, BrowserFrame, Fade, Label, Mono, PageSkeleton, Panel, SceneBackground, SceneChrome } from '../kit';
import { appear, drawIn } from '../motion';
import { theme } from '../theme';
const JOBS = [
{ name: 'build', detail: 'tsc + vite → dist/ · sitemap + robots' },
{ name: 'generate-resume', detail: 'Playwright → EN + VI PDFs' },
{ name: 'deploy', detail: 'rsync dist/ → VPS stack' },
];
// Centered group: push + three job cards span 465–1455 (center 960) at y 210–330;
// infra card and browser occupy y 470–790 — above the bullet row (y 840+).
export const Pipeline: React.FC<{ captured: boolean }> = ({ captured }) => {
const frame = useCurrentFrame();
const arrow1 = drawIn(frame, 30, 25);
const arrow2 = drawIn(frame, 75, 25);
const arrow3 = drawIn(frame, 120, 25);
const infraOn = appear(frame, 165);
const deployed = appear(frame, 235);
return (
<AbsoluteFill style={{ background: theme.bg, fontFamily: theme.sans }}>
<SceneBackground />
<SceneChrome
index="04 · AUTO DEPLOYMENT"
title="Merge to master — the pipeline ships it"
bullets={[
'deploy.yml: build · resume PDFs · deploy — three jobs',
'nginx.conf / compose.yaml changes redeploy the stack itself',
'No CMS, no manual upload: push to master is the publish button',
]}
bulletStart={70}
/>
<Fade start={10}>
<Panel width={210} style={{ left: 465, top: 210 }}>
<div style={{ display: 'flex', gap: 10, alignItems: 'center' }}>
<span style={{ width: 12, height: 12, borderRadius: 6, background: theme.success }} />
<Label size={20}>push to master</Label>
</div>
<div style={{ marginTop: 10, fontSize: 15, color: theme.textMuted }}>merge of preview branch</div>
</Panel>
</Fade>
{JOBS.map((j, i) => (
<Fade key={j.name} start={45 + i * 45} y={20}>
<Panel width={230} style={{ left: 705 + i * 260, top: 210 }}>
<div style={{ display: 'flex', gap: 8, alignItems: 'center' }}>
<span style={{ width: 10, height: 10, borderRadius: 5, background: theme.accent }} />
<Mono size={18} color={theme.textPrimary}>{j.name}</Mono>
</div>
<div style={{ marginTop: 8, fontSize: 14, color: theme.textMuted, lineHeight: 1.45 }}>{j.detail}</div>
<div style={{ marginTop: 10, display: 'flex', alignItems: 'center', gap: 8 }}>
<svg width={16} height={16} viewBox="0 0 24 24" fill="none" stroke={theme.success} strokeWidth={3} strokeLinecap="round">
<path d="m5 13 4 4 10-10" />
</svg>
<span style={{ fontSize: 14, color: theme.success }}>passed</span>
</div>
</Panel>
</Fade>
))}
<svg width={1920} height={1080} style={{ position: 'absolute', inset: 0 }}>
<ArrowDefs />
<path d="M 680 265 L 700 265" fill="none" stroke={theme.textMuted} strokeWidth={2} pathLength={1} strokeDasharray={1} strokeDashoffset={arrow1} markerEnd="url(#arrow)" />
<path d="M 940 265 L 960 265" fill="none" stroke={theme.textMuted} strokeWidth={2} pathLength={1} strokeDasharray={1} strokeDashoffset={arrow2} markerEnd="url(#arrow)" />
<path d="M 1200 265 L 1220 265" fill="none" stroke={theme.textMuted} strokeWidth={2} pathLength={1} strokeDasharray={1} strokeDashoffset={arrow3} markerEnd="url(#arrow)" />
<path d="M 1160 340 L 1160 465" fill="none" stroke={theme.accent} strokeWidth={2.5} pathLength={1} strokeDasharray={1} strokeDashoffset={drawIn(frame, 150, 30)} markerEnd="url(#arrow-accent)" />
</svg>
<Fade start={160} y={20}>
<Panel width={440} style={{ left: 465, top: 480, opacity: infraOn }}>
<Label size={18}>infra follows the same rules</Label>
<div style={{ marginTop: 10 }}>
<Mono size={14}>nginx.conf / compose.yaml → deploy-infra.yml</Mono>
</div>
<div style={{ marginTop: 8, fontSize: 15, color: theme.textMuted }}>test nginx -t first, then force-recreate + health probe</div>
</Panel>
</Fade>
<Fade start={225} y={24}>
<BrowserFrame width={460} height={320} style={{ left: 995, top: 470 }}>
{captured ? (
<OffthreadVideo
src={staticFile('inputs/take-pipeline.mp4')}
style={{ position: 'absolute', inset: 0, width: '100%', height: '100%', objectFit: 'cover' }}
/>
) : (
<>
<PageSkeleton active={deployed > 0.5} />
<Fade start={245}>
<div style={{ position: 'absolute', left: 0, right: 0, top: 0, bottom: 0, background: 'rgba(10, 12, 10, 0.62)', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
<div style={{ background: theme.accentTint, border: `1px solid ${theme.accent}`, borderRadius: 10, padding: '14px 22px', display: 'flex', gap: 10, alignItems: 'center' }}>
<svg width={22} height={22} viewBox="0 0 24 24" fill="none" stroke={theme.accent} strokeWidth={2.5} strokeLinecap="round">
<path d="m5 13 4 4 10-10" />
</svg>
<span style={{ fontSize: 20, fontWeight: 650, color: theme.accent }}>updated — new text live</span>
</div>
</div>
</Fade>
</>
)}
</BrowserFrame>
</Fade>
</AbsoluteFill>
);
};
+38
View File
@@ -0,0 +1,38 @@
import React from 'react';
import { AbsoluteFill } from 'remotion';
import { Fade, SceneBackground } from '../kit';
import { theme } from '../theme';
export const Title: React.FC = () => (
<AbsoluteFill style={{ background: theme.bg, fontFamily: theme.sans, justifyContent: 'center', padding: '0 140px' }}>
<SceneBackground />
<div
style={{
position: 'absolute',
inset: 0,
background: `radial-gradient(900px 520px at 76% 28%, ${theme.accentSoft}, transparent 70%)`,
opacity: 0.9,
}}
/>
<Fade start={8}>
<div style={{ color: theme.accent, letterSpacing: '0.18em', fontSize: 22, textTransform: 'uppercase', marginBottom: 30 }}>
cv.vugado.com · how it works
</div>
</Fade>
<Fade start={28} y={26}>
<div style={{ fontSize: 74, lineHeight: 1.14, color: theme.textPrimary, fontWeight: 650, maxWidth: 1300 }}>
This site&apos;s CMS is a <span style={{ color: theme.accent }}>git repository</span>.
</div>
</Fade>
<Fade start={78}>
<div style={{ fontSize: 30, color: theme.textSecondary, marginTop: 36 }}>
Live editing on the real pages · git-backed content · automatic deployment
</div>
</Fade>
<Fade start={125}>
<div style={{ marginTop: 64, color: theme.textMuted, fontSize: 20 }}>
62 seconds · captions only
</div>
</Fade>
</AbsoluteFill>
);
+21
View File
@@ -0,0 +1,21 @@
// The video mirrors the site's dark palette (src/index.css :root block) so the
// explainer looks like the product it explains. Values are copied deliberately:
// this project is standalone and cannot import the site's CSS.
export const theme = {
bg: '#151914',
surface: '#202423',
elevated: '#272a28',
textPrimary: '#f6f5f2',
textSecondary: '#b7aea0',
textMuted: '#8f9a8e',
accent: '#f87171',
accentSoft: 'rgba(248, 113, 113, 0.12)',
accentTint: '#2f1e1a',
border: '#2a3028',
borderStrong: '#3a403a',
success: '#4ade80',
successSoft: 'rgba(74, 222, 128, 0.14)',
grid: 'rgba(246, 245, 242, 0.06)',
sans: "system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
mono: "'JetBrains Mono', 'Fira Code', ui-monospace, monospace",
};
+20
View File
@@ -0,0 +1,20 @@
import { z } from 'zod';
// `captured: true` swaps the animated mock-browser stages for real screen
// footage from video/inputs/ (Screenity exports named per inputs/README.md).
// The default render is fully Remotion-native and needs no footage.
export const explainerProps = z.object({ captured: z.boolean().default(false) }).strict();
export type ExplainerProps = z.infer<typeof explainerProps>;
// Scene timeline (30 fps). These boundaries are the source of truth for the
// chapter list and the .vtt caption tracks on the site page.
export const SCENES = [
{ id: 'title', from: 0, duration: 165 },
{ id: 'data', from: 165, duration: 255 },
{ id: 'edit', from: 420, duration: 540 },
{ id: 'git', from: 960, duration: 330 },
{ id: 'pipeline', from: 1290, duration: 360 },
{ id: 'outro', from: 1650, duration: 210 },
] as const;
export const TOTAL_FRAMES = 1860;
+17
View File
@@ -0,0 +1,17 @@
{
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "bundler",
"jsx": "react-jsx",
"strict": true,
"noEmit": true,
"lib": ["ES2022", "DOM"],
"skipLibCheck": true,
"esModuleInterop": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"forceConsistentCasingInFileNames": true
},
"include": ["src"]
}