How cseanx/init.ai works
INIT.AI is an urban-heat intelligence platform for city and barangay analysis, reporting, and optional Stellar attestations. Users authenticate, select a city, explore heat, hotspots, canopy, and mitigation information, then create reports; selected report content can be wallet-attested and verified on-chain. The graph preserves those documented product branches, plus the frontend/API, authentication, and persistence layers. Several feature implementations were not sampled, so their internal calls are omitted; dashed edges mark documented but unsampled service boundaries.
Main entry points: api.ts API client · main.py API application · auth.py Authentication endpoints · attestation.ts Attestation workflow
Components 29
User experience
- App routing
src/App.tsx - Authentication UI
src/auth/AuthContext.tsx - Login page
src/pages/Login.tsx - City selection
src/contexts/CityContext.tsx - Report creation
src/pages/CreateReport.tsx - Report drafts
src/reports/reportService.ts
Environmental analysis
- Dashboard
src/pages/Dashboard.tsx - Heat map
src/pages/HeatMap.tsx - Hotspot analysis
src/pages/Hotspots.tsx - Canopy analysis
src/pages/Canopy.tsx - Mitigation planning
src/pages/Mitigation.tsx - Environmental datasets
src/data/mockData.ts
Backend services
- API client
src/services/api.ts - API application
backend/app/main.py - Authentication endpoints
backend/app/api/auth.py - Report endpoints
backend/app/api/reports.py - Environmental endpoints
backend/app/api - Authentication service
backend/app/services/auth.py - Input validation
backend/app/services/validators.py - Runtime configuration
backend/app/core/config.py
Application data
- Database session
backend/app/db/session.py - Reports and attestations
backend/app/models/report.py
Stellar verification
- Attestation workflow
src/services/stellar/attestation.ts - Wallet connection
src/services/stellar/wallet.ts - Soroban client
src/services/stellar/client.ts - Network configuration
src/services/stellar/network.ts - Attestation contract
contracts/soroban/src/lib.rs
Other components
- City analyst
- Stellar network
Connections 32
- City analyst → App routing: uses
src/App.tsx - App routing → Login page: routes to
src/App.tsx - App routing → Dashboard: routes to
src/App.tsx - Login page → Authentication UI: authenticates through
- Authentication UI → API client: calls
src/auth/AuthContext.tsx - City selection → Dashboard: selects city for
- City analyst → Heat map: explores
- City analyst → Hotspot analysis: reviews
- City analyst → Canopy analysis: analyzes
- City analyst → Mitigation planning: plans with
- City analyst → Report creation: creates report
README.md - Report creation → Report drafts: uses
src/pages/CreateReport.tsx - Report drafts → Environmental datasets: derives summaries from
src/reports/reportService.ts - Report creation → API client: saves through
src/pages/CreateReport.tsx - API client → Report drafts: loads local reports
src/services/api.ts - API client → API application: requests API
- API application → Authentication endpoints: registers routers
backend/app/main.py - API application → Report endpoints: registers routers
backend/app/main.py - API application → Environmental endpoints: registers routers
backend/app/main.py - Authentication endpoints → Authentication service: uses
backend/app/api/auth.py - Authentication endpoints → Database session: gets database session
backend/app/api/auth.py - Authentication endpoints → Input validation: uses validation
backend/app/api/auth.py - Database session → Runtime configuration: reads settings
backend/app/db/session.py - Report endpoints → Reports and attestations: persists reports
- City analyst → Attestation workflow: attests report
README.md - Attestation workflow → Wallet connection: uses wallet
src/services/stellar/attestation.ts - Attestation workflow → Soroban client: uses client
src/services/stellar/attestation.ts - Soroban client → Network configuration: reads network config
src/services/stellar/client.ts - Attestation workflow → Stellar network: submits attestation
- Stellar network → Attestation contract: executes contract
- API client → Report endpoints: sends report requests
- Report endpoints → Reports and attestations: stores attestations