How yasout141516/shomap works
ShoMap is a community incident reporting and response platform for Bangladesh. Citizens submit reports and photos, the community verifies and tracks incidents, and authorities or moderators review and act on them; map, feed, alerts, watch zones, and SOS support discovery and follow-up. The web app uses shared API/query helpers to reach the Fastify server, whose routes delegate domain work and persist data in SQLite. The README documents these capabilities; unsampled implementations are represented at their exact feature paths, and links are omitted where call ownership is not evidenced.
Main entry points: App.tsx App routes · public.ts Public workflows · api.ts HTTP client · app.ts HTTP and socket app
Components 28
Web experience
- App routes
apps/web/src/App.tsx - Incident reporting
apps/web/src/features/report/ReportModal.tsx - Map and feed
apps/web/src/features/map/MapPage.tsx - Incident detail
apps/web/src/features/incident/IncidentPanel.tsx - Community dashboard
apps/web/src/features/dashboard/DashboardPage.tsx - Alerts and SOS
apps/web/src/features/alerts/AlertsPage.tsx - Watch zones
apps/web/src/features/watch-zones/WatchZonesPage.tsx - Authority console
apps/web/src/features/authority/AuthorityPage.tsx - Moderation console
apps/web/src/features/admin/AdminPage.tsx - Session and login
apps/web/src/lib/session.ts - API queries
apps/web/src/lib/queries.ts - User actions
apps/web/src/lib/actions.ts - HTTP client
apps/web/src/lib/api.ts
Server workflows
- HTTP and socket app
apps/server/src/app.ts - Public workflows
apps/server/src/routes/public.ts - Staff workflows
apps/server/src/routes/staff.ts - Report operations
apps/server/src/services/reports.ts - Incident queries
apps/server/src/services/queries.ts - Incident repository
apps/server/src/services/repo.ts - Identity and roles
apps/server/src/auth.ts - Privacy serialization
apps/server/src/serializers/incident.ts - Live updates
apps/server/src/realtime.ts - Write coordination
apps/server/src/services/context.ts
Data and contracts
- SQLite database
apps/server/src/db/client.ts - Database schema
apps/server/src/db/schema.ts - Shared API rules
packages/shared/src/dto.ts
Other components
- Community members
- Authority staff
Connections 31
- Community members → Incident reporting: submits reports
README.md - Community members → Map and feed: explores incidents
README.md - Authority staff → Authority console: reviews queue
apps/web/src/features/authority/AuthorityPage.tsx - App routes → Map and feed: routes to
apps/web/src/App.tsx - App routes → Incident detail: routes to
apps/web/src/App.tsx - App routes → Community dashboard: routes to
apps/web/src/App.tsx - App routes → Alerts and SOS: routes to
apps/web/src/App.tsx - App routes → Watch zones: routes to
apps/web/src/App.tsx - App routes → Authority console: routes to
apps/web/src/App.tsx - App routes → Moderation console: routes to
apps/web/src/App.tsx - App routes → Incident reporting: renders
- Incident reporting → HTTP client: sends report
apps/web/src/features/report/ReportModal.tsx - Authority console → HTTP client: submits actions
apps/web/src/features/authority/AuthorityPage.tsx - Session and login → HTTP client: calls endpoints
apps/web/src/lib/session.ts - API queries → HTTP client: fetches data
apps/web/src/lib/queries.ts - HTTP client → Public workflows: requests endpoints
- HTTP client → Staff workflows: requests staff endpoints
- HTTP and socket app → Public workflows: registers routes
apps/server/src/app.ts - HTTP and socket app → Staff workflows: registers routes
apps/server/src/app.ts - HTTP and socket app → Live updates: attaches sockets
apps/server/src/app.ts - Public workflows → Identity and roles: checks identity
apps/server/src/routes/public.ts - Public workflows → Report operations: submits reports
apps/server/src/routes/public.ts - Public workflows → Incident queries: lists incidents
apps/server/src/routes/public.ts - Public workflows → Incident repository: reads incident rows
apps/server/src/routes/public.ts - Public workflows → SQLite database: reads and writes
apps/server/src/routes/public.ts - Public workflows → Privacy serialization: serializes responses
apps/server/src/routes/public.ts - Write coordination → Live updates: flushes effects
apps/server/src/services/context.ts - SQLite database → Database schema: configures tables
apps/server/src/db/client.ts - Incident repository → SQLite database: accesses records
- Live updates → Incident repository: uses incident data
apps/server/src/realtime.ts - Shared API rules → API queries: types responses