CodeMind AI is a local-first GitHub repository intelligence MVP. It clones a public repository, identifies semantic code sections, embeds them with sentence-transformers/all-MiniLM-L6-v2, persists them in FAISS, and answers questions with source citations.
- Languages: HTML, Python, TypeScript, Dockerfile, JavaScript, CSS
- Frameworks & Libraries: Docker
GitHub URL -> safe clone -> file scanner -> semantic parser/chunker
-> embeddings -> persisted FAISS index -> retrieval
-> grounded prompt -> Groq / OpenAI / Grok -> answer + citations
The backend uses small provider interfaces for embeddings and LLMs. FaissVectorStore, SentenceTransformerEmbeddings, and OpenAICompatibleProvider can be replaced later with Qdrant/Pinecone, another embedding model, or another model API without changing the API layer.
- Copy
.env.exampleto.envand addGROQ_API_KEY,OPENAI_API_KEY, orXAI_API_KEY. - Run:
docker compose up --buildOpen http://localhost:5173. The backend API and Swagger documentation are available at http://localhost:8000 and http://localhost:8000/docs.
An API key is optional. Without one, retrieval and citations still work, and CodeMind returns the most relevant code sections instead of a generated explanation.
To use Groq, set:
LLM_PROVIDER=groq
GROQ_API_KEY=your-groq-api-key
GROQ_MODEL=llama-3.3-70b-versatileBackend:
python -m venv .venv
.venv/Scripts/activate
pip install -r backend/requirements.txt
uvicorn backend.app:app --reloadFrontend:
cd frontend
npm install
npm run devThe embedding model downloads on the first indexing request. Repository clones, indexes, model cache, and state are stored under backend/repositories, backend/indexes, and backend/data.
POST /clonewith{"repo_url":"https://github.com/owner/repository.git"}POST /indexwith{"repo_id":"..."}; omittingrepo_iduses the active repositoryPOST /askwith{"repo_id":"...","question":"Where is JWT implemented?","top_k":5}GET /health
pip install pytest
pytest backend/testsThe MVP deliberately leaves hybrid search, reranking, dependency graphs, visualizations, private repositories, and multi-repository retrieval as extension points rather than partially implementing them.
CodeMind AI is deployed live on AWS using Elastic Beanstalk (Single Container Docker platform).
For a complete guide of the commands, optimizations, and troubleshooting steps applied during deployment, see AWS_DEPLOYMENT.md.
To deploy any local updates to your live Beanstalk environment:
git add .
git commit -m "Describe updates"
eb deployYou can view logs using:
eb logsAnd open your live app using:
eb open