DevAssistAI is a GenAI-powered developer assistant that supports code generation, debugging, code explanation, and document-based Q&A using RAG.
- Backend: FastAPI, Python
- LLM: Gemini API
- RAG: ChromaDB, LangChain-ready architecture
- Database: SQLite for query and latency logging
- Frontend: Streamlit
- Deployment-ready: AWS-compatible backend structure
- Generate production-style code from natural language prompts
- Debug code snippets and error logs
- Explain unfamiliar code in simple language
- Upload documents and ask grounded questions using RAG
- Store query logs and latency metrics in SQLite
- Clean Streamlit UI for quick demos
DevAssistAI/
├── backend/
│ ├── main.py
│ ├── llm.py
│ ├── rag.py
│ ├── db.py
│ ├── config.py
│ └── schemas.py
├── frontend/
│ └── app.py
├── data/
├── tests/
├── .env.example
├── .gitignore
├── requirements.txt
└── README.md
git clone https://github.com/YOUR_USERNAME/DevAssistAI.git
cd DevAssistAIpython -m venv .venv
source .venv/bin/activateFor Windows:
.venv\Scripts\activatepip install -r requirements.txtcp .env.example .envThen edit .env:
GEMINI_API_KEY=your_gemini_api_key_here
DATABASE_URL=sqlite:///./devassist.db
CHROMA_DIR=./chromadb_store
MODEL_NAME=gemini-1.5-flash
BACKEND_URL=http://localhost:8000uvicorn backend.main:app --reloadBackend will run at:
http://localhost:8000
API docs:
http://localhost:8000/docs
Open a new terminal:
source .venv/bin/activate
streamlit run frontend/app.pyFrontend will run at:
http://localhost:8501
| Endpoint | Method | Purpose |
|---|---|---|
/generate |
POST | Generate code from a prompt |
/debug |
POST | Debug code or error logs |
/explain |
POST | Explain code |
/rag/upload |
POST | Upload and ingest documents |
/rag/query |
POST | Ask questions from uploaded documents |
/logs |
GET | View query logs and latency |