Ragfolio is a modern, high-performance personal portfolio featuring an integrated AI Chatbot. It uses RAG (Retrieval-Augmented Generation) to answer questions about your professional experience using your resume as the primary knowledge source.
- Frontend: React, Vite, Tailwind CSS, Framer Motion.
- Backend: FastAPI (Python), Uvicorn.
- AI/RAG: ChromaDB (Vector Store), FastEmbed (Embeddings), Google Gemini Flash 1.5 (LLM).
- Package Management:
uv(Python),npm(Node.js).
Before you begin, ensure you have the following installed:
- Python 3.12+
- uv (Extremely fast Python package manager)
- Node.js & npm
- A Google Gemini API Key (Get it from Google AI Studio)
Create a .env file in the root of the project:
GEMINI_API_KEY=your_api_key_hereAlso, ensure frontend/.env points to the local backend:
VITE_API_BASE_URL=http://localhost:8000/apiThis converts everything in rag/input-data/ into a searchable vector database (recommended: split your info across multiple files, not just a single resume).
uv run rag/create-embeddings.pycd backend
uv run python main.pyBackend runs at http://localhost:8000.
cd frontend
npm install
npm run devFrontend runs at http://localhost:5000 (proxied to port 8000 for /api calls).
This project is optimized for a Unified Deployment on Render (serving both Frontend and Backend from a single Python service).
- Push to GitHub: Ensure all changes are committed and pushed to your repo.
- Create Web Service: In the Render Dashboard, click New + -> Web Service.
- Connect Repository: Select your
ragfoliorepository. - Configuration:
- Runtime:
Python - Build Command:
./render-build.sh - Start Command:
python -m uvicorn backend.main:app --host 0.0.0.0 --port $PORT
- Runtime:
- Advanced / Environment Variables:
- Add
GEMINI_API_KEY:(Your actual key) - Add
PYTHON_VERSION:3.12.0
- Add
- Deploy: Click Create Web Service.
The ./render-build.sh script automatically:
- Builds the React production files into
frontend/dist. - Installs Python dependencies from
requirements.txt. - Runs the RAG ingestion script to prepare the database on the server.
- The FastAPI backend serves the
distfolder as static files while maintaining the/apiendpoints for the chatbot.
- API Prefixing: All backend routes are prefixed with
/apito avoid collisions with frontend routes. - SPA Support: The backend includes a catch-all route that serves
index.htmlfor any non-API path, allowing React Router to work perfectly in production.
git-lrc: Free, Unlimited AI Code Reviews That Run on Commit. Stop bugs before they land.