EcoTrack is a smart carbon footprint awareness platform that helps users measure lifestyle emissions, understand major sources, complete eco goals, and track progress over time.
- Carbon footprint calculator for transportation, electricity, food, shopping, waste, and travel.
- Personalized dashboard with total monthly/yearly footprint, major source, average comparison, and reduction target.
- Rule-based smart insight engine that prioritizes practical emission-reduction suggestions.
- Eco goals and challenges with points, badges, projected savings, and completion tracking.
- Progress visualization from last month to current footprint and goal-adjusted projection.
- Awareness content for climate facts, renewable energy, recycling, and sustainable habits.
- Local profile and browser-private persistence for calculator progress.
- Backend API route at
POST /api/footprintwith schema validation and safe error handling. - Security headers including CSP, frame protection, content-type protection, permissions policy, and referrer policy.
- Frontend: Next.js, React, TypeScript, Tailwind CSS
- Backend: Next.js route handlers on Node.js
- Validation: Zod
- Testing: Vitest and Testing Library setup
- Visualization: Accessible CSS/SVG charts
npm install
npm run devOpen http://localhost:3000.
npm run lint
npm run typecheck
npm run test
npm run buildcurl -X POST http://localhost:3000/api/footprint \
-H "Content-Type: application/json" \
-d '{
"transportationMode": "public-transit",
"weeklyTravelKm": 95,
"electricityKwh": 185,
"renewablePercent": 12,
"dietType": "mixed",
"mealsOutPerWeek": 3,
"shoppingFrequency": "monthly",
"wasteBagsPerWeek": 2,
"recyclingHabit": "sometimes",
"shortFlightsPerYear": 1,
"longFlightsPerYear": 0
}'EcoTrack directly addresses the problem statement by calculating a personal carbon footprint and converting the result into clear insights, progress tracking, awareness content, and action-oriented challenges.