How guangfuhero/optimized-version works
This repository implements a disaster-relief and resource-coordination platform. A user enters through the API or GraphQL surface; the backend provides authentication and authorization, then exposes ticket, station/geospatial, and supporting operational capabilities backed by repositories and models. The README additionally documents task matching, point sharing, briefings, announcements, analytics, work zones, duplicate checking, and floor-level markers. Several of these are represented by modules in the tree, but their runtime wiring was not sampled; those links are omitted rather than inferred. The design and system-design directories are not part of this runtime map.
Main entry points: mutations.py Task reports and matching · schema.py GraphQL schema · main.py FastAPI application · security.py Authentication and RBAC
Components 22
Platform entry
- FastAPI application
Backend/app/main.py - REST API routes
Backend/app/api/v1/api.py - GraphQL router
Backend/app/graphql/router.py - GraphQL schema
Backend/app/graphql/schema.py
Identity and access
- Authentication routes
Backend/app/api/v1/endpoints/auth - Authentication and RBAC
Backend/app/core/security.py - Identity repository
Backend/app/repositories/auth_repository.py - Session storage
Backend/app/repositories/session_repository.py - Identity models
Backend/app/models/auth.py
Relief operations
- Task reports and matching
Backend/app/graphql/tickets/mutations.py - Ticket data access
Backend/app/repositories/tickets_repository.py - Maps and stations
Backend/app/graphql/geo/queries.py - Work-zone assignment
Backend/app/graphql/work_zone
Operational services
- Volunteer briefings
Backend/app/graphql/briefings/queries.py - Emergency announcements
Backend/app/graphql/announcements/queries.py - Analytics dashboard
Backend/app/api/v1/endpoints/analytics.py - Duplicate checking
Backend/app/services/suggestion.py - Floor-level markers
Frontend/libs/modules/src/map
Client experience
- Point sharing
Frontend/libs/modules/src/point-share/point-share-drawer.tsx - Interactive map
Frontend/libs/modules/src/map/hooks/use-rescue-map-controller.ts - API data access
Frontend/libs/data-access/src/graphql/client/urql.ts
Other components
- Platform users
Connections 25
- Platform users → FastAPI application: use platform
Backend/app/main.py - FastAPI application → REST API routes: mounts routes
Backend/app/main.py - FastAPI application → GraphQL router: mounts GraphQL
Backend/app/main.py - GraphQL router → GraphQL schema: serves schema
Backend/app/graphql/router.py - REST API routes → Authentication routes: registers routes
Backend/app/api/v1/api.py - Platform users → Authentication routes: authenticate
- Authentication routes → Authentication and RBAC: validates identity
- Authentication and RBAC → Session storage: checks sessions
Backend/app/core/security.py - Authentication and RBAC → Identity repository: loads identity
Backend/app/core/security.py - Identity repository → Identity models: queries identity
Backend/app/repositories/auth_repository.py - GraphQL schema → Task reports and matching: registers resolvers
Backend/app/graphql/schema.py - Task reports and matching → Ticket data access: accesses tickets
Backend/app/repositories/tickets_repository.py - GraphQL schema → Maps and stations: registers resolvers
Backend/app/graphql/schema.py - GraphQL schema → Work-zone assignment: registers resolvers
Backend/app/graphql/schema.py - Platform users → Interactive map: view relief map
- Interactive map → API data access: loads map data
- Platform users → Point sharing: share page
- Platform users → Task reports and matching: report task
- Task reports and matching → Maps and stations: uses map context
- Platform users → Volunteer briefings: view briefings
- Platform users → Emergency announcements: view announcements
- Task reports and matching → Analytics dashboard: feeds analysis
- Task reports and matching → Duplicate checking: checks duplicates
- Task reports and matching → Floor-level markers: supports floor rescue
- Work-zone assignment → Interactive map: shows assigned areas