How mrtimonm/amar-shohor- works
Amar Shohor is a civic issue-reporting and municipal response application. Citizens browse a public map, submit geolocated, photo-backed reports, and follow their history; city staff review, verify, assign, and resolve issues, while administrators manage access and monitor operations. The web client communicates through a shared API layer with an Express API and MongoDB-backed domain models; shared definitions cover issue categories, roles, and lifecycle rules. The repository also includes a separate AI service. Edges reflect shown imports, route declarations, or calls; API route registration and several endpoint internals were not sampled, so those links are omitted or marked unverified.
Main entry points: App.tsx Route shell · api.ts HTTP client · ReportPage.tsx Report submission · dedup.ts Report deduplication
Components 24
Web client
- Route shell
amar-shohor/apps/web/src/App.tsx - Report submission
amar-shohor/apps/web/src/pages/ReportPage.tsx - Issue details
amar-shohor/apps/web/src/pages/IssuePage.tsx - Public browse
amar-shohor/apps/web/src/pages/HomePage.tsx - Staff review
amar-shohor/apps/web/src/pages/ReviewPage.tsx - Administration
amar-shohor/apps/web/src/pages/AdminPage.tsx - Maps, queue, stats
amar-shohor/apps/web/src/pages - HTTP client
amar-shohor/apps/web/src/lib/api.ts - Offline reports
amar-shohor/apps/web/src/lib/offline.ts - Session context
amar-shohor/apps/web/src/lib/auth-context.tsx
API and domain
- Issue and report endpoints
amar-shohor/apps/api/src/routes - Authority workflow
amar-shohor/apps/api/src/routes/authority.ts - Sign-in endpoints
amar-shohor/apps/api/src/routes/auth.ts - Admin endpoints
amar-shohor/apps/api/src/routes/admin.ts - Authentication
amar-shohor/apps/api/src/auth.ts - Report deduplication
amar-shohor/apps/api/src/dedup.ts - Domain models
amar-shohor/apps/api/src/models.ts - Photo storage
amar-shohor/apps/api/src/storage.ts - HTTP and validation
amar-shohor/apps/api/src/http.ts
Shared domain
- Categories and lifecycle
amar-shohor/packages/shared/src/domain.ts
AI service
- AI service API
amar-shohor/services/ai/app/main.py - Vision analysis
amar-shohor/services/ai/app/vision.py - Model registry
amar-shohor/services/ai/app/registry.py
Other components
- Citizen / staff
Connections 25
- Citizen / staff → Route shell: uses
- Route shell → Report submission: routes to
amar-shohor/apps/web/src/App.tsx - Route shell → Issue details: routes to
amar-shohor/apps/web/src/App.tsx - Route shell → Public browse: routes to
amar-shohor/apps/web/src/App.tsx - Route shell → Staff review: routes to
amar-shohor/apps/web/src/App.tsx - Route shell → Administration: routes to
amar-shohor/apps/web/src/App.tsx - Route shell → Maps, queue, stats: routes to
amar-shohor/apps/web/src/App.tsx - Report submission → HTTP client: calls
amar-shohor/apps/web/src/pages/ReportPage.tsx - Issue details → HTTP client: calls
amar-shohor/apps/web/src/pages/IssuePage.tsx - Public browse → HTTP client: calls
amar-shohor/apps/web/src/pages/HomePage.tsx - Staff review → HTTP client: calls
amar-shohor/apps/web/src/pages/ReviewPage.tsx - Administration → HTTP client: calls
amar-shohor/apps/web/src/pages/AdminPage.tsx - HTTP client → Issue and report endpoints: HTTP requests
- Report submission → Offline reports: queues offline
amar-shohor/apps/web/src/pages/ReportPage.tsx - Session context → HTTP client: fetches session
amar-shohor/apps/web/src/lib/auth-context.tsx - Sign-in endpoints → Authentication: uses
amar-shohor/apps/api/src/routes/auth.ts - Authority workflow → Authentication: uses
amar-shohor/apps/api/src/routes/authority.ts - Authority workflow → Report deduplication: invokes
amar-shohor/apps/api/src/routes/authority.ts - Authentication → Domain models: loads user
amar-shohor/apps/api/src/auth.ts - Issue and report endpoints → Domain models: uses
amar-shohor/apps/api/src/routes/authority.ts - Report deduplication → Domain models: uses
amar-shohor/apps/api/src/dedup.ts - Report deduplication → AI service API: requests analysis
- AI service API → Vision analysis: calls
amar-shohor/services/ai/app/main.py - AI service API → Model registry: uses
amar-shohor/services/ai/app/main.py - Vision analysis → Model registry: uses
amar-shohor/services/ai/app/vision.py