eliaspc2/PersonalCV
Data-driven personal website and CV engine, designed around structured JSON, scalability, and long-term maintainability.
Static Personal Narrative with Admin UI
A 100% static narrative profile site with a built-in configuration interface, designed for hosting on GitHub Pages. This project follows a "No-Backend" architecture, leveraging the GitHub REST API for data persistence.
π― Architecture Overview
The project is built on the concept of Static Frontend as Admin.
- Persistence: Content in
data/cv.json, behavior indata/config.json. - Single Source of Truth: CV content lives in
data/cv.json(structure + values). Config is separate. - Admin Flow: A hidden configuration page (
config.html) allows the user to edit the JSON data and commit changes back to GitHub using a Personal Access Token (PAT). - Security: Access to the config page is obscured (3-click trigger). Write operations require a valid GitHub PAT (stored encrypted in localStorage).
π Project Structure
/
βββ index.html # Public CV (Main view)
βββ config.html # Admin/Config Interface (Private)
βββ SPEC.md # Project Specification (Source of Truth)
βββ RULES.json # Machine-readable invariants
βββ _sources/ # Optional archive (can be empty)
β βββ INDEX.md # Mapping of source documents to data (if used)
βββ data/
β βββ cv.json # Content (structure + values)
β βββ config.json # Behavior/config (paths, theme, meta)
βββ schema/
β βββ cv.schema.json # JSON Schema (validation)
βββ validators/
β βββ schema-validate.js # Schema validation (no backend)
β βββ cv-consistency.js # Cross-field/lang checks
β βββ error-messages.js # Friendly error messages
βββ constants/
β βββ ... # Shared constants (paths, themes, icons)
βββ js/
β βββ cv-render.js # Logic: Renders JSON data to HTML (Read-only)
β βββ config-ui.js # Logic: Handles Form UI and Save triggers
β βββ github-api.js # Logic: Communication with GitHub REST API
β βββ auth-gate.js # Logic: Secret code verification & Token management
β βββ crypto-utils.js # Logic: Encrypted storage helpers
β βββ self-check.js # Logic: Invariant validation for development
βββ css/
β βββ styles.css # Shared aesthetics
βββ assets/ # Static assets
β βββ photos/ # Section images
β βββ icons/ # Favicons/app icons
β βββ downloads/ # Downloadable files
βββ README.md # Main documentation
π§ Core Principles
1. Static Nature
The site works entirely in the browser. There is no server-side code (PHP, Node, etc.). GitHub Pages simply serves the files.
2. Module Contracts (Strict)
To ensure maintainability, modules follow strict rules defined in SPEC.md:
cv-render.jscannot call the GitHub API.github-api.jscannot manipulate the DOM.config-ui.jsmust usegithub-api.jsfor persistence.
3. Data Integrity
Provenance mapping lives in _sources/INDEX.md. The renderer does not enforce visibility rules, so keep sensitive data out of data/cv.json unless you intend it to be public.
Runtime validation is enforced via schema/cv.schema.json + validators/* (critical errors show a fallback UI).
π Limitations & Accepted Risks
- Security by Obscurity: The entry to
config.htmlis hidden (3-click trigger), not fully protected. - Public Logic: All JavaScript logic is visible in the browser. Never hardcode sensitive tokens or passwords in the source.
- Browser-Only: Persistence depends on the user providing a valid GitHub PAT stored encrypted in localStorage.
- GitHub Delay: Changes saved via the Admin UI take 1-3 minutes to reflect on the public site due to GitHub Pages' build process.
π Usage
See WALKTHROUGH.md for detailed instructions on how to set up and use the CV.
See FORK_SETUP.md for a stepβbyβstep guide to forking, GitHub Pages, PAT, OpenAI key, and admin UI access.
β¨ Admin UI Highlights
- Perβsection navigation (nome + Γcone) with SVG icon picker (theme color).
- Image crop/zoom tooling for photo framing.
- Downloads managed inside Contacto with groups and links (viewer inside the site).
- Add new sections using existing templates (visual picker).
- Export/Import bundle (cv + config) via the Admin UI.