AI Codebase Assistant is a Retrieval-Augmented Generation (RAG) application that helps developers understand unfamiliar codebases by answering natural language questions about uploaded project files.
Users can upload a project as a ZIP file, and the application indexes the source code using vector embeddings to generate context-aware responses powered by Google Gemini.
https://ai-codebase-assistant-uu6k.onrender.com/
Note: The application is hosted on Render's free tier. The first request may take 1–2 minutes while the server starts.
- Upload an entire project as a ZIP file
- Automatic extraction and processing of source code
- Semantic search using FAISS vector database
- AI-powered question answering using Google Gemini
- Intelligent question routing
- Answers metadata queries locally
- Uses RAG for conceptual code understanding
- Project overview generation
- Programming language detection
- Project structure explorer
- Referenced source file viewer with syntax highlighting
- Conversation history
- Confidence score for retrieved results
- Streamlit
- Python
- Google Gemini
- LangChain
- FAISS
- Sentence Transformers
- PyPDF
- tiktoken
- python-dotenv
AI-Codebase-Assistant/
│
├── app.py
├── config.py
├── requirements.txt
├── components/
├── services/
├── utils/
├── prompts/
├── assets/
└── uploads/
Clone the repository:
git clone https://github.com/Mahelaka29/AI-Codebase-Assistant.gitMove into the project directory:
cd AI-Codebase-AssistantInstall the required packages:
pip install -r requirements.txtCreate a .env file:
GOOGLE_API_KEY=your_api_keyRun the application:
streamlit run app.py- Upload a project as a ZIP file.
- The application extracts the source code.
- Source files are divided into semantic chunks.
- Sentence Transformers generate vector embeddings.
- Embeddings are stored in a FAISS vector database.
- Relevant code is retrieved based on the user's query.
- Google Gemini generates context-aware answers using the retrieved code.
Metadata-related questions are answered locally without invoking the language model, improving response speed and reducing unnecessary API usage.
- What does this project do?
- Explain the authentication flow.
- Where is the database connection established?
- Describe the project architecture.
- How is user authentication implemented?
- Which files handle API requests?
- Explain this function.
- Where is the main business logic located?
- GitHub repository import
- Multi-repository support
- Conversation memory
- Repository comparison
- Code dependency visualization
- Support for additional language models
- Docker deployment
Mahelaka Bano
LinkedIn: https://linkedin.com/in/mahelakamansoori
GitHub: https://github.com/Mahelaka29