Inspiration
Climate impact is something we hear about constantly, but it’s often hard to translate into everyday action. We wanted to build something that makes emissions feel tangible and personal rather than abstract. EcoSense was inspired by the idea of giving users a simple way to log real-life activities—like transportation, electricity use, and food consumption—and immediately see their environmental impact. We also wanted to create something that doesn’t just track data, but actually helps users understand it over time through visualization and AI-driven feedback.
What it does
EcoSense is a carbon footprint tracking web application that helps users measure, visualize, and understand their environmental impact.
- Users can sign up, log in, and securely store their emission-related activity data
- Tracks transportation (distance-based travel), home energy usage (kWh-based), and food consumption
- Uses predefined emission factors stored in the database to calculate consistent CO₂ estimates
- Displays a dashboard with totals, breakdowns, and visual charts
- Includes an AI Eco Advisor powered by Google Gemini that provides personalized insights based on user history
- Allows users to export a PDF report summarizing their footprint and AI-generated insights
In short: log → analyze → visualize → understand → export
How we built it
EcoSense is a full-stack web application built with a React + TypeScript frontend and a Node.js + Express backend.
Frontend
- React 19 with Vite
- Context API for authentication and emissions state
- CSS Modules for styling
- Client-side routing for navigation
Backend
- Express.js with TypeScript
- PostgreSQL database
- Sequelize ORM with migrations and seeders
- JWT authentication and protected routes
- Joi validation for request safety
AI Integration
- Google Gemini API (
@google/generative-ai) - System prompts include structured user footprint data when available
- Context-aware responses based on logged emissions
Other Tools
- jsPDF for generating downloadable reports
- REST API structure under
/api/v1/... - CORS configured for secure frontend-backend communication
We model emissions using:
[ E = A \cdot f ]
where (E) is emissions (kg CO₂e), (A) is activity intensity, and (f) is the emission factor.
Total emissions:
[ E_{\text{total}} = \sum_i E_i ]
Challenges we ran into
- Keeping frontend, backend, and database models consistent across multiple emission categories
- Managing authentication flows (JWT persistence and
/mesession refresh) - Passing structured user data into the AI without exceeding token limits
- Ensuring the AI advisor only personalizes responses when data exists
- Making PDF export reliable even when API or AI responses are slow
- Debugging migrations, seeders, and CORS issues during integration
Accomplishments that we're proud of
- Fully working end-to-end system: auth, logging, dashboard, AI advisor, and PDF export
- Centralized emission factors stored in the database (not hardcoded)
- AI advisor that meaningfully adapts to user-specific footprint data
- Clean separation between frontend and backend services
- A complete product that turns abstract emissions into actionable insights
What we learned
- How to design APIs around real user workflows (log → store → analyze → visualize)
- Sequelize migrations and seeders as a reliable source of truth
- Effective prompt and context design for LLM integration
- Trade-offs between client-side vs server-side API key handling
- Full-stack debugging across frontend, backend, and database layers
What's next for EcoSense
- Move Gemini integration fully server-side for better security
- Add new categories (waste, shopping, lifestyle habits)
- Introduce monthly trends, goals, and carbon budgets
- Improve analytics and comparisons over time
- Add automated testing and CI/CD pipelines
- Improve accessibility and UI polish for a smoother experience
Log in or sign up for Devpost to join the conversation.