A dynamic developer portfolio that turns a raw resume into a conversational, recruiter-friendly experience β powered by Retrieval-Augmented Generation.
π Overview
An AI-driven portfolio platform that automatically transforms a raw resume into a dynamic, interactive developer profile. The system parses structured data from resumes (PDF/DOCX) and generates a fully integrated portfolio UI with an embedded conversational assistant that allows recruiters and visitors to explore experience, projects, and technical skills through natural language queries.
The platform leverages a Retrieval-Augmented Generation (RAG) pipeline to retrieve relevant professional context and produce accurate, context-aware responses in real time. The architecture combines modern frontend frameworks with a scalable backend and vector-based semantic search to deliver an intelligent, conversational representation of a developerβs professional background.
π οΈ Technologies & Stack
Frontend
- Framework: React (TypeScript) managed via Vite
- Styling: Tailwind CSS
- State Management: Zustand, TanStack React Query
- Routing: React Router DOM
- Data Visualization: Recharts
Backend
- Server: Python, FastAPI, Uvicorn
- Database ORM: SQLAlchemy, Alembic
- AI & Processing: OpenAI API, PyPDF, Python-Docx
Database & Infrastructure
- Database: PostgreSQL
- Vector Search:
pgvector extension for embeddings
- Containerization: Docker & Docker Compose (MasterβReplica configuration)
π§ Backend Architecture
The backend is organised into two distinct flows: a one-time ingestion flow that converts a resume into structured, searchable knowledge, and a runtime interaction flow that answers user queries via RAG. Every module emits token-usage and latency metrics into an observability layer that drives continuous cost and quality optimisation.

Resume Ingestion Flow (one-time activity)
- User uploads the resume (PDF / DOCX) through a FastAPI endpoint.
- Raw parser extracts plain text using
PyPDF and python-docx.
- LLM analyser classifies the raw text into pre-configured sub-categories (experience, projects, skills, education, etc.) and splits each into semantic chunks.
- Embeddings are generated for every chunk and persisted in PostgreSQL via the
pgvector extension, indexed with HNSW for fast similarity search.
- UI components are auto-generated β each categorised section maps to a pre-designed portfolio component.
- Manual ingestion is also supported so the developer can append or correct any section after the initial parse.
- Token usage per module is audited end-to-end so the system can be continuously optimised for cost and latency.
User Interaction Flow (runtime)
- User submits a query through the chat terminal.
- An intent classifier runs first β only on a strict match against configured intents does it return a pre-computed response (cheap and instant).
- Otherwise the query is routed to the RAG pipeline: top-k vector retrieval from
pgvector (served from the read replica) β LLM answer composition.
- Industry-standard prompt templates and structured response formats keep output consistent even when source data varies significantly across users.
π» Frontend Architecture & Optimisation
The frontend is built on a lean, typed React stack and is aggressively profiled and tuned for a fast first paint and steady FPS. The diagram below traces the layers from core stack β profiling tools β optimisation strategies β production outcomes.

Stack
React + TypeScript, Vite, TanStack Query (server state), Zustand (client state), Tailwind CSS, Recharts.
- react-scan β surfaces unnecessary re-renders in real time and ensures smooth FPS.
- React Profiler β identifies heavy components and render hotspots.
- Lighthouse β tracks Core Web Vitals (LCP, CLS, TBT).
- rollup-plugin-visualizer β visualises bundle composition and chunk sizes.
Optimisation Strategy
- Manual bundle chunking via custom Rollup options to split vendor and feature boundaries.
- Dynamic / lazy loading with
React.Suspense and error boundaries for both route-level and heavy-component splits.
- Disciplined memoisation β
React.memo, useCallback, useMemo applied strictly across Context layers to eliminate flicker and wasted renders.
- CSS & animation audit β expensive repaints and heavy calculative animations are analysed and replaced with GPU-friendly transforms, verified via
react-scan to maintain a healthy FPS budget.
π Deployment Architecture
The platform is designed to run identically in two environments: a single-command local development stack via Docker Compose, and a cloud production stack on AWS with a managed Postgres provider. The replica topology, migrations, and vector index are the same in both β so what you test locally matches what ships.

Development (local)
- Docker Compose orchestrates the full stack on a shared local network.
- Frontend: Vite dev server with HMR on
:5173.
- Backend: FastAPI + Uvicorn with hot reload on
:8000, Alembic migrations run on startup.
- Database: PostgreSQL master + streaming replica (same topology as prod),
pgvector extension pre-installed.
- AI: direct HTTPS to the OpenAI API.
Production (cloud)
- Custom domain β Cloudflare CDN β AWS CloudFront for edge caching, DDoS protection, and WAF.
- Frontend: React build published to S3 and served through CloudFront with cache-busted, code-split chunks.
- Backend: FastAPI (Uvicorn adapter) deployed to AWS Lambda via Magnus β autoscaling, pay-per-request.
- Database: Neon Postgres as primary (serverless, branchable) with
pgvector + HNSW, plus a live read replica for analytics and RAG retrieval.
- AI: OpenAI API for embeddings and chat completions.
- CI/CD: GitHub β build (Vite) β test β deploy. Frontend syncs to S3 with CloudFront invalidation; backend is packaged and pushed to Lambda via Magnus.
- Observability: CloudWatch logs, metrics, and per-module token / cost tracking.
Shared Guarantees Across Environments
Identical ORM and migrations Β· same read-replica topology Β· HNSW pgvector index Β· audited token usage Β· local β prod behavioural parity.
β‘ Optimisations Summary
- Database Performance: PostgreSQL read replicas (Docker Compose in dev, live replica in prod) offload read-heavy analytics and RAG retrieval from the primary.
- Fast Similarity Search: HNSW indexing on resume chunks enables sub-millisecond semantic vector search without full-table scans.
- Frontend Code Splitting: route-level and heavy-component splits minimise initial bundle size and accelerate first paint.
- React Rendering Discipline:
React.memo, useCallback, useMemo applied strictly across Context layers to eliminate unnecessary re-renders and UI flicker.
- Latency Tuning: structured data pipelines hardened to prevent SQL persistence crashes and to process unstructured chat messages predictably.
- Token Auditing: every service records prompt and completion token usage, feeding a continuous cost- and quality-optimisation loop.
π Repository Layout
.
βββ frontend/ # React + Vite app
βββ backend/ # FastAPI service
βββ infra/ # Docker Compose, deploy scripts
βββ docs/
β βββ backend-architecture.svg
β βββ frontend-architecture.svg
β βββ deployment-architecture.svg
βββ README.md
π Getting Started
# clone
git clone <repo-url> && cd ai-portfolio
# spin up the full dev stack
docker-compose up --build
# frontend β http://localhost:5173
# backend β http://localhost:8000/docs
# postgres β localhost:5432 (replica on :5433)
Built with curiosity, shipped with observability.