CarbonWise is a web application that helps users track and manage their carbon footprint through monitoring energy usage, transportation habits, and dietary choices.
- 🚗 Transportation carbon footprint tracking
- 🔋 Energy usage monitoring with solar integration
- 🥗 Diet-based carbon footprint analysis
- 📊 Dashboard with visualization
- 🔐 Secure authentication with Clerk
- 🤖 AI-powered recommendations using Gemini AI
- Python 3.8+
- Node.js 16+
- MongoDB
- Clerk Account (for authentication)
- Gemini AI API Key
- Navigate to the backend directory:
cd backend
- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows use: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Create a
mongopass.py
file with your MongoDB connection string:
mongopass = "your_mongodb_connection_string"
- Create a
geminiKey.py
file with your Gemini API key:
GEMINI_API_KEY = "your_gemini_api_key"
- Navigate to the frontend directory:
cd frontend
- Install dependencies:
npm install
- Create a
.env
file with your Clerk publishable key:
VITE_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
- From the backend directory:
python app.py
The server will start at http://localhost:5000
- From the frontend directory:
npm run dev
The application will be available at http://localhost:5173
cd frontend
npm run build
This will create a dist
directory with production-ready files.
The backend can be deployed to any Python-compatible hosting service. Make sure to:
- Set up environment variables for sensitive data
- Configure CORS settings appropriately
- Set up MongoDB connection in production
carbon-footprint-tracker/
├── frontend/ # React frontend application
│ ├── src/
│ │ ├── routes/ # Application routes
│ │ ├── components/ # Reusable components
│ │ ├── layouts/ # Layout components
│ │ └── lib/ # Utility functions and constants
│ └── ...
└── backend/ # Flask backend application
├── app.py # Main application entry
├── db.py # Database configuration
├── main.py # Core business logic
└── geminiService.py # AI service integration
- React
- Vite
- TailwindCSS
- DaisyUI
- Clerk Authentication
- React Router
- Flask
- MongoDB
- Pandas
- Gemini AI API
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.