Skip to content

ClimateTech Carbon Tracking Platform - Track, reduce, and offset your carbon footprint with AI-powered insights

Notifications You must be signed in to change notification settings

pratikrath126/carbontrace-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CarbonTrace AI - ClimateTech Carbon Tracking Platform

CarbonTrace AI React FastAPI Supabase

Track, reduce, and offset your carbon footprint with AI-powered insights

Live Demo · Report a Bug


🌟 Features

1. Carbon Footprint Dashboard

  • Real-time emissions tracking across Transport, Energy, and Food categories
  • Interactive charts (Line charts for trends, Pie charts for category breakdown)
  • Monthly targets vs actual emissions comparison

2. AI Carbon Insights Generator

  • Powered by free OpenRouter models (Trinity, DeepSeek R1, Step-3.5, GLM-4.5)
  • Personalized recommendations based on your emission patterns
  • Smart analysis of reduction opportunities

3. Project Submission & Verification

  • Submit carbon reduction projects (solar, EV, reforestation, etc.)
  • Evidence-based verification system
  • Track verified savings over time

4. Community Challenges

  • Join 30+ day challenges with leaderboards
  • Track personal progress against community goals
  • Compete to reduce emissions together

5. Carbon Credit Marketplace

  • Browse verified carbon credits from global projects
  • Filter by project type (forest, renewable, community)
  • Secure cart and checkout

6. User Authentication

  • Supabase Auth integration
  • Demo mode for immediate exploration

🛠 Tech Stack

Layer Technology
Frontend React 18 + Vite, React Router, Custom CSS
UI Components Lucide Icons, Recharts
Backend FastAPI (Python), OpenRouter AI integration
Database Supabase (PostgreSQL)
AI Models Free OpenRouter models (Trinity, DeepSeek, Step-3.5)
Deployment Vercel (Frontend), Vercel Functions (Backend)

🚀 Getting Started

Prerequisites

  • Node.js 18+
  • Python 3.11+
  • Supabase account (free tier)

Installation

  1. Clone the repository

    git clone https://github.com/prati-ai/carbontrace-ai.git
    cd carbontrace-ai
  2. Set up Supabase

    • Create a new project at supabase.com
    • Run the schema SQL from supabase/schema.sql
    • Copy .env.example to .env and add your credentials
  3. Install frontend dependencies

    cd frontend
    npm install
  4. Install backend dependencies

    cd ../backend
    python -m venv env
    source env/bin/activate  # On Windows: env\Scripts\activate
    pip install -r requirements.txt

Running Locally

Frontend

cd frontend
npm run dev

Backend

cd backend
uvicorn main:app --reload

Access at http://localhost:3000


🌍 AI Integration

CarbonTrace AI uses free OpenRouter models for intelligent carbon analysis:

  • openrouter/arcee-ai/trinity-large-preview:free
  • openrouter/stepfun/step-3.5-flash:free
  • openrouter/z-ai/glm-4.5-air:free
  • openrouter/deepseek/deepseek-r1-0528:free

No API key required for free tier usage. Configure OPENROUTER_API_KEY for higher limits.


📁 Project Structure

carbontrace-ai/
├── frontend/              # React + Vite application
│   ├── src/
│   │   ├── components/    # Reusable UI components
│   │   ├── pages/         # Page components
│   │   ├── services/      # API client
│   │   └── lib/           # Supabase configuration
│   ├── index.html
│   └── vite.config.ts
├── backend/               # FastAPI application
│   ├── main.py            # API endpoints
│   └── requirements.txt
├── supabase/
│   ├── schema.sql         # Database schema
│   └── seed.sql           # Sample data
├── vercel.json            # Vercel deployment config
└── README.md

📦 Deployment

Vercel (Frontend + API)

  1. Install Vercel CLI: npm i -g vercel
  2. Connect to Vercel: vercel login
  3. Deploy:
    vercel --prod

Environment Variables

For production, add these in Vercel dashboard:

Variable Value
VITE_SUPABASE_URL Your Supabase project URL
VITE_SUPABASE_ANON_KEY Your Supabase anon key
VITE_API_URL Backend API URL
OPENROUTER_API_KEY Optional: for higher AI limits

🧪 Testing

# Frontend tests
cd frontend
npm run test

# Backend tests
cd backend
pytest

📄 License

MIT License - feel free to use for personal or commercial projects.


🤝 Contributing

Contributions welcome! Please read our Contributing Guide for details.


Made with 🌿 for a greener planet

Website · GitHub

About

ClimateTech Carbon Tracking Platform - Track, reduce, and offset your carbon footprint with AI-powered insights

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors