SavEarth is a full-stack web application built on the PERN stack (PostgreSQL, Express, React, Node.js) designed to help households and businesses calculate their carbon footprints. This project was developed as a college project to promote environmental awareness and action.
SavEarth allows users to calculate their carbon footprint based on various parameters. It provides detailed insights and suggestions on how to reduce their carbon emissions.
- User authentication and authorization
- Carbon footprint calculator for households and businesses
- Detailed reports and donut chart representation.
- Responsive design for all devices
- User-friendly interface
- Frontend: React.js, Tailwind CSS
- Backend: Node.js, Express.js
- Database: PostgreSQL
- Hosting: Render
- Version Control: Git, GitHub
Follow these steps to set up the project locally:
-
Clone the repository:
git clone (https://github.com/Sais-27/SavEarth.git)
-
Navigate to the project directory:
cd SavEarth
-
Install backend dependencies:
npm install
-
Install frontend dependencies:
cd ./client npm install
-
Set up environment variables:
Create a
.env
file in theserver
directory and add your database details:PG_USER=your_user_name PG_HOST=your_host_name PG_DATABASE=your_database_name PG_PASSWORD=your_password PG_PORT=5432 SESSION_SECRET=your_secret MAIL=your_mail APP_PASSWORD=your_app_password ADMIN_MAIL=admin_mail ADMIN_PASS=admin_password GEMINI_API_KEY=your_api_key OAUTH_CLIENT_ID=your_client_id OAUTH_SECRET=your_secret
-
Start the backend server:
cd ./server node index.js
-
Start the frontend development server:
cd ./client npm run dev
-
Open your browser and navigate to
http://localhost:5173
.
- Register a new account or log in with an existing account.
- Choose whether you want to calculate the carbon footprint for a household or a business.
- Fill in the required information in the form.
- View the calculated carbon footprint and suggestions for reducing emissions.
Thanks to the following who have contributed to this project:
It was a hackathon project and the motivation behind Prithvi is to provide a tool that helps individuals and businesses become more aware of their environmental impact. By understanding their carbon footprint, users can take actionable steps towards reducing their emissions and contributing to a healthier planet.