This is a Flutter application that calculates carbon emissions based on cargo weight and travel distance using the Google Maps API. The app integrates with Supabase for user management and authentication.
This project is designed to provide an estimate of carbon emissions for trips based on input factors:
- Distance between two locations (calculated via Google Maps API)
- Cargo weight entered by the user
The application is ideal for logistics, delivery services, and eco-conscious users looking to monitor environmental impact.
Supabase is used to handle user authentication and management.
- User Authentication: Login and registration powered by Supabase.
- Distance Calculation: Calculates travel distance using Google Maps API.
- Carbon Emission Estimation: Computes carbon emissions based on cargo weight and travel distance.
- Interactive Map: Visualize start and end points on Google Maps.
- Flutter (UI development for cross-platform compatibility)
- Google Maps API (distance and map visualization)
- Supabase (user management and authentication)
Follow these steps to set up the project locally:
- Flutter SDK installed (Flutter Installation Guide)
- Google Cloud Platform project with Maps API enabled (Get an API Key)
- Supabase project set up (Supabase Quickstart)
-
Clone this repository:
git clone <https://github.com/PhoenixAlpha23/CarbonCourier/tree/main> cd <lib>
-
Install dependencies:
flutter pub get
-
Add API keys:
- Create a
.env
file in the root folder. - Add your Google Maps API key and Supabase credentials.
GOOGLE_MAPS_API_KEY=your_google_maps_key_here SUPABASE_URL=your_supabase_url_here SUPABASE_ANON_KEY=your_supabase_anon_key_here
- Create a
-
Run the app:
flutter run
project-folder/
├── assets/ # App images and icons
├── lib/ # Main source code
│ ├── main.dart # Entry point of the app
│ ├── pages/ # Screens for the app
│ ├── services/ # API and backend integrations
│ ├── widgets/ # Reusable components
├── pubspec.yaml # Project dependencies
└── README.md # Project documentation
-
Run the App
- Launch the app on a simulator/emulator or physical device.
-
Log In / Sign Up
- Register or log in using Supabase authentication.
-
Calculate Carbon Emissions:
- Enter cargo weight.
- Select the starting point and destination on the map.
- View the calculated distance and carbon emissions.
- Data Storage: Save previous trips and carbon calculations in a database.
- Advanced Estimations: Incorporate fuel types and vehicle efficiency for more accurate emissions.
- UI Enhancements: Improve the interface for better user experience.
- Analytics Dashboard: Display visual reports on carbon footprints over time.
Contributions are welcome! If you find any bugs or have suggestions, feel free to open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.