Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CodeSage

CodeSage is an AI-powered Repository Intelligence Platform that helps developers understand software repositories using natural language. Instead of manually exploring files, users can upload a project and ask questions about the codebase to receive AI-generated answers based on the repository content.

Features

  • Upload software repositories in ZIP format
  • Automatic repository extraction and indexing
  • Semantic code search using vector embeddings
  • AI-powered question answering
  • Repository summary generation
  • Repository analysis
  • Conversation memory for follow-up questions
  • Displays source files used to generate answers

Tech Stack

Frontend

  • React
  • Vite
  • Axios
  • React Markdown
  • React Syntax Highlighter

Backend

  • FastAPI
  • Python

AI

  • DeepSeek Chat (via OpenRouter)
  • Sentence Transformers (all-MiniLM-L6-v2)

Database

  • SQLite
  • ChromaDB

Project Structure

CodeSage │ ├── backend │ ├── api │ ├── services │ ├── data │ └── main.py │ ├── frontend │ ├── src │ ├── components │ └── App.jsx │ └── codesage.db

How It Works

  1. Upload a repository in ZIP format.
  2. The repository is extracted and processed.
  3. Source files are divided into smaller chunks.
  4. Sentence Transformers generate embeddings for each chunk.
  5. Embeddings are stored in ChromaDB.
  6. When a user asks a question, CodeSage retrieves the most relevant code snippets.
  7. DeepSeek generates an answer using the retrieved context.
  8. The response is displayed along with the source files used.

Backend

cd backend

python -m venv venv

# Windows
venv\Scripts\activate

pip install -r requirements.txt

uvicorn main:app --reload

Frontend

cd frontend

npm install

npm run dev

API Endpoints

Method Endpoint Description
POST /upload Upload a repository
GET /repositories Get uploaded repositories
GET /chat Ask questions about a repository

Example Questions

  • What does this repository do?
  • Explain the upload workflow.
  • Which file handles repository uploads?
  • How are embeddings generated?
  • What frameworks are used in this project?
  • Analyze this repository.

Future Enhancements

  • Support multiple LLM providers
  • Repository comparison
  • Code dependency visualization
  • Multi-language repository support
  • User authentication
  • Export chat history

Author

Rubashree

B.Tech Information Technology

License

This project is developed for educational purposes.

About

AI-powered Repository Intelligence Platform

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages