Skip to content

rupeshbharambe24/prithvi-ai-frontend

Repository files navigation

πŸ–₯️ PRITHVI-AI Β· Frontend Console

Interactive climate-health intelligence dashboard


React Vite TypeScript Tailwind CSS shadcn/ui MapLibre

Part of PRITHVI-AI Β· talks to the FastAPI backend.


Note

The operations console for PRITHVI-AI: an interactive, map-driven dashboard where epidemiologists and hospital teams explore heat, disease, surge, and air-quality forecasts, browse the evidence knowledge graph, plan scenarios, and monitor model performance, fairness, and alerts β€” with light/dark themes and i18n.

πŸ“‘ Contents

✨ Features

  • πŸ—ΊοΈ Interactive maps β€” region risk layers rendered with MapLibre GL + vector tiles
  • πŸ“Š Forecast dashboards β€” risk scores with p05/p95 uncertainty bands and SHAP drivers
  • πŸ•ΈοΈ Knowledge-graph explorer β€” Cytoscape graph of climate/disease/evidence entities
  • πŸ§ͺ Scenario planner & 🎯 resource view backed by the optimizer
  • πŸ“‰ Model & fairness monitoring β€” registry, skill-over-time, drift, per-region gaps
  • πŸ”” Alerts management with rules and severities
  • πŸŒ— Dark / light theme, 🌐 i18n (i18next), ⚑ animated UI (Framer Motion)
  • πŸ” Cookie + CSRF auth flow with role-based route protection

🧭 Pages

Route Page Route Page
/console/overview πŸ“‹ Overview /console/scenario πŸ§ͺ Scenario Planner
/console/heat 🌑️ Heat Risk /console/kg πŸ•ΈοΈ Knowledge Graph
/console/disease 🦟 Disease Risk /console/evidence πŸ“š Evidence
/console/hospital πŸ₯ Hospital Surge /console/catalog πŸ—‚οΈ Data Catalog
/console/air 🌫️ Air Quality /console/fairness βš–οΈ Fairness & QA
/console/models πŸ€– Models /console/alerts πŸ”” Alerts

🧱 Tech stack

React 18 Β· Vite 5 Β· TypeScript 5 Β· Tailwind CSS Β· shadcn/ui (Radix) Β· TanStack Query Β· React Router Β· MapLibre GL Β· Cytoscape Β· Recharts Β· react-hook-form + zod Β· i18next Β· Framer Motion

πŸš€ Quick start

Important

Start the backend first (port 8000).

npm install
npm run dev          # β†’ http://localhost:5173

Other scripts:

npm run build        # production build
npm run preview      # preview the production build
npm run lint         # lint

Demo login: admin@example.com / Admin123!

βš™οΈ Configuration

Create .env.development.local (git-ignored) to point at your backend:

VITE_API_BASE_URL=http://localhost:8000
VITE_API_PREFIX=/api/v1

API requests are sent with credentials: 'include'; write requests send an X-CSRF-Token header read from the csrf_token cookie.

πŸ“ Project structure

src/
β”œβ”€β”€ pages/
β”‚   β”œβ”€β”€ console/      Overview, HeatRisk, DiseaseRisk, HospitalSurge, AirQuality,
β”‚   β”‚                 Scenario, KnowledgeGraph, Evidence, Catalog, Fairness, Models, Alerts
β”‚   └── auth/         Login, Signup
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ console/      Sidebar, Topbar, RegionPicker, DateLeadPicker
β”‚   └── ui/           shadcn/ui primitives
β”œβ”€β”€ hooks/            use-api, use-toast, use-mobile
β”œβ”€β”€ lib/              api-client, rbac, i18n, utils
└── store/            app store (theme, session)

πŸ“œ License

MIT.

The human-facing window into PRITHVI-AI's forecasts. πŸŒπŸ“ˆ

About

πŸ–₯️ React + Vite console for PRITHVI-AI: interactive MapLibre risk maps, forecast dashboards, knowledge-graph explorer, and model/fairness monitoring.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages