How mithhsss/drone-analysis works
Drone Intelligence System is an India-focused dashboard for drone research, regulatory guidance, business calculations, and operational analytics. Users ask questions in chat or select a specialized tool; the backend keeps conversation history, invokes the AI agent, and returns answers with citations. Separate calculator, compliance, and recommendation capabilities support direct tool workflows; document upload feeds the knowledge base, which is also populated by ingestion. The README describes these broader connections, but excerpts only verify selected chat, storage, compliance, ingestion, and MCP-server behavior, so uncertain implementation links are omitted.
Main entry points: main.py FastAPI application · App.tsx Dashboard shell · chat.py Chat and history routes · server.py MCP tool server
Components 26
Dashboard
- Dashboard shell
frontend/src/App.tsx - Chat assistant
frontend/src/components/chat/ChatAssistant.tsx - Tool panel
frontend/src/components/layout/RightPanel.tsx - Analytics view
frontend/src/components/viz/DashboardViz.tsx
API and Services
- FastAPI application
api/main.py - Chat and history routes
api/routes/chat.py - Conversation service
api/services/chat_service.py - AI agent
api/services/agent.py - Chat persistence service
api/services/db_service.py - Chat database
data/chats.db
Knowledge Base
- Document upload
api/routes/upload.py - Knowledge ingestion
rag/ingest.py - RAG retrieval bridge
mcp_server/rag_bridge.py - Vector index
Drone Tools
- MCP tool server
mcp_server/server.py - Flight-time calculator
mcp_server/tools/flight_time.py - ROI calculator
mcp_server/tools/roi_calc.py - Compliance checker
mcp_server/tools/compliance_checker.py - Drone recommender
mcp_server/tools/drone_selector.py - Calculation routes
api/routes/calculate.py - Compliance route
api/routes/compliance.py - Recommendation route
api/routes/recommend.py
Analytics
- Analytics route
api/routes/analytics.py - Analytics service
api/services/analytics_service.py - Analytics API
Other components
- Dashboard user
Connections 33
- Dashboard user → Dashboard shell: uses
- Dashboard shell → Chat assistant: renders
- Dashboard shell → Tool panel: renders
- Dashboard shell → Analytics view: renders
- Chat assistant → FastAPI application: sends chat
- Dashboard shell → Chat and history routes: loads history
- FastAPI application → Chat and history routes: routes requests
- FastAPI application → Calculation routes: mounts routes
- FastAPI application → Compliance route: mounts routes
- FastAPI application → Recommendation route: mounts routes
- FastAPI application → Document upload: mounts routes
- FastAPI application → Analytics route: mounts routes
- Chat and history routes → Conversation service: handles chat
- Conversation service → AI agent: executes query
- Conversation service → Chat persistence service: reads and writes
- Chat and history routes → Chat persistence service: loads history
- Chat persistence service → Chat database: reads and writes
- Document upload → Vector index: indexes documents
- Knowledge ingestion → Vector index: upserts chunks
- RAG retrieval bridge → Vector index: queries vectors
- MCP tool server → Flight-time calculator: dispatches tool
- MCP tool server → ROI calculator: dispatches tool
- MCP tool server → Compliance checker: dispatches tool
- MCP tool server → Drone recommender: dispatches tool
- Compliance checker → RAG retrieval bridge: retrieves rules
- Calculation routes → Flight-time calculator: offers calculation
- Calculation routes → ROI calculator: offers calculation
- Compliance route → Compliance checker: offers check
- Recommendation route → Drone recommender: offers selection
- Analytics API → Analytics view: views metrics
- Analytics view → Analytics route: requests metrics
- Analytics route → Analytics service: tracks metrics
- Chat and history routes → Analytics service: tracks requests