How shashank3876/dev-mind works
DevMind combines a React client and API services with a Python AI backend and Go webhook gateway. Chat requests pass through FastAPI for history, optional retrieval, and streamed LLM output; document ingestion indexes material for retrieval. Separately, GitHub events enter an asynchronous review pipeline, where a worker fetches diffs, generates feedback, and posts comments. The API server also provides OAuth, billing, usage, and conversation/review services. Edges rely on README flows and indexed caller references; unsampled integrations are represented only where documented.
Main entry points: app.ts Express API · chat.py Chat route · worker.py Review worker · App.tsx React app
Components 27
Client
- React app
artifacts/frontend/src/App.tsx - Chat experience
artifacts/frontend/src/hooks/use-chat.ts - Review experience
artifacts/frontend/src/pages/review.tsx
Product API
- Express API
artifacts/api-server/src/app.ts - OAuth and sessions
artifacts/api-server/src/routes/auth.ts - Billing and quotas
artifacts/api-server/src/services/billing.ts - Conversation history
artifacts/api-server/src/services/conversations.ts - Review services
artifacts/api-server/src/services/pr-reviews.ts
AI and Retrieval
- AI API
ai-backend/main.py - Chat route
ai-backend/routes/chat.py - Document ingestion
ai-backend/routes/ingest.py - RAG retrieval
ai-backend/services/rag.py - Chat memory
ai-backend/services/memory.py - Interactive review
ai-backend/routes/review.py - Review prompting
ai-backend/services/review_prompt.py - LLM routing
ai-backend/services/llm/router.py
PR Automation
- Webhook gateway
main.go - Signature verification
middleware/verify.go - Webhook handler
handlers/github.go - Redis / PubSub queue
queue/queue.go - Review worker
ai-backend/worker.py - PR diff and comments
ai-backend/services/github.py
Persistence and Providers
- Application database
lib/db/src/schema/index.ts - LLM providers
ai-backend/services/llm/base.py - Vector store
ai-backend/services/vectorstore
Other components
- User
- GitHub
Connections 38
- User → React app: uses
- React app → Chat experience: renders
- React app → Review experience: renders
- Chat experience → AI API: sends chat
- Review experience → Express API: uses review API
- React app → Express API: uses product API
- Express API → OAuth and sessions: routes requests
artifacts/api-server/src/app.ts - Express API → Billing and quotas: handles billing
artifacts/api-server/src/app.ts - Express API → Conversation history: serves history
- Express API → Review services: serves reviews
- OAuth and sessions → Application database: persists accounts
- Billing and quotas → Application database: stores subscriptions
- Conversation history → Application database: stores history
- Review services → Application database: stores reviews
- AI API → Chat route: routes requests
ai-backend/main.py - AI API → Document ingestion: routes requests
ai-backend/main.py - AI API → Interactive review: routes requests
ai-backend/main.py - Chat route → Chat memory: loads history
ai-backend/routes/chat.py - Chat route → RAG retrieval: retrieves context
ai-backend/routes/chat.py - Chat route → LLM routing: gets provider
ai-backend/routes/chat.py - Chat route → User: streams answer
- Document ingestion → RAG retrieval: indexes text
ai-backend/routes/ingest.py - RAG retrieval → Vector store: reads and writes
ai-backend/services/rag.py - RAG retrieval → User: supplies citations
- Interactive review → PR diff and comments: fetches diff
ai-backend/routes/review.py - Interactive review → Review prompting: builds prompt
ai-backend/routes/review.py - Interactive review → LLM routing: gets provider
ai-backend/routes/review.py - LLM routing → LLM providers: selects implementation
ai-backend/services/llm/router.py - GitHub → Webhook gateway: sends webhook
- Webhook gateway → Signature verification: verifies signature
- Webhook gateway → Webhook handler: dispatches event
- Webhook handler → Redis / PubSub queue: enqueues job
- Redis / PubSub queue → Review worker: delivers job
- Review worker → PR diff and comments: fetches diff
ai-backend/worker.py - Review worker → Review prompting: builds prompt
ai-backend/worker.py - Review worker → LLM routing: gets provider
ai-backend/worker.py - Review worker → PR diff and comments: posts comment
ai-backend/worker.py - PR diff and comments → GitHub: fetches and comments