Ai-Portfolio-Platform

AI-Powered Interactive Portfolio Platform - SmartFolio

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

Backend

Database & Infrastructure


🧠 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.

Backend Architecture

Resume Ingestion Flow (one-time activity)

  1. User uploads the resume (PDF / DOCX) through a FastAPI endpoint.
  2. Raw parser extracts plain text using PyPDF and python-docx.
  3. LLM analyser classifies the raw text into pre-configured sub-categories (experience, projects, skills, education, etc.) and splits each into semantic chunks.
  4. Embeddings are generated for every chunk and persisted in PostgreSQL via the pgvector extension, indexed with HNSW for fast similarity search.
  5. UI components are auto-generated β€” each categorised section maps to a pre-designed portfolio component.
  6. Manual ingestion is also supported so the developer can append or correct any section after the initial parse.
  7. Token usage per module is audited end-to-end so the system can be continuously optimised for cost and latency.

User Interaction Flow (runtime)

  1. User submits a query through the chat terminal.
  2. An intent classifier runs first β€” only on a strict match against configured intents does it return a pre-computed response (cheap and instant).
  3. Otherwise the query is routed to the RAG pipeline: top-k vector retrieval from pgvector (served from the read replica) β†’ LLM answer composition.
  4. 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.

Frontend Architecture

Stack

React + TypeScript, Vite, TanStack Query (server state), Zustand (client state), Tailwind CSS, Recharts.

Profiling & Analysis Tools

Optimisation Strategy


πŸš€ 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.

Deployment Architecture

Development (local)

Production (cloud)

Shared Guarantees Across Environments

Identical ORM and migrations Β· same read-replica topology Β· HNSW pgvector index Β· audited token usage Β· local ↔ prod behavioural parity.


⚑ Optimisations Summary


πŸ“‚ 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.