CodeChat is a full-stack AI repository intelligence platform that helps developers understand, navigate, and interact with software codebases using Retrieval-Augmented Generation (RAG).
Unlike generic AI chatbots, CodeChat performs syntax-aware code parsing, semantic retrieval, and repository-specific contextual reasoning to provide accurate answers about uploaded repositories.
Built with a modern React + FastAPI architecture, the platform supports intelligent repository ingestion, vector-based semantic search, authentication, persistent chat history, and automated repository re-indexing workflows.
- AI-powered repository chat
- Syntax-aware code chunking using AST + Tree-sitter
- Semantic vector search using FAISS
- Repository-specific contextual responses
- Authentication and user-based chat history
- Multi-language repository support
- CI/CD-assisted automatic re-indexing
- Groq-powered ultra-fast LLM responses
- Modular RAG pipeline architecture
- Docker-ready deployment support
Repository → Ingestion → AST/Tree-sitter Chunking
→ Embeddings → FAISS Vector Store
→ Semantic Retrieval → LLM Response
→ React Chat Interface
- React
- Next.js
- TailwindCSS
- FastAPI
- Python
- JWT Authentication
- FAISS
- Sentence Transformers
- AST Parsing
- Tree-sitter
- Groq API
- PostgreSQL / SQLite
- Python 3.12+
- Node.js 18+
- Git
git clone https://github.com/Soorya005/cclatest.git
cd cclatestCodeChat uses Groq Cloud for high-speed inference.
-
Visit: https://console.groq.com
-
Create a free API key
-
Save the key for backend configuration
cd backend
python3 -m venv .venvsource .venv/bin/activate.venv\Scripts\activatepip install -r requirements.txtcp .env.example .envEdit backend/.env:
GROQ_API_KEY=your_groq_api_key
JWT_SECRET_KEY=change-this-in-productionpython create_tables.pyuvicorn app.main:app --reloadBackend runs at:
http://127.0.0.1:8000
Open another terminal:
cd frontend
npm installcp .env.example .env.localEnsure:
NEXT_PUBLIC_API_URL=http://127.0.0.1:8000npm run devFrontend runs at:
http://localhost:3000
-
Open:
http://localhost:3000 -
Register an account
-
Login
-
Add a GitHub repository
-
Start indexing
-
Ask repository-specific questions
CodeChat supports automatic repository re-indexing through GitHub Actions.
Every push to the target repository can automatically trigger background re-indexing.
GitHub Push
↓
GitHub Actions
↓
CodeChat Sync Endpoint
↓
Repository Re-indexing
↓
Updated Vector Database
Run backend:
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000In another terminal:
ngrok http 8000Copy the generated public URL:
https://xxxxx.ngrok-free.app
After logging into CodeChat:
- Add repository URL
- Backend returns:
repository_idsync_api_key
These are required for GitHub Actions integration.
In target repository:
CODECHAT_API_KEY
CODECHAT_URL
CODECHAT_REPO_ID
Use:
.github/workflows/codechat-sync.yml
Triggers:
- Push to
main - Manual workflow execution
Check:
- Backend running on port 8000
- Correct
NEXT_PUBLIC_API_URL - No firewall/proxy blocking
Get API key from:
Update:
backend/.env
Run:
python create_tables.pyUse:
.\run.ps1instead of Linux shell commands.
| Variable | Required | Description |
|---|---|---|
| GROQ_API_KEY | Yes | Groq API key |
| JWT_SECRET_KEY | Yes | JWT signing secret |
| DATABASE_URL | No | Database connection URL |
| NEXT_PUBLIC_API_URL | Yes | Backend API URL |
codechat/
│
├── backend/
├── frontend/
├── .github/workflows/
├── docs/
├── examples/
│
├── README.md
├── LICENSE
├── CONTRIBUTING.md
├── ROADMAP.md
├── .env.example
│
├── run.sh
├── run.ps1
└── docker-compose.yml
- Dependency graph visualization
- Repository architecture mapping
- Agentic repository exploration
- Vulnerability-aware code analysis
- Multi-repository semantic search
- MCP/tool integration support
- Team collaboration features
Contributions are welcome.
- Fork the repository
- Create a feature branch
- Commit changes
- Open a pull request
Please follow clean coding practices and proper documentation standards.
This project is licensed under the MIT License.