How bhaktisharma23/ksit_hackathon works
This repository combines a smoke-and-fire detection dashboard, a FastAPI backend, and model-development scripts. The intended user workflow includes uploading a video, starting analysis, and reviewing detection results; the sampled frontend code confirms upload, analysis polling, and results fetching services, while backend processing details are not fully sampled. The README provides no additional capability documentation, so uncertain service wiring is omitted.
Main entry points: AppRoutes.tsx Page routes · app.py FastAPI app · videoService.ts Video API service · api.ts HTTP client
Components 32
Dashboard
- Page routes
frontend/smoke-fire-dashboard/src/routes/AppRoutes.tsx - Video analysis
frontend/smoke-fire-dashboard/src/pages/VideoAnalysis.tsx - Live monitoring
frontend/smoke-fire-dashboard/src/pages/RealTimeMonitoring.tsx - Overview
frontend/smoke-fire-dashboard/src/pages/Dashboard.tsx - Alert logs
frontend/smoke-fire-dashboard/src/pages/AlertLogs.tsx - History
frontend/smoke-fire-dashboard/src/pages/History.tsx - AI models
frontend/smoke-fire-dashboard/src/pages/AIModels.tsx - Settings
frontend/smoke-fire-dashboard/src/pages/Settings.tsx - Upload state
frontend/smoke-fire-dashboard/src/hooks/useUpload.ts - Analysis polling
frontend/smoke-fire-dashboard/src/hooks/useVideoAnalysis.ts - Detection results
frontend/smoke-fire-dashboard/src/hooks/useDetectionResults.ts - Video API service
frontend/smoke-fire-dashboard/src/services/videoService.ts - Detection service
frontend/smoke-fire-dashboard/src/services/detectionService.ts - Realtime stream
frontend/smoke-fire-dashboard/src/services/realtimeService.ts - Alert service
frontend/smoke-fire-dashboard/src/services/alertService.ts - HTTP client
frontend/smoke-fire-dashboard/src/services/api.ts
Backend API
- FastAPI app
backend/app.py - Upload endpoint
backend/routes/upload.py - Detection endpoint
backend/routes/detection.py - Results endpoint
backend/routes/results.py
Detection Pipeline
- Detection service
backend/services/detection.py - Video processing
backend/services/video_processor.py - Frame inference
backend/services/inference.py - Postprocessing
backend/services/postprocessing.py - Detection metrics
backend/services/metrics.py - Video utilities
backend/utils/video_utils.py - File utilities
backend/utils/file_utils.py
Model Development
- Train model
ml/train.py - Model prediction
ml/predict.py - Validate model
ml/validate.py - Export model
ml/export_best.py
Other components
- Dashboard user
Connections 17
- Dashboard user → Page routes: navigates
- Page routes → Video analysis: routes to
- Page routes → Live monitoring: routes to
- Page routes → Overview: routes to
- Page routes → Alert logs: routes to
- Page routes → History: routes to
- Page routes → AI models: routes to
- Page routes → Settings: routes to
- Upload state → Video API service: calls
- Analysis polling → Video API service: calls
- Detection results → Detection service: calls
- Video API service → HTTP client: sends requests
- Alert service → HTTP client: sends requests
- FastAPI app → Upload endpoint: mounts
- FastAPI app → Detection endpoint: mounts
- FastAPI app → Results endpoint: mounts
- Frame inference → Dashboard user