🏆 Official Google PromptWars Submission
Design a solution that helps individuals understand, track, and reduce their carbon footprint through simple actions and personalized insights.
| PromptWars Requirement | EcoPilot Solution |
|---|---|
| Understand | Dynamic Source Breakdown of emissions, real-time natural language activity parser |
| Track | Chronological 7-day trend analysis, category share indicators, cumulative tracking |
| Reduce | One-click daily eco action offsets, net footprint calculations updating instantly |
| Personalized Insights | Context-aware AI recommendations generated by Google Gemini using historical activities |
User Input (Natural Language)
│
▼
Google Gemini API (gemini-2.5-flash with gemini-2.5-pro fallback)
│
▼
Strict JSON Schema Parser (Zod validation)
│
▼
Carbon Calculation Engine (Deterministic mathematical model)
│
▼
Local Storage Service (Mock DB/Auth Layer for isolated judges testing)
│
▼
Custom Hooks Layer (useDashboardStats, useActivityLogger, useOnboarding)
│
▼
Accessible Presenter Components (WCAG 2.2 AA Compliance)
│
▼
[ Understand ] ───► [ Track ] ───► [ Reduce ]
- Static Scoring vs. Continuous Coaching: Traditional calculators compute carbon once and provide generic advice. EcoPilot acts as an ongoing mentor that tracks emissions continuously.
- Manual Form Entry vs. Natural Language: Standard calculators require tedious manual input. EcoPilot extracts complex actions from simple phrases ("drove 15 miles, ate chicken salad").
- No Loop Closure vs. Actionable Reduction: Standard apps don't connect advice to action. EcoPilot offers one-click offsets that directly decrement the daily carbon total in real time.
- Interactive Input Parser: Evaluates everyday tasks from natural language descriptions.
- Dynamic Source Breakdown: Instantly shows the percentage breakdown of emission contributors directly inside the daily stats panel.
- 7-Day Trend Charts: Uses Recharts to visualize day-over-day footprints.
- Category Share Pie Chart: Highlights category distribution.
- Tabular Screen Reader Summaries: Provides accessible tables representing chart data.
- One-Click Eco Actions: Offers quick offset options aligned with user sustainability goals.
- Net Carbon Reductions: Measurable savings that instantly decrease the daily footprint.
- Contextual Advice: Tailors suggestions to the user's specific logged behavior.
- Skip Navigation Link: High-contrast, keyboard-focusable link to bypass menus.
- Landmarks: Explicit header, nav, main, and section structural landmarks.
- Tabular Chart Summaries: Hidden HTML tables summarizing complex graphs.
- Reduced Motion: Global CSS overrides respecting browser media preferences.
- High Contrast: AAA-rated dynamic badges and high-contrast text ratios.
- Prompt Injection Protection: Sanitizes tags and brackets, wrapping input in isolated XML boundaries.
- Structured JSON Parsing: Rigorous validation using Zod.
- Secure API Handling: Uses Next.js server actions to prevent Client API key leakage.
- 25 Pass Specifications: Unit, validation, and integration tests verifying all services.
- Clone the repository:
git clone <repository_url> cd EcoPilot-AI
- Install dependencies:
npm install
- Configure Environment Variables:
Rename
.env.exampleto.envor create a.envfile in the root directory:NEXT_PUBLIC_GEMINI_API_KEY=your_gemini_api_key_here
- Run the development server:
npm run dev
- Description:
AI-powered personal carbon footprint coach built with Next.js and Gemini AI for Google PromptWars. - Topics:
promptwars,gemini,google-ai,nextjs,typescript,sustainability,carbon-footprint,ai-assistant,tailwindcss,hackathon