A responsive, print-ready Curriculum Vitae web application built with React 19, TypeScript 7, and Vite 8, featuring strict build-time isolation between public demo data and private personal data, runtime schema validation, and deterministic build-time PDF generation via Typst.
- Dual-Profile Architecture (
publicvsprivate):- Public Mode (Default / Cloud / CI): Bundles the tracked demo CV (
src/assets/data/cvData.json— Vincent van Gogh) and public assets only (img/,icons/header/,icons/work/,icons/school/). Private directories (_img/,icons/_work/,icons/_school/) and local JSON datasets are completely excluded from the production bundle. - Private Mode (Local Development & Local Print): Driven by
.env.local(VITE_CV_PROFILE=privateandVITE_CV_DATA_FILE=cvData.revised.json), resolving gitignored personal JSON data and assets from underscore-prefixed folders.
- Public Mode (Default / Cloud / CI): Bundles the tracked demo CV (
- Runtime Schema Validation:
- Strict runtime contract enforcement in
src/utils/validateCvData.tsverifying all dataset sections (header,work,education,languages,skills,legal) across both languages (ItalianoandEnglish) before execution or PDF generation.
- Strict runtime contract enforcement in
- Deterministic Typst PDF Pipeline:
- Powered by
@myriaddreamin/typst-ts-node-compilerandtypst/cv.typ, precompiling all 4 PDF variants (cv-italiano-photo.pdf,cv-italiano-nophoto.pdf,cv-english-photo.pdf,cv-english-nophoto.pdf) during Vite'sbuildStart()hook intopublic/pdf/and copied todist/pdf/. - Calibrated for precise 2-page A4 output on the revised profile with clean vector flag badges (
typst/flags.typ). - Direct UI download button (
📥) dynamically routed to the current language and photo toggle state.
- Powered by
- Native Print Flow: Styled with
@media printrules for browser-based print-to-PDF (🖨️), automatic light-theme enforcement during printing, and granular page-break controls. - Theme Management: Supports
light,dark, andsystemmodes with zero-FOUC inline initialization,localStoragepersistence, and cross-tab synchronization. - Bilingual Support: Instant switching between
ItalianoandEnglishwith localized ARIA labels and<html lang>synchronization. - Toolchain: Pinned to Node.js
26.13.1and pnpm11.21.0, linted withoxlint, and formatted withoxfmt.
Copy .env.example to .env.local for local private usage:
VITE_CV_PROFILE=private
VITE_CV_DATA_FILE=cvData.revised.jsonpnpm dev: Starts the Vite development server (uses.env.localif present; regenerates PDFs topublic/pdf/).pnpm dev:public: Forces the development server to load the public demo profile (cvData.json).pnpm build: Type-checks, generates public PDFs, and builds the public production bundle intodist/.pnpm build:private: Type-checks, generates private PDFs, and builds the private bundle intodist/.pnpm generate:pdf: Manually compiles the 4 public PDF variants viascripts/pdfGenerator.ts.pnpm generate:pdf:private: Manually compiles the 4 private PDF variants viascripts/pdfGenerator.ts --private.pnpm lint: Runsoxlintacross the codebase (react,typescript,unicorn,jsx-a11yplugins).pnpm format: Formats project files usingoxfmt.pnpm format:check: Verifies formatting compliance usingoxfmt --check.pnpm preview: Locally previews the production build.