Prerequisites
Before you begin, ensure you have the following installed on your system:Node.js
Version 20 or higher
Bun
Latest version for package management
Python
Version 3.9 or higher
Quick Start
GitaChat consists of two main components that run independently:- Frontend: Next.js application (port 3000)
- Backend: FastAPI server (port 8000)
Frontend Setup
The frontend is built with Next.js, TypeScript, and uses Clerk for authentication, Supabase for query history, and TanStack Query for data fetching.Configure environment variables
Create a See Environment Variables for detailed configuration.
.env.local file in the frontend/ directory:Start the development server
Backend Setup
The backend uses FastAPI with Python, Sentence Transformers for embeddings, and Pinecone as the vector database.Install dependencies
- FastAPI & Uvicorn: Web framework and ASGI server
- Sentence Transformers: BGE-base-en-v1.5 for embeddings (768-dim)
- Pinecone: Vector database client
- OpenAI: For generating contextual commentary
- SlowAPI: Rate limiting
Configure environment variables
Start the development server
Running Both Services Concurrently
You can use the provided Makefile to run both frontend and backend simultaneously:Verify Your Setup
Frontend Health Check
Open http://localhost:3000 in your browserYou should see the GitaChat homepage
Backend Health Check
Visit http://localhost:8000/healthYou should receive:
{"status": "ok"}Test the Query Endpoint
Once both services are running, you can test the semantic search functionality:Project Structure
Troubleshooting
Port Already in Use
If port 3000 or 8000 is already in use:
Python Module Not Found
Ensure your virtual environment is activated:
CORS Errors
Verify that
BACKEND_URL in frontend .env.local matches your backend URL (default: http://localhost:8000)Model Download Issues
The first backend startup downloads the BGE-base-en-v1.5 model (~400MB). Ensure you have:
- Stable internet connection
- Sufficient disk space
- Patience (may take a few minutes)
Next Steps
Environment Variables
Learn about all required API keys and configuration options
Deployment Guide
Deploy GitaChat to Vercel and Railway