EcoSim is an interactive web platform and AI-powered simulation tool that allows users to explore climate policy decisions and instantly understand their environmental impact. Built for a sustainability and AI hackathon, the platform acts as a decision-support tool. It visualizes environmental outcomes like global temperature change, emissions levels, and sea level rise dynamically, based on user-adjusted policy variables.
The system combines actual climate data, robust simulation logic, AI reasoning, and immersive 3D visualization to help policymakers, researchers, and citizens understand the consequences of different sustainability strategies.
- Interactive Policy Controls: Adjust key variables such as carbon tax levels, renewable energy adoption, deforestation reduction, and methane mitigation.
- Real-time Climate Metrics: The system calculates and displays global temperature rise, CO2 concentration, emissions trajectory, and sea level rise as policies change.
- 3D Earth Visualization: An immersive Three.js-powered globe displaying warming heatmaps, emission particles, and deforestation changes.
- AI Climate Advisor: An intelligent assistant that analyzes your simulation results and explains in plain language the environmental consequences of your chosen policy combinations.
- Sustainability Goal Mode: Set specific targets (e.g., "Limit warming to 1.5°C") and let the AI suggest optimal policy strategies to achieve them.
- React 18
- TypeScript
- Vite
- React Three Fiber (Three.js) for 3D rendering
- TailwindCSS
- TanStack Query
- Python 3.11+
- FastAPI
- Pydantic
- AI Layer: LLM API (DeepSeek)
- Package Manager: pnpm
Frontend (React)
↓ API requests
Backend (FastAPI)
↓
Climate Simulation Engine
↓
AI Explanation Layer
- Node.js (v18+)
- pnpm
- Python (3.11+)
Create a .env file in the client directory:
VITE_API_URL=http://localhost:8001/apiCreate a .env file in the server directory and add your necessary API keys:
DEEPSEEK_API_KEY=your_api_key_hereNavigate to the client directory, install dependencies, and start the Vite development server.
cd client
pnpm install
pnpm devNavigate to the server directory, create a virtual environment (optional but recommended), install the required dependencies, and run the FastAPI server.
cd server
pip install -r requirements.txt # Or your chosen Python dependency manager
uvicorn app.main:app --port 8001 --reloadTo run the frontend tests:
cd client
pnpm test- Frontend: Use TypeScript and functional React components. Prefer hooks over class members. Use TanStack Query for remote state management. All 3D logic lives in
src/scenesand should not mix with general UI state. - Backend: Keep API routing thin and push logic into
servicesandclimatefolders. Wait for the simulation logic inside the backend; the frontend should not do heavy climate math. - Commit Strategy: Use specific feature branches like
feature/earth-visualizationorfeature/policy-simulation. Ensure themainbranch is always deployable.