How mael-ux/ialert works
iAlert combines a mobile disaster-response client, an Express API and a Python AI service. The main workflow aggregates external hazard telemetry, normalizes it, ingests and clusters it into incidents, then exposes those incidents for globe/feed viewing and citizen reports. Users can also configure geofenced alerts and ask a conversational risk assistant. The README documents the overall service relationships; source excerpts confirm selected ingestion, incident, alert, and theme behavior, but not every mobile route or API call.
Main entry points: App.js Expo app · server.js Express API · ingest.js Telemetry ingestion · incidents.routes.js Incident routes
Components 23
Mobile experience
- Expo app
mobile/App.js - 3D globe
mobile/app/components/globeMap.jsx - Incident feed
mobile/app/(tabs)/feed.jsx - Citizen reporting
mobile/app/report.jsx - Alert settings
mobile/app/alert-settings.jsx - Alert polling
mobile/app/services/alertPollingService.js - Chat interface
mobile/app/(tabs)/chatbot.jsx
Incident backend
- Express API
backend/src/server.js - Incident routes
backend/src/routes/incidents.routes.js - Incident matching
backend/src/services/incidentLogic.js - Telemetry ingestion
backend/src/services/ingest.js - Alert routes
backend/src/routes/alerts.routes.js
AI and telemetry
- FastAPI service
AI/main.py - Disaster aggregation
AI/disasters/service.py - Event normalization
AI/disasters/base.py - Agency fetchers
AI/disasters - Risk assistant
AI/chat_agent.py
Persistent state
- PostgreSQL data
backend/src/dataBase/schema.js
External services
- Telemetry agencies
- Google Gemini
- OpenWeather
- Clerk
Other components
- Community members
Connections 29
- Community members → Expo app: uses
- Expo app → 3D globe: renders hazards
- Expo app → Incident feed: views incidents
- Expo app → Citizen reporting: submits reports
- Expo app → Alert settings: configures alerts
- Alert settings → Alert polling: checks alerts
- Alert polling → Alert routes: polls endpoint
- Expo app → Chat interface: opens chat
- 3D globe → Express API: requests incidents
- Incident feed → Express API: requests incidents
mobile/app/(tabs)/feed.jsx - Citizen reporting → Incident routes: posts report
- Incident routes → Incident matching: matches incidents
backend/src/routes/incidents.routes.js - Incident routes → PostgreSQL data: reads and writes
backend/src/routes/incidents.routes.js - Express API → Incident routes: routes requests
backend/src/server.js - Express API → Alert routes: routes requests
backend/src/server.js - Express API → Telemetry ingestion: schedules ingestion
backend/src/server.js - Telemetry ingestion → FastAPI service: fetches events
backend/src/services/ingest.js - Telemetry ingestion → Incident matching: matches events
backend/src/services/ingest.js - Telemetry ingestion → PostgreSQL data: upserts incidents
backend/src/services/ingest.js - Alert routes → PostgreSQL data: reads preferences
backend/src/routes/alerts.routes.js - Chat interface → FastAPI service: sends chat
- FastAPI service → Risk assistant: dispatches chat
AI/main.py - FastAPI service → Disaster aggregation: serves disasters
AI/main.py - Disaster aggregation → Agency fetchers: runs fetchers
AI/disasters/service.py - Agency fetchers → Event normalization: normalizes events
AI/disasters/base.py - Disaster aggregation → Telemetry agencies: fetches telemetry
- Risk assistant → Google Gemini: calls model
- Risk assistant → OpenWeather: gets forecasts
- Expo app → Clerk: authenticates