Personal Portfolio (Decoupled Frontend)
A high-performance bilingual SSR frontend
What is this project?
The evolution of my portfolio into a fully decoupled (Headless) architecture. Originally built as a monolith, it has been refactored into an ultra-lightweight Backend-for-Frontend (BFF). It securely fetches data via REST APIs from my centralized ERP (CustomBlock) and renders content via SSR for maximum SEO performance.
The Challenge (Architectural Refactoring)
The goal was to separate the presentation layer (UI) from data management (CMS/Database). The main challenge was migrating from a hybrid system to an API-first architecture without downtime, solving CORS policies, dynamic absolute URL resolution for cross-origin media, and strict CSP security.
Tech Stack
- Backend-for-Frontend: Python 3.14, FastAPI, Httpx (Async HTTP Client).
- Frontend: Vanilla JS, Jinja2 SSR templates, CSS custom properties for theming.
- DevOps: Docker, Nginx, GitHub Actions CI/CD, Cloudflare CDN.
- Security: Strict dynamic Content-Security-Policy (CSP), script nonces, Pydantic payload validation.
Key Features
- API-Driven: Zero local databases; all data and media are dynamically consumed via JSON payloads.
- Bilingual (IT/EN): Server-side Language Flattening to reduce client-side logic complexity.
- Dynamic Theming: Native dark/light mode support applied pre-render to eliminate FOUC.
- Asset Optimization: Smart handling of internal vs external routing and secure cross-origin CV downloads.
- Zero-Downtime CI/CD: Automated GitHub Actions pipelines for build and remote deployment.