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

+5 -1
View File
@@ -36,4 +36,8 @@ dist-ssr
# Generated code (spec-v5): src/types/content-ids.ts is produced by # Generated code (spec-v5): src/types/content-ids.ts is produced by
# scripts/generate-content-types.ts from src/data/*.json on predev/prebuild/prepare. # scripts/generate-content-types.ts from src/data/*.json on predev/prebuild/prepare.
/src/types/content-ids.ts /src/types/content-ids.ts
# Raw screen footage for the captured video variant (spec-v7-intro-video §6):
# local material only — the rendered public/media/*.mp4 is the committed artifact.
/video/inputs/*.mp4
+18 -7
View File
@@ -15,6 +15,7 @@ Personal engineering portfolio — multi-page SPA built with React + TypeScript
| Animation | motion ^14.0.0 (`motion/react` ESM entrypoint) | | Animation | motion ^14.0.0 (`motion/react` ESM entrypoint) |
| Linter | Oxlint 1 (`plugins: react, typescript, oxc`) | | Linter | Oxlint 1 (`plugins: react, typescript, oxc`) |
| Resume generation | playwright ^1.64.0, tsx ^4.23.15 | | Resume generation | playwright ^1.64.0, tsx ^4.23.15 |
| Video rendering | Remotion ^4 — standalone workspace member `video/`; the SPA never imports it |
| Package manager | pnpm | | Package manager | pnpm |
## Commands ## Commands
@@ -30,6 +31,7 @@ Personal engineering portfolio — multi-page SPA built with React + TypeScript
| `pnpm generate:ids` | Regenerate `src/types/content-ids.ts` from the structure documents (also run by `predev` / `prebuild` / `prepare`) | | `pnpm generate:ids` | Regenerate `src/types/content-ids.ts` from the structure documents (also run by `predev` / `prebuild` / `prepare`) |
| `pnpm sitemap` | Regenerate `dist/sitemap.xml` + `dist/robots.txt` on its own (also run by `pnpm build`) | | `pnpm sitemap` | Regenerate `dist/sitemap.xml` + `dist/robots.txt` on its own (also run by `pnpm build`) |
| `pnpm preview` | Preview production build locally | | `pnpm preview` | Preview production build locally |
| `pnpm --dir video render` | Render the `/how-it-works` intro video → `public/media/how-it-works.mp4` (standalone Remotion project in `video/`, spec-v7) |
## Routing ## Routing
@@ -37,7 +39,7 @@ Personal engineering portfolio — multi-page SPA built with React + TypeScript
- Layout: `<Navigation>` (top) → `<main id="main-content">` → `<Footer>` (bottom) - Layout: `<Navigation>` (top) → `<main id="main-content">` → `<Footer>` (bottom)
- All internal navigation MUST use `<Link>`/`<NavLink>`, never `<a href>` (causes full page reload) - All internal navigation MUST use `<Link>`/`<NavLink>`, never `<a href>` (causes full page reload)
- Footer internal links also use `<Link>`; external links (GitHub, LinkedIn, email) keep `<a>` with `target="_blank"` - Footer internal links also use `<Link>`; external links (GitHub, LinkedIn, email) keep `<a>` with `target="_blank"`
- Route-level splitting: `HomePage` is imported eagerly because it owns the LCP; the other six pages load through `React.lazy` inside one `<Suspense fallback={null}>` boundary in `App.tsx`. Pages export named components, so each factory maps the named export to `default` - Route-level splitting: `HomePage` is imported eagerly because it owns the LCP; the other seven pages load through `React.lazy` inside one `<Suspense fallback={null}>` boundary in `App.tsx`. Pages export named components, so each factory maps the named export to `default`
## Pages ## Pages
@@ -50,6 +52,7 @@ Personal engineering portfolio — multi-page SPA built with React + TypeScript
| `/projects/:id` | `ProjectDetailPage` | Single project | | `/projects/:id` | `ProjectDetailPage` | Single project |
| `/contact` | `ContactPage` | Contact info | | `/contact` | `ContactPage` | Contact info |
| `/philosophy` | `PhilosophyPage` | Engineering philosophy | | `/philosophy` | `PhilosophyPage` | Engineering philosophy |
| `/how-it-works` | `HowItWorksPage` | Intro video: git-backed content, live editing, CI deploy |
## Theming ## Theming
@@ -74,20 +77,20 @@ Content is split once, at authoring time, into language-neutral **structure docu
- `src/data/skills.json` + `skills.ts` loader — skill groups: `{id, skills}`; group titles are text - `src/data/skills.json` + `skills.ts` loader — skill groups: `{id, skills}`; group titles are text
- `src/data/experience.json` + `experience.ts` loader — work history: id / location / logo / optional `variant: 'current' | 'gap'` (timeline decoration: live node / career break); company, duration, titles and responsibilities are text — the VI document carries localized dates ("11/2026 – nay") and company labels, en overrides with the originals, proper nouns identical per language - `src/data/experience.json` + `experience.ts` loader — work history: id / location / logo / optional `variant: 'current' | 'gap'` (timeline decoration: live node / career break); company, duration, titles and responsibilities are text — the VI document carries localized dates ("11/2026 – nay") and company labels, en overrides with the originals, proper nouns identical per language
- `src/data/projects.json` + `projects.ts` loader — cards: category / technologies / featured / `sections[].{id, type}`; titles, summaries, role, metrics and section prose are text (role follows the owner's EN title convention; metrics are localized) - `src/data/projects.json` + `projects.ts` loader — cards: category / technologies / featured / `sections[].{id, type}`; titles, summaries, role, metrics and section prose are text (role follows the owner's EN title convention; metrics are localized)
- `src/i18n/locales/{vi,en}/content/{profile,skills,experience,projects}.json` — all content text, one file per entity, keyed by the structure ids; the `profile` record is fixed-keyed (`name`, `title`, `bio`, `subtitle`, `tldr`, `tagline`, `currentInterests`, `roles`, `philosophyQuotes`, `philosophy.<id>.{title, description, keywords}`); `src/i18n/locales/{vi,en}/ui/{group}.json` — 14 chrome groups (`navigation`, `footer`, `social`, `hero`, `about`, `expertise`, `experience`, `projects`, `projectDetail`, `contact`, `philosophy`, `resume`, `edit`, `common`), in each language (nav group labels, Mode options, language names `langEn` / `langVi`, action labels, social `aria-label`s, the resume's section labels, edit-mode labels) — person text never lives here; `src/i18n/index.ts` merges both trees back into the same `UI`/`CONTENT` records and asserts the merge against the group lists — a group dropped in the split is a load-time error, never a silent omission - `src/i18n/locales/{vi,en}/content/{profile,skills,experience,projects}.json` — all content text, one file per entity, keyed by the structure ids; the `profile` record is fixed-keyed (`name`, `title`, `bio`, `subtitle`, `tldr`, `tagline`, `currentInterests`, `roles`, `philosophyQuotes`, `philosophy.<id>.{title, description, keywords}`); `src/i18n/locales/{vi,en}/ui/{group}.json` — 15 chrome groups (`navigation`, `footer`, `social`, `hero`, `about`, `expertise`, `experience`, `projects`, `projectDetail`, `contact`, `philosophy`, `howItWorks`, `resume`, `edit`, `common`), in each language (nav group labels, Mode options, language names `langEn` / `langVi`, action labels, social `aria-label`s, the resume's section labels, edit-mode labels) — person text never lives here; `src/i18n/index.ts` merges both trees back into the same `UI`/`CONTENT` records and asserts the merge against the group lists — a group dropped in the split is a load-time error, never a silent omission
- Content ids and the category values a project uses are **generated**, never hand-maintained (spec: `docs/design/specs/v5/spec-v5-generated-content-ids.md`): `scripts/generate-content-types.ts` reads the four structure documents and writes `src/types/content-ids.ts` (gitignored) under `predev` / `prebuild` / `prepare`; `src/types/index.ts` re-exports those unions type-only and keeps only the code-owned ones (`Language`, `Palette`, `SocialId`, `PageId`, manifest types). A content add or delete touches JSON only — a text entry left behind by a deleted record is a `tsc` error (`TS2741`), never a stale union member — and a category with no label in either language is a validator error naming both `ui/projects.json` files (rule 7) - Content ids and the category values a project uses are **generated**, never hand-maintained (spec: `docs/design/specs/v5/spec-v5-generated-content-ids.md`): `scripts/generate-content-types.ts` reads the four structure documents and writes `src/types/content-ids.ts` (gitignored) under `predev` / `prebuild` / `prepare`; `src/types/index.ts` re-exports those unions type-only and keeps only the code-owned ones (`Language`, `Palette`, `SocialId`, `PageId`, manifest types). A content add or delete touches JSON only — a text entry left behind by a deleted record is a `tsc` error (`TS2741`), never a stale union member — and a category with no label in either language is a validator error naming both `ui/projects.json` files (rule 7)
- `src/data/pages/{home,about,experience,projects,project-detail,contact,philosophy,resume}.json` + `pages.ts` loader — per-route manifests: which entity fields the page renders (`fields[]`; `*` = every field the record id owns) and which UI groups it reads; `src/types/index.ts` carries `PageId` / `PageManifestClaim` / `PageManifest`. A manifest describes the whole page, chrome included — the footer renders `profile.name` on every route, so every manifest claims it. The validator enforces: no unknown entity, no unknown UI group, no unresolvable field path, **no orphan text field** (every text leaf in the content documents is claimed by at least one manifest), no missing manifest for a route in `src/data/navigation.ts` plus `/projects/:id` - `src/data/pages/{home,about,experience,projects,project-detail,contact,philosophy,how-it-works,resume}.json` + `pages.ts` loader — per-route manifests: which entity fields the page renders (`fields[]`; `*` = every field the record id owns) and which UI groups it reads; `src/types/index.ts` carries `PageId` / `PageManifestClaim` / `PageManifest`. A manifest describes the whole page, chrome included — the footer renders `profile.name` on every route, so every manifest claims it. The validator enforces: no unknown entity, no unknown UI group, no unresolvable field path, **no orphan text field** (every text leaf in the content documents is claimed by at least one manifest), no missing manifest for a route in `src/data/navigation.ts` plus `/projects/:id`
- `src/i18n/index.ts` — load + validate + join ONCE at module load; exports `UI` and `CONTENT` as `Record<Language, Resolved…>`; `src/i18n/dict-types.ts` carries the document types; `src/i18n/validate.ts` + `scripts/validate-content.ts` enforce the cross-document rules (orphan or missing keys, HTML markup in text values, the manifest rules above) — a malformed document fails `pnpm build`, CI, and the browser load, never a silent half-render - `src/i18n/index.ts` — load + validate + join ONCE at module load; exports `UI` and `CONTENT` as `Record<Language, Resolved…>`; `src/i18n/dict-types.ts` carries the document types; `src/i18n/validate.ts` + `scripts/validate-content.ts` enforce the cross-document rules (orphan or missing keys, HTML markup in text values, the manifest rules above) — a malformed document fails `pnpm build`, CI, and the browser load, never a silent half-render
- `src/i18n/provider.tsx` — `I18nProvider` wraps the app; components consume `const { ui: s, content: c } = useI18n()`: `s` is the chrome of the current language, `c` the joined records (`c.profile`, `c.skillGroups`, `c.experiences`, `c.projects`). There is no `field()` and no `*En` field pair anymore - `src/i18n/provider.tsx` — `I18nProvider` wraps the app; components consume `const { ui: s, content: c } = useI18n()`: `s` is the chrome of the current language, `c` the joined records (`c.profile`, `c.skillGroups`, `c.experiences`, `c.projects`). There is no `field()` and no `*En` field pair anymore
- Translation is a JSON edit, never a component edit; a new language is a new locale directory plus one `Language` union member - Translation is a JSON edit, never a component edit; a new language is a new locale directory plus one `Language` union member
- `src/data/resume.ts` — resume availability, supported languages, URL generation, and `resumeQr` (the `{id, file, label}` descriptors the resume header renders as QR codes) - `src/data/resume.ts` — resume availability, supported languages, URL generation, and `resumeQr` (the `{id, file, label}` descriptors the resume header renders as QR codes)
- `src/data/navigation.ts` — `navPaths` (bar + sheet order: Home, About, Experience, Projects, Contact, Philosophy), `footerPaths` - `src/data/navigation.ts` — `navPaths` (bar + sheet order: Home, About, Experience, Projects, Contact, Philosophy, How it works), `footerPaths`
- `src/data/social.ts` — social tiles as `{id, href, external}` (github, linkedin, email, telegram); `email` is a `mailto:` link with `external: false`, so it renders no `target`/`rel` - `src/data/social.ts` — social tiles as `{id, href, external}` (github, linkedin, email, telegram); `email` is a `mailto:` link with `external: false`, so it renders no `target`/`rel`
- `src/data/palettes.ts`, `src/data/site.ts` — code config, not content: `siteUrl` (the canonical origin) and `siteName` are read from the environment (`SITE_URL` / `SITE_NAME` — CI variables in production, the uncommitted local `.env` in development; unset → the build fails with an error naming the variable); every absolute URL the site publishes — canonical, Open Graph, JSON-LD, `robots.txt`, `sitemap.xml` — derives from it - `src/data/palettes.ts`, `src/data/site.ts` — code config, not content: `siteUrl` (the canonical origin) and `siteName` are read from the environment (`SITE_URL` / `SITE_NAME` — CI variables in production, the uncommitted local `.env` in development; unset → the build fails with an error naming the variable); every absolute URL the site publishes — canonical, Open Graph, JSON-LD, `robots.txt`, `sitemap.xml` — derives from it
## Live Edit Mode (`?edit`, v4) ## Live Edit Mode (`?edit`, v4)
- Entry and persistence: any route with `?edit` — `MaybeEditMode` in `App.tsx` lazy-mounts `EditModeShell` (its own chunk; visitors never load edit code) when the query is present **or** the session flag is set. The mode is a session, not a URL state: while it is active every route change re-attaches `?edit` (a replace-navigation in `EditModeShell`), so clicking any link keeps edit mode and a reload reopens it — only the EditBar's Exit returns to the visitor site (it clears the flag, which unmounts the shell, and strips the query). The shell's initialization runs once per mount (entry URL from a ref, `stripEditQuery` reads `window.location`), so navigation never re-authenticates, re-fetches, or re-restores the draft. The shell authenticates, reads the live branch documents the current route needs (see the next bullet), and re-wraps the tree in an `I18nProvider` override — the seven routes ARE the preview - Entry and persistence: any route with `?edit` — `MaybeEditMode` in `App.tsx` lazy-mounts `EditModeShell` (its own chunk; visitors never load edit code) when the query is present **or** the session flag is set. The mode is a session, not a URL state: while it is active every route change re-attaches `?edit` (a replace-navigation in `EditModeShell`), so clicking any link keeps edit mode and a reload reopens it — only the EditBar's Exit returns to the visitor site (it clears the flag, which unmounts the shell, and strips the query). The shell's initialization runs once per mount (entry URL from a ref, `stripEditQuery` reads `window.location`), so navigation never re-authenticates, re-fetches, or re-restores the draft. The shell authenticates, reads the live branch documents the current route needs (see the next bullet), and re-wraps the tree in an `I18nProvider` override — the eight routes ARE the preview
- Document scope (`src/i18n/edit-scope.ts`): the documents a session reads come from the page manifests, never from component code — a claim names a joined record, and an entity owns its structure document plus its two text documents, which are always read as one unit (a half-loaded entity would make the validator compare a live document against a bundled one). Entry = the entry route's scope plus anything a restored draft already touched (those need a real blob sha). A route change reads only the documents still missing — each is adopted through `DraftStore.adoptBase`, which refuses a document the draft has already changed — and the category labels only where a project renders. A document still on its bundled baseline is never PUT over the branch: `saveDraft` sees the empty sha, reads the branch, and hands it to the conflict flow. The bundled copy stays the offline fallback, never a silent substitute for a live read - Document scope (`src/i18n/edit-scope.ts`): the documents a session reads come from the page manifests, never from component code — a claim names a joined record, and an entity owns its structure document plus its two text documents, which are always read as one unit (a half-loaded entity would make the validator compare a live document against a bundled one). Entry = the entry route's scope plus anything a restored draft already touched (those need a real blob sha). A route change reads only the documents still missing — each is adopted through `DraftStore.adoptBase`, which refuses a document the draft has already changed — and the category labels only where a project renders. A document still on its bundled baseline is never PUT over the branch: `saveDraft` sees the empty sha, reads the branch, and hands it to the conflict flow. The bundled copy stays the offline fallback, never a silent substitute for a live read
- Target branch (spec D10): `?edit=<branch>` reads (`?ref=`) and writes (`branch` in the PUT body) that branch; a bare `?edit` resumes the session's last branch, default `master`. Names are validated against git ref rules in `src/i18n/edit-session.ts` before any request (illegal → exit like a failed auth); the branch is stored beside the session flag. The target branch must already exist — Contents API updates never create branches. Only `master` deploys, so the EditBar shows a merge hint on other branches. `master` carries **no branch protection**: a required-PR rule would refuse the edit-mode PUT (spec-v6 D7) - Target branch (spec D10): `?edit=<branch>` reads (`?ref=`) and writes (`branch` in the PUT body) that branch; a bare `?edit` resumes the session's last branch, default `master`. Names are validated against git ref rules in `src/i18n/edit-session.ts` before any request (illegal → exit like a failed auth); the branch is stored beside the session flag. The target branch must already exist — Contents API updates never create branches. Only `master` deploys, so the EditBar shows a merge hint on other branches. `master` carries **no branch protection**: a required-PR rule would refuse the edit-mode PUT (spec-v6 D7)
@@ -108,12 +111,17 @@ src/
sections/ — Hero, About, Expertise, Experience, Projects, Contact, HeroParticles, DownloadResume (the hero lazer CTA; it gates itself on `resumeAvailable`) sections/ — Hero, About, Expertise, Experience, Projects, Contact, HeroParticles, DownloadResume (the hero lazer CTA; it gates itself on `resumeAvailable`)
ui/ — Badge, Button, ContactLinks, LanguageIcon, ResumeDialog, SectionHeading, SocialLinks, Tag, Typewriter, InView, RollingTextLink, BackToTop, EditableText, TagListEditor, RecordControls, RecordSettings, icons ui/ — Badge, Button, ContactLinks, LanguageIcon, ResumeDialog, SectionHeading, SocialLinks, Tag, Typewriter, InView, RollingTextLink, BackToTop, EditableText, TagListEditor, RecordControls, RecordSettings, icons
data/ — profile, skills, experience, projects (JSON documents + typed loaders), pages (manifest JSON + pages.ts loader), resume, palettes, navigation, social, site (TS modules) data/ — profile, skills, experience, projects (JSON documents + typed loaders), pages (manifest JSON + pages.ts loader), resume, palettes, navigation, social, site (TS modules)
i18n/ — index.ts (loader), dict-types.ts, validate.ts, provider.tsx, draft.ts (DraftStore + save pipeline), edit-scope.ts (manifest-derived read scope), edit-session.ts (`?edit`/flag/branch state, dependency-free), edit-mode.ts (Basic-auth probe), locales/{vi,en}/content/{profile,skills,experience,projects}.json + ui/{group}.json (14 chrome groups) i18n/ — index.ts (loader), dict-types.ts, validate.ts, provider.tsx, draft.ts (DraftStore + save pipeline), edit-scope.ts (manifest-derived read scope), edit-session.ts (`?edit`/flag/branch state, dependency-free), edit-mode.ts (Basic-auth probe), locales/{vi,en}/content/{profile,skills,experience,projects}.json + ui/{group}.json (15 chrome groups)
hooks/ — useTheme.tsx, useLanguage.tsx, useClickOutside.ts, useResumeDialog.ts, useEdit.ts (edit context) hooks/ — useTheme.tsx, useLanguage.tsx, useClickOutside.ts, useResumeDialog.ts, useEdit.ts (edit context)
pages/ — HomePage, AboutPage, ExperiencePage, ProjectsListPage, ProjectDetailPage, PhilosophyPage, ContactPage pages/ — HomePage, AboutPage, ExperiencePage, ProjectsListPage, ProjectDetailPage, PhilosophyPage, ContactPage, HowItWorksPage
types/ — shared TypeScript interfaces; content-ids.ts (generated id unions, gitignored) types/ — shared TypeScript interfaces; content-ids.ts (generated id unions, gitignored)
``` ```
```
video/ # standalone Remotion project (spec-v7-intro-video), a pnpm workspace member — renders public/media/*; never imported by the SPA
└── src/ — index.ts, Root.tsx, Explainer.tsx, timeline.ts (the scene boundaries — source of truth for the chapters + .vtt), kit.tsx, motion.ts, theme.ts, scenes/{Title,DataLayer,LiveEdit,GitStorage,Pipeline,Outro}.tsx
```
## Motion & Animation ## Motion & Animation
- `motion/react` v14 — ESM-first entrypoint (NOT `framer-motion`) - `motion/react` v14 — ESM-first entrypoint (NOT `framer-motion`)
@@ -128,6 +136,7 @@ src/
## External Assets ## External Assets
- `public/media/` — the `/how-it-works` intro video: `how-it-works.mp4`, `how-it-works-poster.jpg`, `how-it-works.{en,vi}.vtt` — generated by `pnpm --dir video render` / `poster`, committed like the resume assets, served with the static build
- `public/fonts/` — Source Sans 3 woff2 (Regular, Medium, Semibold, Bold); used by the resume generator only — the SPA renders `system-ui` - `public/fonts/` — Source Sans 3 woff2 (Regular, Medium, Semibold, Bold); used by the resume generator only — the SPA renders `system-ui`
- `public/resume-template.html` — HTML template for resume PDF generation - `public/resume-template.html` — HTML template for resume PDF generation
- `public/resume-logos/` — official company logo SVGs (Lazada, SAP from Wikimedia Commons), embedded in the resume timeline via `ExperienceEntry.logo` - `public/resume-logos/` — official company logo SVGs (Lazada, SAP from Wikimedia Commons), embedded in the resume timeline via `ExperienceEntry.logo`
@@ -195,6 +204,7 @@ compose.override.yaml
6. **`lazy()` needs a default export:** pages export named components, so each factory must map `{ default: m.XPage }` — a bare `import('@/pages/XPage')` fails `tsc` with `TS2322: Property 'default' is missing`. There is no `src/pages/index.ts` barrel: importing it would pull every route back into the entry chunk 6. **`lazy()` needs a default export:** pages export named components, so each factory must map `{ default: m.XPage }` — a bare `import('@/pages/XPage')` fails `tsc` with `TS2322: Property 'default' is missing`. There is no `src/pages/index.ts` barrel: importing it would pull every route back into the entry chunk
7. **A locked `dist/resume*.pdf` blocks the build:** while a generated PDF is open in a viewer, `pnpm build:resume-all` fails with `EBUSY` on that file and `pnpm build` fails too (vite `emptyDir` → `EPERM`). Close the viewer first 7. **A locked `dist/resume*.pdf` blocks the build:** while a generated PDF is open in a viewer, `pnpm build:resume-all` fails with `EBUSY` on that file and `pnpm build` fails too (vite `emptyDir` → `EPERM`). Close the viewer first
8. **`src/types/content-ids.ts` is generated, not committed:** a fresh checkout has no id unions until a script writes them. `pnpm install` (`prepare`) or `pnpm dev` (`predev`) creates it; before that the IDE reports `Cannot find module './content-ids'`, and `pnpm generate:ids` is the one-off fix. Editing it by hand is pointless — the next `prebuild` overwrites it 8. **`src/types/content-ids.ts` is generated, not committed:** a fresh checkout has no id unions until a script writes them. `pnpm install` (`prepare`) or `pnpm dev` (`predev`) creates it; before that the IDE reports `Cannot find module './content-ids'`, and `pnpm generate:ids` is the one-off fix. Editing it by hand is pointless — the next `prebuild` overwrites it
9. **The video timeline is a four-way contract:** `video/src/timeline.ts` scene boundaries, the `howItWorks.chapters` entries in both `ui/how-it-works.json`, and both `public/media/how-it-works.*.vtt` must match. Change the timeline → re-render, re-cut the captions, update the chapters in the same commit (spec-v7 §2)
## Design Specs ## Design Specs
@@ -210,6 +220,7 @@ All specification documents are in `docs/design/`:
| `specs/v3/spec-v3-*.md` | v3 feature specs (theme colors, theme switch, theme palette switch, palette reference, UI enhancements, mobile navigation, nav & CTA enhancements, nav swatch & hamburger, typography, i18n, resume improvements, resume redesign, review fixes) | | `specs/v3/spec-v3-*.md` | v3 feature specs (theme colors, theme switch, theme palette switch, palette reference, UI enhancements, mobile navigation, nav & CTA enhancements, nav swatch & hamburger, typography, i18n, resume improvements, resume redesign, review fixes) |
| `specs/v4/spec-v4-*.md` | v4 feature specs (i18n locale overlay, git-backed live edit with preview, authenticated Contents-API write path; supersedes v3-i18n Phase 2). `spec-v4-data-organization.md`: per-entity content files, per-page field-level manifests, per-feature-group UI — implemented 2026-10-23 (automated checks pass; browser walkthrough pending). `spec-v4-inline-editing.md`: edit everything on the page (pencil-icon triggers, tag chips, record add/delete/move, settings popover), JSON panel deleted — implemented 2026-10-23; it supersedes live-edit §5.1/§5.4 panel scope. `spec-v4-deploy-infra.md`: pipeline redeploy of the VPS nginx container, Dockge-managed stack (paths-filtered `deploy-infra.yml`, test-before-touch, repo-as-source-of-truth, token-safety rules) + externalizing site identity — `SITE_URL` / `SITE_NAME` as CI Actions variables, `GITEA_TOKEN` + `GITEA_CONTENTS_API` in the stack's single config file `secrets/site_config` — repo side implemented 2026-10-23 (`deploy-infra.yml`, `compose.yaml` secret + entrypoint override, env-driven identity); owner-side variables/config file + first verified run pending | | `specs/v4/spec-v4-*.md` | v4 feature specs (i18n locale overlay, git-backed live edit with preview, authenticated Contents-API write path; supersedes v3-i18n Phase 2). `spec-v4-data-organization.md`: per-entity content files, per-page field-level manifests, per-feature-group UI — implemented 2026-10-23 (automated checks pass; browser walkthrough pending). `spec-v4-inline-editing.md`: edit everything on the page (pencil-icon triggers, tag chips, record add/delete/move, settings popover), JSON panel deleted — implemented 2026-10-23; it supersedes live-edit §5.1/§5.4 panel scope. `spec-v4-deploy-infra.md`: pipeline redeploy of the VPS nginx container, Dockge-managed stack (paths-filtered `deploy-infra.yml`, test-before-touch, repo-as-source-of-truth, token-safety rules) + externalizing site identity — `SITE_URL` / `SITE_NAME` as CI Actions variables, `GITEA_TOKEN` + `GITEA_CONTENTS_API` in the stack's single config file `secrets/site_config` — repo side implemented 2026-10-23 (`deploy-infra.yml`, `compose.yaml` secret + entrypoint override, env-driven identity); owner-side variables/config file + first verified run pending |
| `specs/v5/spec-v5-*.md` | v5 feature specs. `spec-v5-generated-content-ids.md`: the content id unions and the project category values are generated from the structure documents (`scripts/generate-content-types.ts`, run by `predev` / `prebuild` / `prepare`), edit mode writes JSON only, validator rule 7 requires a label for every used category in both languages — implemented 2026-10-24; it supersedes the id-union legs of `spec-v4-live-edit.md` §3.1 | | `specs/v5/spec-v5-*.md` | v5 feature specs. `spec-v5-generated-content-ids.md`: the content id unions and the project category values are generated from the structure documents (`scripts/generate-content-types.ts`, run by `predev` / `prebuild` / `prepare`), edit mode writes JSON only, validator rule 7 requires a label for every used category in both languages — implemented 2026-10-24; it supersedes the id-union legs of `spec-v4-live-edit.md` §3.1 |
|`specs/v7/spec-v7-*.md`|v7 feature specs. `spec-v7-intro-video.md`: the 62-second Remotion-rendered explainer (`video/` workspace member → `public/media/`) shown on the new `/how-it-works` page — route, manifest, `howItWorks` UI group, EN/VI caption tracks, chapter seeking; the optional captured-footage variant awaits owner screen recordings — implemented 2026-10-28 (automated checks pass; browser walkthrough pending)|
|`specs/v6/spec-v6-*.md`|v6 feature specs. `spec-v6-github-actions.md`: both pipelines move to GitHub Actions and the repository becomes GitHub-primary, the write-path values are renamed `CONTENT_API_TOKEN` / `CONTENT_API_BASE` with a `Bearer` upstream header, `draft.ts` learns GitHub's 409 conflict answer, the site keeps its VPS/nginx/Dockge host and its three-job pipeline, and the Basic-auth file leaves the repository — `deploy/htpasswd` is gitignored, the infra job writes it on the VPS from the `HTPASSWD_CONTENT` repository secret (D16, 2026-10-28) — repo side implemented 2026-10-26 (owner-side GitHub variables/secrets, the VPS `secrets/site_config` rewrite and the first verified run are open); it supersedes the CI-host legs of `spec-v4-deploy-infra.md` and the Contents-API status codes of `spec-v4-live-edit.md` §6.1| |`specs/v6/spec-v6-*.md`|v6 feature specs. `spec-v6-github-actions.md`: both pipelines move to GitHub Actions and the repository becomes GitHub-primary, the write-path values are renamed `CONTENT_API_TOKEN` / `CONTENT_API_BASE` with a `Bearer` upstream header, `draft.ts` learns GitHub's 409 conflict answer, the site keeps its VPS/nginx/Dockge host and its three-job pipeline, and the Basic-auth file leaves the repository — `deploy/htpasswd` is gitignored, the infra job writes it on the VPS from the `HTPASSWD_CONTENT` repository secret (D16, 2026-10-28) — repo side implemented 2026-10-26 (owner-side GitHub variables/secrets, the VPS `secrets/site_config` rewrite and the first verified run are open); it supersedes the CI-host legs of `spec-v4-deploy-infra.md` and the Contents-API status codes of `spec-v4-live-edit.md` §6.1|
Read `spec.md` first for product context. Read `spec-v2.md` for current feature scope. Read `spec.md` first for product context. Read `spec-v2.md` for current feature scope.
@@ -0,0 +1,73 @@
# Spec v7 — Intro video & `/how-it-works` page
Status: **implemented 2026-10-28** — repo side complete (video rendered, page integrated, checks green); owner-side open items: browser walkthrough (per project rules the owner verifies in a real browser) and the optional captured-footage variant (§6).
## 1. Goal
A short introduction video that shows how this portfolio works — with emphasis on the two differentiators: **git as the content storage behind live editing** and **automatic deployment through GitHub Actions** — shown on a dedicated `/how-it-works` page.
Decisions (owner-approved 2026-10-28):
|Decision|Choice|
|---|---|
|Production|Remotion hybrid — Remotion-authored diagram/title scenes; real screen footage as an optional `captured` variant|
|Placement|Dedicated `/how-it-works` page (route + manifest + nav entry), not a homepage section|
|Audio|Captions only — burned-in on-screen text + EN/VI `.vtt` tracks; no voiceover|
## 2. The video
`video/` is a standalone pnpm workspace member (Remotion 4 + React 19 + zod 4). The SPA never imports it; its only output is the committed media in `public/media/`.
- 1920×1080 @ 30 fps, 1860 frames = **62 s**, H.264 CRF 23 → 1.5 MB, `+faststart` via Remotion defaults.
- Visual language mirrors the site's dark palette (`src/index.css` `:root` values copied into `video/src/theme.ts` — the project cannot import site CSS).
- Timeline source of truth: `video/src/timeline.ts` (`SCENES`). The chapter list in the `howItWorks` UI group and both `.vtt` tracks mirror these boundaries; changing the timeline means updating all four.
|Scene|Frames|Seconds|Content|
|---|---|---|---|
|Title|0–165|0–5.5|"This site's CMS is a git repository."|
|DataLayer|165–420|5.5–14|Structure documents + per-language dictionaries + manifests → joined once at build time → bilingual rendered page|
|LiveEdit|420–960|14–32|`?edit` typed into the URL → Basic-auth dialog → inline heading edit → save bar: PUT contents/projects.json, commit on branch, 409 → three-way rebase|
|GitStorage|960–1290|32–43|Repository file tree with the edited JSON highlighted, commit diff card, master/preview-branch graph, `?edit=preview`, merge = publish|
|Pipeline|1290–1650|43–55|push → master → build · resume · deploy job cards lighting in sequence, infra guard card (deploy-infra.yml), updated live page|
|Outro|1650–1860|55–62|"Edit on the live site. Stored in git. Live on merge to master."|
**Scene composition** (reviewed 2026-10-28 from rendered stills; the first render hugged every diagram to the right edge): each scene's visual group is centered on x=960 inside a strict band — title row y 80–175 (left), visual band y ~200–760 (centered), bullet row y 790+ (left). The four groups span x 420–1500 (DataLayer), 580–1340 (LiveEdit stage), 480–1410 (GitStorage), 465–1455 (Pipeline). Same review fixed: absolute stage anchors in LiveEdit wrapped by a positioned div, never by `Fade` (Fade's `transform` becomes the containing block and anchors them after the skeleton); repository tree rows at 14px so no line wraps or overflows the panel; the "merge = publish" badge moved clear of the merge curve; the infra card widened to 440px.
## 3. Render commands
```sh
pnpm --dir video render # public/media/how-it-works.mp4
pnpm --dir video poster # public/media/how-it-works-poster.jpg (title-card frame)
pnpm --dir video studio # interactive preview
pnpm --dir video render-captured # with video/inputs/take-*.mp4 present (§6)
```
`pnpm-workspace.yaml` gained `packages: [video]` so `pnpm install` inside `video/` resolves against this lockfile instead of walking up and ignoring the member. CI install behavior is unchanged (the deploy jobs install the workspace root's own dependencies; `video/` adds only dev-time weight locally).
## 4. Page and data plumbing
- Route `/how-it-works`, lazy like the other non-LCP pages (`App.tsx`), page `src/pages/HowItWorksPage.tsx` (named export, default-mapped factory).
- Manifest `src/data/pages/how-it-works.json`: claims `profile.name` (the footer renders it on every route) and owns the `howItWorks` UI group. Added to `pages.ts`, `MANIFEST_IDS` (validate.ts), `PageId`/`ManifestId` (types).
- UI group 15: `howItWorks` — `heading`, `intro`, `videoAria`, `stepsTitle`, `steps[3]`, `chaptersTitle`, `chapters[6]` — in `src/i18n/locales/{vi,en}/ui/how-it-works.json`; registered in `i18n/index.ts` and `dict-types.ts` (`typeof` the VI file).
- Nav: `/how-it-works` appended to `navPaths`; label key `how-it-works` in both `navigation.json` files. Sitemap picks the route up automatically from `navPaths`.
- Bar width: seven links now share the bar above 1024px; `@media (max-width: 1240px)` drops the link gap 32→22px so the row never overflows near the breakpoint edge. Below 1024px the sheet owns navigation as before.
- Player: `<video controls playsInline preload="none" poster>` + `<track kind="captions">` chosen by the active language (`useLanguage().lang`); chapter chips seek the player. `preload="none"` keeps the video out of the page's LCP path — only the 16:9 box and poster paint with the page.
- CSS: `.how-it-works-video`, `.how-it-works-grid` (3→2→1 columns like the other card grids), `.how-it-works-card`, `.chapter-chip` in `src/App.css`; card text follows the typography tokens (`--text-meta` body, chrome-only 13px mono time).
- `.gitignore`: `video/inputs/*.mp4` — raw Screenity takes are local; the rendered MP4 is the committed artifact.
## 5. Acceptance criteria
- [x] `pnpm build` green: `tsc -b`, vite (HowItWorksPage is its own 2.08 kB chunk), sitemap 9 URLs including `/how-it-works`
- [x] `pnpm validate:content` green (manifest rules cover the new manifest and group)
- [x] `pnpm lint` adds no new warnings (video project type-checks with its own tsconfig and lints clean)
- [x] `pnpm --dir video render` produces `public/media/how-it-works.mp4` (1.5 MB) + poster; poster frame visually verified
- [ ] Browser walkthrough — owner verifies in a real browser (project rule 5)
## 6. Captured variant (open, owner-side)
`video/captured.json` + `--propsFile` flips the LiveEdit and Pipeline stages from animated mocks to real screen recordings (`video/inputs/take-edit.mp4` ≥18 s, `take-pipeline.mp4` ≥12 s; recording instructions in `video/README.md`). The composition is complete; only the two takes are owner-supplied raw material. Re-render afterwards and commit the new MP4.
## 7. Known limits
- The MP4 (1.5 MB) is committed like the resume assets; it deploys with `dist/` through the existing pipeline — no pipeline change was needed.
- On-screen video text is English; the VI experience is the `.vtt` track. A fully VI-typed video would mean a second composition or a language prop — not built.
+2626 -5
View File
File diff suppressed because it is too large. Load diff
+6
View File
@@ -1,2 +1,8 @@
# `video/` is the standalone Remotion project that renders the /how-it-works
# intro video (spec-v7-intro-video). It is a workspace member so `pnpm install`
# inside it resolves against this lockfile instead of walking up and ignoring it;
# the SPA never imports anything from that tree.
packages:
- video
allowBuilds: allowBuilds:
esbuild: true esbuild: true
Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

+19
View File
@@ -0,0 +1,19 @@
WEBVTT
00:00:00.000 --> 00:00:05.400
This site's CMS is a git repository.
00:00:05.500 --> 00:00:13.900
Everything the site shows is a JSON document: structure documents, per-language dictionaries and field manifests — joined once at build time.
00:00:14.000 --> 00:00:31.900
?edit turns the live site into the editor. HTTP Basic at the nginx proxy is the only gate; every save is a commit through the GitHub Contents API.
00:00:32.000 --> 00:00:42.900
Content lives as JSON in the repository: branches are previews, and merging to master publishes.
00:00:43.000 --> 00:00:54.900
Merging to master runs the pipeline — build, resume PDFs, deploy — from commit to live in minutes.
00:00:55.000 --> 00:01:02.000
Edit on the live site. Stored in git. Live on merge to master.
Binary file not shown.
+19
View File
@@ -0,0 +1,19 @@
WEBVTT
00:00:00.000 --> 00:00:05.400
Hệ thống quản trị nội dung của trang này chính là một repository git.
00:00:05.500 --> 00:00:13.900
Mọi thứ trang hiển thị đều là tài liệu JSON: cấu trúc, từ điển theo từng ngôn ngữ và manifest trường — ghép một lần lúc build.
00:00:14.000 --> 00:00:31.900
?edit biến chính trang đang xem thành trình soạn thảo. HTTP Basic ở nginx là cánh cửa duy nhất; mỗi lần lưu là một commit qua GitHub Contents API.
00:00:32.000 --> 00:00:42.900
Nội dung nằm trong repository dưới dạng JSON: nhánh là bản xem trước, merge vào master là công bố.
00:00:43.000 --> 00:00:54.900
Merge vào master chạy pipeline — build, tạo resume PDF, triển khai — từ commit đến khi live chỉ vài phút.
00:00:55.000 --> 00:01:02.000
Sửa ngay trên trang thật. Lưu trong git. Live khi merge vào master.
+103
View File
@@ -70,6 +70,17 @@
list-style: none; list-style: none;
} }
/* Seven links now share the bar above 1024px (the /how-it-works entry joined
the brand group, the controls and six older links). Between 1024 and 1240px
the link gap tightens so the row keeps its 32px rhythm at wide desktop and
never overflows at the breakpoint's lower edge. Below 1024px .nav-menu is
display:none anyway — the sheet owns that range. */
@media (max-width: 1240px) {
.nav-menu {
gap: 22px;
}
}
.nav-link { .nav-link {
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 500;
@@ -2633,3 +2644,95 @@
margin-left: 0; margin-left: 0;
} }
} }
/* ===== How it works — intro video page (spec-v7-intro-video) ===== */
/* The player never loads its bytes until play (preload="none" in the page);
only the 16:9 box and the poster are painted with the page. */
.how-it-works-video {
margin: 24px 0 8px;
}
.how-it-works-video video {
display: block;
width: 100%;
aspect-ratio: 16 / 9;
border: 1px solid var(--border);
border-radius: var(--radius-lg);
background: var(--bg-surface);
}
.how-it-works-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 24px;
margin-top: 24px;
}
.how-it-works-card {
background: var(--bg-surface);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
padding: 24px;
}
.how-it-works-card h4 {
color: var(--accent);
margin-bottom: 10px;
}
.how-it-works-card p {
font-size: var(--text-meta);
line-height: var(--leading-body);
}
.how-it-works-chapters {
list-style: none;
margin: 16px 0 0;
padding: 0;
display: flex;
flex-wrap: wrap;
gap: 10px;
}
/* Chapter chips seek the player — the timeline they name is authored in
video/src/Explainer.tsx; the .vtt tracks mirror the same boundaries. */
.chapter-chip {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 8px 14px;
background: var(--bg-surface);
border: 1px solid var(--border);
border-radius: var(--radius-md);
color: var(--text-secondary);
cursor: pointer;
transition: border-color var(--transition-fast), color var(--transition-fast);
}
.chapter-chip:hover {
border-color: var(--accent);
color: var(--text-primary);
}
.chapter-chip:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
.chapter-time {
font-family: var(--mono);
font-size: 13px;
color: var(--accent);
}
@media (max-width: 1024px) {
.how-it-works-grid {
grid-template-columns: repeat(2, 1fr);
}
}
@media (max-width: 768px) {
.how-it-works-grid {
grid-template-columns: 1fr;
}
}
+3 -1
View File
@@ -10,12 +10,13 @@ import { editRequested, hasEditFlag } from '@/i18n/edit-session'
import { HomePage } from '@/pages/HomePage' import { HomePage } from '@/pages/HomePage'
// HomePage stays eager: it is the landing route and owns the LCP, so its code must // HomePage stays eager: it is the landing route and owns the LCP, so its code must
// already be in the entry chunk. The other six split out and load on navigation. // already be in the entry chunk. The other seven split out and load on navigation.
const AboutPage = lazy(() => import('@/pages/AboutPage').then((m) => ({ default: m.AboutPage }))) const AboutPage = lazy(() => import('@/pages/AboutPage').then((m) => ({ default: m.AboutPage })))
const ExperiencePage = lazy(() => import('@/pages/ExperiencePage').then((m) => ({ default: m.ExperiencePage }))) const ExperiencePage = lazy(() => import('@/pages/ExperiencePage').then((m) => ({ default: m.ExperiencePage })))
const ProjectsListPage = lazy(() => import('@/pages/ProjectsListPage').then((m) => ({ default: m.ProjectsListPage }))) const ProjectsListPage = lazy(() => import('@/pages/ProjectsListPage').then((m) => ({ default: m.ProjectsListPage })))
const ProjectDetailPage = lazy(() => import('@/pages/ProjectDetailPage').then((m) => ({ default: m.ProjectDetailPage }))) const ProjectDetailPage = lazy(() => import('@/pages/ProjectDetailPage').then((m) => ({ default: m.ProjectDetailPage })))
const PhilosophyPage = lazy(() => import('@/pages/PhilosophyPage').then((m) => ({ default: m.PhilosophyPage }))) const PhilosophyPage = lazy(() => import('@/pages/PhilosophyPage').then((m) => ({ default: m.PhilosophyPage })))
const HowItWorksPage = lazy(() => import('@/pages/HowItWorksPage').then((m) => ({ default: m.HowItWorksPage })))
const ContactPage = lazy(() => import('@/pages/ContactPage').then((m) => ({ default: m.ContactPage }))) const ContactPage = lazy(() => import('@/pages/ContactPage').then((m) => ({ default: m.ContactPage })))
@@ -60,6 +61,7 @@ function App() {
<Route path="/projects" element={<ProjectsListPage />} /> <Route path="/projects" element={<ProjectsListPage />} />
<Route path="/projects/:id" element={<ProjectDetailPage />} /> <Route path="/projects/:id" element={<ProjectDetailPage />} />
<Route path="/philosophy" element={<PhilosophyPage />} /> <Route path="/philosophy" element={<PhilosophyPage />} />
<Route path="/how-it-works" element={<HowItWorksPage />} />
<Route path="/contact" element={<ContactPage />} /> <Route path="/contact" element={<ContactPage />} />
</Routes> </Routes>
</Suspense> </Suspense>
+1 -1
View File
@@ -1,3 +1,3 @@
export const navPaths = ['/', '/about', '/experience', '/projects', '/contact', '/philosophy'] as const export const navPaths = ['/', '/about', '/experience', '/projects', '/contact', '/philosophy', '/how-it-works'] as const
export const footerPaths = ['/', '/about', '/projects', '/contact'] as const export const footerPaths = ['/', '/about', '/projects', '/contact'] as const
+2
View File
@@ -9,6 +9,7 @@ import aboutJson from './pages/about.json';
import contactJson from './pages/contact.json'; import contactJson from './pages/contact.json';
import experienceJson from './pages/experience.json'; import experienceJson from './pages/experience.json';
import homeJson from './pages/home.json'; import homeJson from './pages/home.json';
import howItWorksJson from './pages/how-it-works.json';
import philosophyJson from './pages/philosophy.json'; import philosophyJson from './pages/philosophy.json';
import projectDetailJson from './pages/project-detail.json'; import projectDetailJson from './pages/project-detail.json';
import projectsJson from './pages/projects.json'; import projectsJson from './pages/projects.json';
@@ -23,6 +24,7 @@ export const pageManifests: PageManifest[] = [
projectDetailJson, projectDetailJson,
contactJson, contactJson,
philosophyJson, philosophyJson,
howItWorksJson,
resumeJson, resumeJson,
] as PageManifest[]; ] as PageManifest[];
+8
View File
@@ -0,0 +1,8 @@
{
"id": "how-it-works",
"route": "/how-it-works",
"content": [
{ "entity": "profile", "fields": ["name"] }
],
"ui": ["howItWorks"]
}
+2
View File
@@ -20,6 +20,7 @@ import projectsJson from './locales/vi/ui/projects.json';
import contactJson from './locales/vi/ui/contact.json'; import contactJson from './locales/vi/ui/contact.json';
import projectDetailJson from './locales/vi/ui/project-detail.json'; import projectDetailJson from './locales/vi/ui/project-detail.json';
import philosophyJson from './locales/vi/ui/philosophy.json'; import philosophyJson from './locales/vi/ui/philosophy.json';
import howItWorksJson from './locales/vi/ui/how-it-works.json';
import commonJson from './locales/vi/ui/common.json'; import commonJson from './locales/vi/ui/common.json';
import resumeJson from './locales/vi/ui/resume.json'; import resumeJson from './locales/vi/ui/resume.json';
import editJson from './locales/vi/ui/edit.json'; import editJson from './locales/vi/ui/edit.json';
@@ -152,6 +153,7 @@ export type UIDict = {
contact: typeof contactJson; contact: typeof contactJson;
projectDetail: typeof projectDetailJson; projectDetail: typeof projectDetailJson;
philosophy: typeof philosophyJson; philosophy: typeof philosophyJson;
howItWorks: typeof howItWorksJson;
common: typeof commonJson; common: typeof commonJson;
resume: typeof resumeJson; resume: typeof resumeJson;
edit: typeof editJson; edit: typeof editJson;
+4
View File
@@ -24,6 +24,7 @@ import uiProjectsViJson from './locales/vi/ui/projects.json';
import uiContactViJson from './locales/vi/ui/contact.json'; import uiContactViJson from './locales/vi/ui/contact.json';
import uiProjectDetailViJson from './locales/vi/ui/project-detail.json'; import uiProjectDetailViJson from './locales/vi/ui/project-detail.json';
import uiPhilosophyViJson from './locales/vi/ui/philosophy.json'; import uiPhilosophyViJson from './locales/vi/ui/philosophy.json';
import uiHowItWorksViJson from './locales/vi/ui/how-it-works.json';
import uiCommonViJson from './locales/vi/ui/common.json'; import uiCommonViJson from './locales/vi/ui/common.json';
import uiResumeViJson from './locales/vi/ui/resume.json'; import uiResumeViJson from './locales/vi/ui/resume.json';
import uiEditViJson from './locales/vi/ui/edit.json'; import uiEditViJson from './locales/vi/ui/edit.json';
@@ -38,6 +39,7 @@ import uiProjectsEnJson from './locales/en/ui/projects.json';
import uiContactEnJson from './locales/en/ui/contact.json'; import uiContactEnJson from './locales/en/ui/contact.json';
import uiProjectDetailEnJson from './locales/en/ui/project-detail.json'; import uiProjectDetailEnJson from './locales/en/ui/project-detail.json';
import uiPhilosophyEnJson from './locales/en/ui/philosophy.json'; import uiPhilosophyEnJson from './locales/en/ui/philosophy.json';
import uiHowItWorksEnJson from './locales/en/ui/how-it-works.json';
import uiCommonEnJson from './locales/en/ui/common.json'; import uiCommonEnJson from './locales/en/ui/common.json';
import uiResumeEnJson from './locales/en/ui/resume.json'; import uiResumeEnJson from './locales/en/ui/resume.json';
import uiEditEnJson from './locales/en/ui/edit.json'; import uiEditEnJson from './locales/en/ui/edit.json';
@@ -91,6 +93,7 @@ const uiVi: UIDict = {
contact: uiContactViJson, contact: uiContactViJson,
projectDetail: uiProjectDetailViJson, projectDetail: uiProjectDetailViJson,
philosophy: uiPhilosophyViJson, philosophy: uiPhilosophyViJson,
howItWorks: uiHowItWorksViJson,
common: uiCommonViJson, common: uiCommonViJson,
resume: uiResumeViJson, resume: uiResumeViJson,
edit: uiEditViJson, edit: uiEditViJson,
@@ -108,6 +111,7 @@ const uiEn: UIDict = {
contact: uiContactEnJson, contact: uiContactEnJson,
projectDetail: uiProjectDetailEnJson, projectDetail: uiProjectDetailEnJson,
philosophy: uiPhilosophyEnJson, philosophy: uiPhilosophyEnJson,
howItWorks: uiHowItWorksEnJson,
common: uiCommonEnJson, common: uiCommonEnJson,
resume: uiResumeEnJson, resume: uiResumeEnJson,
edit: uiEditEnJson, edit: uiEditEnJson,
+29
View File
@@ -0,0 +1,29 @@
{
"heading": "How this site works",
"intro": "This portfolio has no CMS admin area. The content lives in a git repository, editing happens on the very pages you are looking at, and every merge to master deploys automatically.",
"videoAria": "Introduction video: how the portfolio stores its content in git, edits it live on the site, and deploys through GitHub Actions",
"stepsTitle": "Three moving parts",
"steps": [
{
"title": "Live editing on the real pages",
"body": "Append ?edit to any URL. After an HTTP Basic prompt at the nginx proxy, the page you are looking at becomes the editor: text, tags, records and settings edit in place. Every save becomes a commit to a branch through the GitHub Contents API; on a conflict a three-way rebase keeps your edit."
},
{
"title": "Git is the content store",
"body": "Content is JSON: language-neutral structure documents, per-language text dictionaries and per-page field manifests. Branches are previews — ?edit=preview lets you edit and view a branch before anything reaches master. No database, no admin panel."
},
{
"title": "Merge to master, go live",
"body": "Pushing master triggers the GitHub Actions pipeline: a type-checked build, bilingual resume PDFs, and an rsync deploy to the VPS. Infrastructure changes redeploy the container through their own guarded workflow. From commit to live in minutes."
}
],
"chaptersTitle": "Chapters",
"chapters": [
{ "time": "0:00", "label": "Intro" },
{ "time": "0:05", "label": "Content as documents" },
{ "time": "0:14", "label": "Live editing" },
{ "time": "0:32", "label": "Git as the content store" },
{ "time": "0:43", "label": "Automatic deployment" },
{ "time": "0:55", "label": "Closing" }
]
}
+1
View File
@@ -5,6 +5,7 @@
"experience": "Experience", "experience": "Experience",
"projects": "Projects", "projects": "Projects",
"philosophy": "Philosophy", "philosophy": "Philosophy",
"how-it-works": "How it works",
"contact": "Contact", "contact": "Contact",
"palette": "Theme", "palette": "Theme",
"paletteAria": "Switch theme color", "paletteAria": "Switch theme color",
+29
View File
@@ -0,0 +1,29 @@
{
"heading": "Trang hoạt động như thế nào",
"intro": "Portfolio này không có vùng quản trị CMS. Nội dung nằm trong một repository git, việc chỉnh sửa diễn ra ngay trên trang bạn đang xem, và mỗi lần merge vào master đều tự động triển khai.",
"videoAria": "Video giới thiệu: cách trang lưu nội dung trong git, chỉnh sửa trực tiếp trên site và triển khai tự động qua GitHub Actions",
"stepsTitle": "Ba mảnh ghép",
"steps": [
{
"title": "Chỉnh sửa trực tiếp trên trang thật",
"body": "Thêm ?edit vào bất kỳ URL nào. Sau hộp thoại HTTP Basic ở nginx, chính trang bạn đang xem trở thành trình soạn thảo: văn bản, thẻ, bản ghi và cấu hình chỉnh sửa ngay tại chỗ. Mỗi lần lưu trở thành một commit trên nhánh qua GitHub Contents API; khi có xung đột, bản rebase ba phía giữ lại chỉnh sửa của bạn."
},
{
"title": "Git là kho nội dung",
"body": "Nội dung là các tệp JSON: tài liệu cấu trúc trung lập ngôn ngữ, từ điển văn bản theo từng ngôn ngữ và manifest trường theo từng trang. Nhánh là bản xem trước — ?edit=preview cho phép sửa và xem một nhánh trước khi lên master. Không có database, không có admin panel."
},
{
"title": "Merge vào master, lên site",
"body": "Push vào master kích hoạt pipeline GitHub Actions: build có type-check, tạo resume PDF song ngữ, rsync lên VPS. Thay đổi hạ tầng được tái triển khai bằng workflow riêng có kiểm tra trước. Từ commit đến khi live chỉ vài phút."
}
],
"chaptersTitle": "Các chương",
"chapters": [
{ "time": "0:00", "label": "Giới thiệu" },
{ "time": "0:05", "label": "Nội dung là tài liệu JSON" },
{ "time": "0:14", "label": "Chỉnh sửa trực tiếp" },
{ "time": "0:32", "label": "Git là kho nội dung" },
{ "time": "0:43", "label": "Triển khai tự động" },
{ "time": "0:55", "label": "Kết" }
]
}
+1
View File
@@ -5,6 +5,7 @@
"experience": "Kinh nghiệm", "experience": "Kinh nghiệm",
"projects": "Dự án", "projects": "Dự án",
"philosophy": "Triết lý", "philosophy": "Triết lý",
"how-it-works": "Cách vận hành",
"contact": "Liên hệ", "contact": "Liên hệ",
"palette": "Giao diện", "palette": "Giao diện",
"paletteAria": "Đổi màu giao diện", "paletteAria": "Đổi màu giao diện",
+2 -1
View File
@@ -221,6 +221,7 @@ const MANIFEST_IDS = [
'project-detail', 'project-detail',
'contact', 'contact',
'philosophy', 'philosophy',
'how-it-works',
'resume', 'resume',
] as const; ] as const;
@@ -281,7 +282,7 @@ export function collectManifestIssues(
): ContentIssue[] { ): ContentIssue[] {
const issues: ContentIssue[] = []; const issues: ContentIssue[] = [];
// Rule 1: exactly the seven route manifests plus the synthetic resume // Rule 1: exactly the eight route manifests plus the synthetic resume
// consumer — no orphan or missing manifest. // consumer — no orphan or missing manifest.
const ids: string[] = pageManifests.map((m) => m.id); const ids: string[] = pageManifests.map((m) => m.id);
for (const id of MANIFEST_IDS) { for (const id of MANIFEST_IDS) {
+101
View File
@@ -0,0 +1,101 @@
import { useRef } from 'react'
import { motion } from 'motion/react'
import { SectionHeading } from '@/components/ui/SectionHeading'
import { InView } from '@/components/ui/InView'
import { useI18n } from '@/i18n/provider'
import { useLanguage } from '@/hooks/useLanguage'
// Chapter times are wall-clock strings for the reader ("0:14"); parsing them
// back to seconds is only the seek mechanic. The timeline itself lives in
// video/src/Explainer.tsx and the .vtt tracks mirror it.
function toSeconds(time: string): number {
const [m, s] = time.split(':').map(Number)
return m * 60 + s
}
export function HowItWorksPage() {
const { ui: s } = useI18n()
const { lang } = useLanguage()
const videoRef = useRef<HTMLVideoElement>(null)
const seekTo = (time: string) => {
const video = videoRef.current
if (!video) return
video.currentTime = toSeconds(time)
void video.play()
}
return (
<InView>
<motion.section
className="section container-content"
aria-labelledby="how-it-works-heading"
initial="hidden"
whileInView="visible"
viewport={{ once: true, amount: 0.1 }}
variants={{
hidden: { opacity: 0 },
visible: { opacity: 1, transition: { duration: 0.5 } },
}}
>
<SectionHeading
id="how-it-works-heading"
title={s.howItWorks.heading}
tag={s.howItWorks.heading}
/>
<p className="prose-lede">{s.howItWorks.intro}</p>
<figure className="how-it-works-video">
{/* preload="none" + poster: the video never loads until the visitor
presses play, so it cannot compete with the page's LCP image. */}
<video
ref={videoRef}
controls
playsInline
preload="none"
poster="/media/how-it-works-poster.jpg"
aria-label={s.howItWorks.videoAria}
>
<source src="/media/how-it-works.mp4" type="video/mp4" />
<track
kind="captions"
src={`/media/how-it-works.${lang}.vtt`}
srcLang={lang}
label={lang === 'vi' ? 'Tiếng Việt' : 'English'}
default
/>
</video>
</figure>
<h3 className="subheading">{s.howItWorks.stepsTitle}</h3>
<div className="how-it-works-grid">
{s.howItWorks.steps.map((step, i) => (
<motion.div
key={step.title}
className="how-it-works-card"
initial={{ opacity: 0, y: 24 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true, amount: 0.2 }}
transition={{ duration: 0.45, ease: 'easeOut', delay: i * 0.08 }}
>
<h4>{step.title}</h4>
<p>{step.body}</p>
</motion.div>
))}
</div>
<h3 className="subheading">{s.howItWorks.chaptersTitle}</h3>
<ul className="how-it-works-chapters">
{s.howItWorks.chapters.map((chapter) => (
<li key={chapter.time}>
<button type="button" className="chapter-chip" onClick={() => seekTo(chapter.time)}>
<span className="chapter-time">{chapter.time}</span>
<span className="chapter-label">{chapter.label}</span>
</button>
</li>
))}
</ul>
</motion.section>
</InView>
)
}
+2 -1
View File
@@ -27,7 +27,8 @@ export type PageId =
| 'projects' | 'projects'
| 'project-detail' | 'project-detail'
| 'contact' | 'contact'
| 'philosophy'; | 'philosophy'
| 'how-it-works';
export type ManifestId = PageId | 'resume'; export type ManifestId = PageId | 'resume';
+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"]
}