How ragini-create/cognimap works
Cognimap is an environment-aware navigation app. Users search for places, choose travel modes and stops, request route alternatives, and review route scores alongside environmental and community safety information; they can also report hazards and ask CogniAssist questions. The graph separates the frontend experience, backend route and location services, hazard-report storage, and external providers. Some frontend components and backend handlers are indexed but not excerpted, so their documented capabilities are included while uncertain internal call links are omitted.
Main entry points: App.js App state and orchestration · api.js HTTP client · server.js Express API server · route.js Route scoring
Components 23
Navigation experience
- App state and orchestration
frontend/src/App.js - Place search
frontend/src/components/SearchPanel.js - Search debounce
frontend/src/hooks/useDebounce.js - Interactive map
frontend/src/components/MapView.js - Route choices
frontend/src/components/RouteCard.js - Environmental insights
frontend/src/components/EnvPanel.js - Report submission
frontend/src/components/ReportModal.js - CogniAssist chat
frontend/src/components/CogniAssist.js - Theme controls
frontend/src/components/Header.js - HTTP client
frontend/src/utils/api.js
Backend services
- Express API server
backend/server.js - Geocoding
backend/routes/geocode.js - Route scoring
backend/routes/route.js - AQI endpoint
backend/routes/aqi.js - Assistant endpoint
backend/routes/chat.js
Road reports
- Report API
backend/routes/reports.js - Report model
backend/models/Report.js
External providers
- OpenRouteService
- OpenWeather
- Nominatim
- Mapbox geocoding
- Gemini
Other components
- Traveler
Connections 32
- Traveler → Place search: chooses places
README.md - Traveler → Interactive map: views routes
README.md - Traveler → Report submission: submits hazards
README.md - App state and orchestration → Place search: renders
frontend/src/App.js - App state and orchestration → Interactive map: renders
frontend/src/App.js - App state and orchestration → Route choices: renders
frontend/src/App.js - App state and orchestration → Environmental insights: renders
frontend/src/App.js - App state and orchestration → Theme controls: renders
frontend/src/App.js - App state and orchestration → Report submission: renders
frontend/src/App.js - Place search → Search debounce: debounces query
frontend/src/components/SearchPanel.js - Place search → HTTP client: requests geocoding
frontend/src/components/SearchPanel.js - Place search → App state and orchestration: selects places
frontend/src/App.js - App state and orchestration → HTTP client: requests routes
frontend/src/App.js - HTTP client → Express API server: calls API
frontend/src/utils/api.js - Express API server → Route scoring: mounts route API
backend/server.js - Express API server → Geocoding: mounts geocoding
backend/server.js - Express API server → AQI endpoint: mounts AQI
backend/server.js - Express API server → Report API: mounts reports
backend/server.js - Express API server → Assistant endpoint: mounts chat
backend/server.js - Route scoring → OpenRouteService: requests routes
backend/routes/route.js - Route scoring → OpenWeather: fetches conditions
README.md - Route scoring → Report model: counts nearby reports
backend/routes/route.js - Route scoring → AQI endpoint: fetches AQI
README.md - Geocoding → Mapbox geocoding: geocodes places
backend/routes/geocode.js - Geocoding → Nominatim: fallback geocodes
backend/routes/geocode.js - Report API → Report model: reads and writes
backend/routes/reports.js - App state and orchestration → HTTP client: loads reports
frontend/src/App.js - Report submission → HTTP client: creates report
README.md - CogniAssist chat → HTTP client: sends question
frontend/src/components/CogniAssist.js - HTTP client → Assistant endpoint: posts chat
frontend/src/utils/api.js - Assistant endpoint → Gemini: generates answer
backend/routes/chat.js - Interactive map → CogniAssist chat: hosts assistant
frontend/src/components/MapView.js