How ishaq-5012/albedoai works
GeoTrust AI is presented as a district disaster-intelligence dashboard: analysts navigate maps, district assessments, source reliability, conflicts, scores, alerts, and reports, with an assistant for questions. The frontend’s sampled analysis flow selects a district and sources, updates local analysis state, and displays assessment details; the backend separately exposes district, source, analysis, and alert APIs. The UI also relies heavily on bundled demo data. Source excerpts do not establish that the frontend calls the backend, or how backend services are invoked, so those connections are omitted.
Main entry points: demoData.ts Bundled demo data · index.tsx Page registry · useStore.ts Application state · models.py Backend data models
Components 30
Application shell
- Application root
src/App.tsx - Navigation layout
src/components/Layout.tsx - Page registry
src/pages/index.tsx - Login page
src/pages/LoginPage.tsx
Analyst workbench
- Dashboard
src/pages/DashboardPage.tsx - District map
src/pages/MapPage.tsx - Analysis workflow
src/pages/AnalysisPage.tsx - Source explorer
src/pages/SourcesPage.tsx - Conflict review
src/pages/ConflictsPage.tsx - Trust and risk scores
src/pages/ScoresPage.tsx - Reports
src/pages/ReportsPage.tsx - Chat page
src/pages/ChatPage.tsx - Settings
src/pages/SettingsPage.tsx - Alert modal
src/components/AlertModal.tsx - Chat assistant
src/components/ChatAssistant.tsx
Frontend state and data
- Application state
src/store/useStore.ts - Bundled demo data
src/data/demoData.ts - Frontend domain types
src/types/index.ts
Backend API
- FastAPI application
backend/app/main.py - District API
backend/app/routers/districts.py - Source API
backend/app/routers/sources.py - Analysis API
backend/app/routers/analysis.py - Alert API
backend/app/routers/alerts.py - Backend data models
backend/app/models.py
Assessment services
- Risk engine
backend/app/services/risk_engine.py - Trust engine
backend/app/services/trust_engine.py - Zone classifier
backend/app/services/zone_classifier.py - Conflict detector
backend/app/services/conflict_detector.py - AI explainer
backend/app/services/ai_explainer.py
Other components
- Analyst
Connections 46
- Analyst → Navigation layout: uses
src/components/Layout.tsx - Navigation layout → Page registry: selects page
src/components/Layout.tsx - Navigation layout → Login page: shows when unauthenticated
src/components/Layout.tsx - Page registry → Dashboard: maps route
src/pages/index.tsx - Page registry → District map: maps route
src/pages/index.tsx - Page registry → Analysis workflow: maps route
src/pages/index.tsx - Page registry → Source explorer: maps route
src/pages/index.tsx - Page registry → Conflict review: maps route
src/pages/index.tsx - Page registry → Trust and risk scores: maps route
src/pages/index.tsx - Page registry → Chat page: maps route
src/pages/index.tsx - Page registry → Reports: maps route
src/pages/index.tsx - Page registry → Settings: maps route
src/pages/index.tsx - Application root → Navigation layout: renders
src/App.tsx - Application root → Alert modal: renders when authenticated
src/App.tsx - Application root → Chat assistant: renders
src/App.tsx - Analysis workflow → Application state: updates analysis state
src/pages/AnalysisPage.tsx - Analysis workflow → Bundled demo data: reads assessment data
src/pages/AnalysisPage.tsx - Dashboard → Application state: reads state
src/pages/DashboardPage.tsx - Dashboard → Bundled demo data: reads dashboard data
src/pages/DashboardPage.tsx - District map → Application state: reads state
src/pages/MapPage.tsx - District map → Bundled demo data: reads map data
src/pages/MapPage.tsx - Source explorer → Bundled demo data: reads source data
src/pages/SourcesPage.tsx - Conflict review → Bundled demo data: reads conflict data
src/pages/ConflictsPage.tsx - Trust and risk scores → Bundled demo data: reads scores
src/pages/ScoresPage.tsx - Reports → Application state: reads state
src/pages/ReportsPage.tsx - Reports → Bundled demo data: reads report data
src/pages/ReportsPage.tsx - Chat page → Application state: uses chat state
src/pages/ChatPage.tsx - Chat page → Bundled demo data: reads responses
src/pages/ChatPage.tsx - Settings → Application state: updates settings state
src/pages/SettingsPage.tsx - Settings → Bundled demo data: reads settings data
src/pages/SettingsPage.tsx - Alert modal → Application state: acknowledges alerts
src/components/AlertModal.tsx - Alert modal → Bundled demo data: enriches alert
src/components/AlertModal.tsx - Chat assistant → Application state: stores messages
src/components/ChatAssistant.tsx - Chat assistant → Bundled demo data: looks up replies
src/components/ChatAssistant.tsx - Application state → Bundled demo data: initializes alerts and notifications
src/store/useStore.ts - Application state → Frontend domain types: uses domain types
src/store/useStore.ts - FastAPI application → District API: registers route
backend/app/main.py - FastAPI application → Source API: registers route
backend/app/main.py - FastAPI application → Analysis API: registers route
backend/app/main.py - FastAPI application → Alert API: registers route
backend/app/main.py - District API → Backend data models: uses models
backend/app/routers/districts.py - Source API → Backend data models: uses models
backend/app/routers/sources.py - Analysis API → Backend data models: uses models
backend/app/routers/analysis.py - Alert API → Backend data models: uses models
backend/app/routers/alerts.py - Conflict detector → Backend data models: uses models
backend/app/services/conflict_detector.py - AI explainer → Backend data models: uses models
backend/app/services/ai_explainer.py