How yashgarg2810/ecoverse-ai-based-environmental-simulation-platform works
EcoVerse is a multi-tenant campus sustainability platform. Users register an institution, map and manage campus assets, run environmental simulations, and complete audits that produce saved, viewable reports. The frontend separates mapping, simulation, analytics, and audit/report experiences; the backend provides authenticated APIs, deterministic calculations, AI recommendations, and persistence. The README documents GIS area calculations, print-to-PDF reports, and sustainability domains not fully visible in the sampled code. Some frontend-to-API connections are shown as unverified because sampled page excerpts do not expose those requests.
Main entry points: App.jsx App router · server.js REST server · audit.js Audit API · db.js PostgreSQL via Prisma
Components 21
Campus experience
- App router
ecoverse-frontend/src/App.jsx - Home
ecoverse-frontend/src/pages/Home.jsx - Contact
ecoverse-frontend/src/pages/Contact.jsx
Identity and access
- Login and signup
ecoverse-frontend/src/pages/Login.jsx - Session context
ecoverse-frontend/src/context/AuthContext.jsx - Auth routes
ecoverse-backend/routes/auth.js - JWT verification
ecoverse-backend/middleware/authMiddleware.js
Sustainability modeling
- GIS campus map
ecoverse-frontend/src/pages/Map.jsx - Impact simulation
ecoverse-frontend/src/pages/Simulate.jsx - Impact analytics
ecoverse-frontend/src/pages/Analytics.jsx - Campus assets API
ecoverse-backend/routes/campus.js - Formula and AI engine
ecoverse-backend/formulaEngine.js
Audit and reporting
- Green audit form
ecoverse-frontend/src/pages/GreenAuditForm.jsx - Generated report
ecoverse-frontend/src/pages/GreenAuditReport.jsx - Report dashboard
ecoverse-frontend/src/pages/MyReports.jsx - Audit API
ecoverse-backend/routes/audit.js
Backend platform
- Contact API
ecoverse-backend/routes/contact.js - REST server
ecoverse-backend/server.js - PostgreSQL via Prisma
ecoverse-backend/prisma/db.js
Other components
- Campus user
- Groq AI service
Connections 33
- Campus user → App router: uses
ecoverse-frontend/src/App.jsx - App router → Home: routes to
ecoverse-frontend/src/App.jsx - App router → Login and signup: routes to
ecoverse-frontend/src/App.jsx - App router → GIS campus map: routes to
ecoverse-frontend/src/App.jsx - App router → Impact simulation: routes to
ecoverse-frontend/src/App.jsx - App router → Impact analytics: routes to
ecoverse-frontend/src/App.jsx - App router → Green audit form: routes to
ecoverse-frontend/src/App.jsx - App router → Generated report: routes to
ecoverse-frontend/src/App.jsx - App router → Report dashboard: routes to
ecoverse-frontend/src/App.jsx - App router → Contact: routes to
ecoverse-frontend/src/App.jsx - Login and signup → Session context: uses session
ecoverse-frontend/src/context/AuthContext.jsx - Session context → Auth routes: calls auth endpoints
- Auth routes → PostgreSQL via Prisma: reads and writes
ecoverse-backend/routes/auth.js - Auth routes → JWT verification: protects session route
ecoverse-backend/routes/auth.js - GIS campus map → Campus assets API: manages campus assets
- Impact simulation → REST server: requests simulations
- Impact analytics → REST server: requests analytics
- Green audit form → Audit API: submits audit
- Report dashboard → Audit API: manages reports
- Generated report → Audit API: loads report
- REST server → Campus assets API: mounts routes
ecoverse-backend/server.js - REST server → Audit API: mounts routes
ecoverse-backend/server.js - REST server → Auth routes: mounts routes
ecoverse-backend/server.js - REST server → Contact API: mounts routes
ecoverse-backend/server.js - REST server → Formula and AI engine: calculates metrics
ecoverse-backend/server.js - REST server → PostgreSQL via Prisma: queries data
ecoverse-backend/server.js - Campus assets API → PostgreSQL via Prisma: reads and writes
ecoverse-backend/routes/campus.js - Campus assets API → JWT verification: requires token
ecoverse-backend/routes/campus.js - Audit API → Formula and AI engine: generates report
ecoverse-backend/routes/audit.js - Audit API → PostgreSQL via Prisma: stores and retrieves
ecoverse-backend/routes/audit.js - Audit API → JWT verification: requires token
ecoverse-backend/routes/audit.js - Formula and AI engine → Groq AI service: requests AI output
ecoverse-backend/formulaEngine.js - Contact API → PostgreSQL via Prisma: persists contact
ecoverse-backend/routes/contact.js