How vishalyadav-08/sih26036 works
MapanSetu is a prototype lifecycle-management system for regulated weighing and measuring instruments, with a Next.js portal, Django API, and separate AI service. The principal workflow runs from instrument registration and a business verification application through officer assignment, scheduling, field inspection and evidence capture, certificate issuance, and public certificate lookup. Offline field work is also supported. The README documents the backend’s views-to-services structure and PostgreSQL system of record; some subsystem links below reflect that documented structure rather than sampled implementation. The AI service is described as bootstrap-stage, so its integration is shown as optional.
Main entry points: urls.py Django API · app Business and admin routes · field Field routes · views.py Certificates
Components 24
Web portal
- Business and admin routes
frontend/src/app - Field routes
frontend/src/app/field - Certificate lookup
frontend/src/app/verify - Authentication
frontend/src/services/auth/auth.service.ts - Application client
frontend/src/services/applications/applications.service.ts - Inspection client
frontend/src/services/inspections/inspections.service.ts - Sync client
frontend/src/services/sync/sync.service.ts - Assistant widget
frontend/src/components/assistant/AssistantWidget.tsx - AI client
frontend/src/services/ai/ai.service.ts
Lifecycle API
- Django API
backend/root/urls.py - Applications
backend/applications/views.py - Instrument registry
backend/instruments/views.py - Officer assignment and scheduling
backend/scheduling/views.py - Certificates
backend/certificates/views.py
Field operations
- Offline drafts and queue
frontend/src/lib/offline-storage.ts - Inspections and evidence
backend/inspections/views.py - Offline batch processing
backend/sync/services.py
Trust and support
- Notifications
backend/notifications/services.py - Audit records
backend/audit/services.py - PostgreSQL system of record
- AI chat API
ai-service/app/api/chat.py
Other components
- Business user
- Field officer
- Public verifier
Connections 26
- Business user → Business and admin routes: uses
- Field officer → Field routes: uses
- Public verifier → Certificate lookup: looks up
- Business and admin routes → Authentication: authenticates via
- Business and admin routes → Application client: submits requests
- Application client → Django API: HTTP requests
- Field routes → Inspection client: records inspections
- Inspection client → Django API: HTTP requests
- Field routes → Offline drafts and queue: saves drafts
- Offline drafts and queue → Sync client: provides queued work
- Sync client → Django API: posts batches
- Django API → Applications: routes requests
- Django API → Instrument registry: routes requests
- Django API → Officer assignment and scheduling: routes requests
- Django API → Inspections and evidence: routes requests
- Django API → Certificates: routes requests
- Applications → PostgreSQL system of record: reads and writes
- Instrument registry → PostgreSQL system of record: reads and writes
- Officer assignment and scheduling → PostgreSQL system of record: reads and writes
- Inspections and evidence → PostgreSQL system of record: reads and writes
- Certificates → PostgreSQL system of record: reads and writes
- Offline batch processing → Inspections and evidence: applies operations via
- Offline batch processing → PostgreSQL system of record: records sync state
- Certificate lookup → Certificates: requests verification
- Assistant widget → AI client: sends chat
- AI client → AI chat API: optional request