How eshita-shah1/byteforce-sih-final works
ByteForce-SIH is a manganese-mining intelligence system with a React interface and a FastAPI backend. Its two principal analytical workflows are manganese prospectivity and production-shortfall prediction; the product also documents uploaded-GIS workflows, study-area data, live weather context, and administrative functions. The sampled frontend routes users among these views, while the backend registers the corresponding API routers and loads both model services at startup. The README identifies a frontend/backend route mismatch, so the HTTP connection is shown as dashed. Unsampled endpoint-to-service wiring is omitted.
Main entry points: main.py FastAPI app · App.tsx Application shell · api.ts HTTP client · feature_service.py Uploaded feature extraction
Components 26
Frontend
- Application shell
frontend/src/App.tsx - Login state
frontend/src/context/AuthContext.tsx - Analysis views
frontend/src/views/ProspectivityView.tsx - Shortfall view
frontend/src/views/ShortfallView.tsx - Logs and reports
frontend/src/views/LogsView.tsx - HTTP client
frontend/src/services/api.ts
Backend API
- FastAPI app
backend/app/main.py - Authentication API
backend/app/api/auth.py - Prospectivity API
backend/app/api/prospectivity.py - Shortfall API
backend/app/api/shortfall.py - GIS upload API
backend/app/api/upload.py - Study-area API
backend/app/api/study_area.py - Environment API
backend/app/api/environment.py
Mining Analysis
- Prospectivity inference
backend/app/services/model1_service.py - Shortfall inference
backend/app/services/model2_service.py - Live weather client
backend/app/services/weather_service.py
Spatial Data
- Uploaded feature extraction
backend/app/services/feature_service.py - Upload validation
backend/app/services/upload_service.py - GIS data services
backend/app/services/raster_service.py - Vector data service
backend/app/services/vector_service.py - CSV data service
backend/app/services/csv_service.py
Platform Services
- Database sessions
backend/app/db/database.py - Database models
backend/app/db/models.py
Other components
- Mining user
- PostGIS database
- Open-Meteo
Connections 27
- Mining user → Application shell: uses
- Application shell → Login state: reads state
- Application shell → Analysis views: renders
- Application shell → Shortfall view: renders
- Application shell → Logs and reports: renders
- Login state → HTTP client: calls login
- Analysis views → HTTP client: requests analysis
- Shortfall view → HTTP client: requests prediction
- Logs and reports → HTTP client: requests records
- HTTP client → FastAPI app: HTTP routes mismatch
- FastAPI app → Authentication API: registers
- FastAPI app → Prospectivity API: registers
- FastAPI app → Shortfall API: registers
- FastAPI app → GIS upload API: registers
- FastAPI app → Study-area API: registers
- FastAPI app → Environment API: registers
- FastAPI app → Prospectivity inference: loads at startup
- FastAPI app → Shortfall inference: loads at startup
- Upload validation → GIS data services: inspects rasters
- Upload validation → Vector data service: inspects vectors
- Upload validation → CSV data service: inspects tables
- Uploaded feature extraction → GIS data services: reads raster data
- Uploaded feature extraction → Vector data service: extracts attributes
- Uploaded feature extraction → CSV data service: extracts rows
- Live weather client → Open-Meteo: fetches observations
- Database sessions → PostGIS database: opens sessions
- Database models → PostGIS database: maps records