RepoFlow is a dual-stack application that allows non-coders to interact with open-source repositories through a Codex-style assistant. The system clones repositories, analyzes their structure using an LLM, and generates clickable UI tasks for users to perform code modifications without direct coding.
- Python 3.13+
- Node.js 18+
- Git
- Google API Key (for Gemini AI)
git clone <your-repo-url>
cd TerraBytes---RepoFlow- Go to Google AI Studio
- Create a new API key
- Copy the API key for the next step
cd backend
# Create and activate virtual environment
python -m venv venv
# Windows
venv\Scripts\activate
# macOS/Linux
source venv/bin/activate
# Install dependencies
pip install -r requirements.txtCreate a .env file in the backend/ directory:
# backend/.env
GOOGLE_API_KEY=your_actual_api_key_hereyour_actual_api_key_here with your actual Google API key.
cd ../client
# Install dependencies
npm installcd backend
# Make sure virtual environment is activated
uvicorn main:app --reloadBackend will run on: http://localhost:8000
cd client
npm run devFrontend will run on: http://localhost:5173
- Open
http://localhost:5173in your browser - Enter a GitHub repository URL
- Wait for the system to clone and analyze the repository
- Select a workspace to begin RAG-powered chat
- Chat with the repository using natural language
POST /api/receive-repo- Clone and process repositoryPOST /api/get-workspaces- Retrieve available workspacesPOST /api/select-workspace- Initialize RAG for selected filesPOST /api/chat- RAG-powered chat queriesGET /api/check-workspaces- Check workspace processing statusGET /api/check-rag-ready- Check RAG system readiness
backend/
├── core/ # Core business logic (config, database, RAG engine, security)
├── models/ # Pydantic models for API requests/responses
├── routers/ # API route handlers organized by functionality
├── schemas/ # Database schemas and data structures
├── main.py # FastAPI application entry point with CORS and API endpoints
├── repoProcessor.py # Repository cloning and tree structure generation
├── gemini.py # Gemini API integration for LLM analysis
├── smartChunking.py # Document chunking for RAG vector database
├── requirements.txt # Python dependencies
└── pyproject.toml # Project configuration
client/
├── src/
│ ├── App.jsx # Main React application component
│ ├── ChatPage.jsx # RAG-powered chat interface
│ ├── WorkSpace.jsx # Workspace selection and management
│ └── RepoLink.jsx # Repository URL input component
├── package.json # Node.js dependencies
└── vite.config.js # Vite configuration
1. "GOOGLE_API_KEY not found" error:
- Ensure
.envfile exists inbackend/directory - Verify API key is correct and active
2. "Module not found" errors:
- Ensure virtual environment is activated
- Run
pip install -r requirements.txtagain
3. "Port already in use" errors:
- Backend: Change port with
uvicorn main:app --reload --port 8001 - Frontend: Vite will automatically suggest alternative ports
4. Frontend can't connect to backend:
- Ensure backend is running on
http://localhost:8000 - Check CORS settings in
main.py
If you encounter persistent issues:
# Backend
cd backend
rm -rf venv
rm -rf cloned_repos
rm -rf vector_db_chunks
rm workspace.json tree_structure.txt
python -m venv venv
# Activate venv and reinstall requirements
# Frontend
cd client
rm -rf node_modules
npm install- Temporary files (
cloned_repos/,vector_db_chunks/, etc.) are automatically cleaned up when the backend stops - API key is currently hardcoded in
main.py:29- this will be moved to environment variables - Vector database is rebuilt each time you select a new workspace
__init__.pyfiles make folders into Python packages for easier imports
Backend: Python/FastAPI with LlamaIndex RAG system
Frontend: React/Vite with Bootstrap UI
AI: Google Gemini for embeddings and chat responses
Vector Store: FAISS for document similarity search
For issues or questions, please check the troubleshooting section above or contact the development team.