How ivanmercado0998/aerotrace works
AeroTrace is an admin-facing air-quality monitoring dashboard for a multi-node deposition network. The intended workflow is to sign in, inspect monitoring nodes and pollution sources on a map, review readings and history, manage nodes, and use source-identification and reporting capabilities described on the landing page. Sampled source confirms the map, location search, and authentication wiring; dashboard composition and several advertised capabilities are not shown, so their implementation links are omitted. PostgreSQL is configured through the shared database module.
Main entry points: dashboard/page.tsx Dashboard page · app/page.tsx Landing page · index.ts Drizzle database · auth-form.tsx Admin login form
Components 20
Access and sessions
- Landing page
app/page.tsx - Admin login form
components/auth-form.tsx - Admin login endpoint
app/api/admin/login/route.ts - Admin logout endpoint
app/api/admin/logout/route.ts - Admin session helpers
lib/admin-auth.ts - Auth API route
app/api/auth/[...all]/route.ts - Auth configuration
lib/auth.ts - Auth client
lib/auth-client.ts
Monitoring dashboard
- Dashboard page
app/dashboard/page.tsx - Pollution map
components/map/pollution-map.tsx - Node management
components/dashboard/node-management-panel.tsx - Reading history
components/dashboard/history-panel.tsx - Monitoring actions
app/actions/monitoring.ts
Environmental analysis
- Location search
components/dashboard/location-search.tsx - ML source identification
app/dashboard - Governance reports
app/dashboard
Persistence
- Drizzle database
lib/db/index.ts - Database schema
lib/db/schema.ts
Other components
- Administrator
- PostgreSQL
Connections 18
- Administrator → Landing page: visits
- Landing page → Admin session helpers: checks session
- Landing page → Admin login form: opens sign-in
- Administrator → Admin login form: submits credentials
- Admin login form → Admin login endpoint: POSTs credentials
- Admin login endpoint → Admin session helpers: validates and creates session
- Administrator → Admin logout endpoint: requests logout
- Admin logout endpoint → Admin session helpers: clears session
- Auth client → Auth API route: calls auth API
- Auth API route → Auth configuration: dispatches handlers
- Auth configuration → Drizzle database: uses pool
- Dashboard page → Pollution map: renders map
- Dashboard page → Node management: renders node controls
- Dashboard page → Reading history: renders history
- Dashboard page → Location search: renders search
- Dashboard page → Monitoring actions: uses actions
- Drizzle database → Database schema: uses schema
- Drizzle database → PostgreSQL: queries