EcoTrack helps you understand and reduce your carbon footprint by tracking your daily activities. Get personalized insights and recommendations to make sustainable choices! 🌍
- Track daily activities: transportation, food, and energy use
- Visualize your carbon impact with dashboards and charts
- Get smart, actionable recommendations
- Clone the repo
- Install dependencies
- Run the app
Contribute to a greener planet with EcoTrack! 🌳
ecotrack/
├── backend/ # Node.js/Express backend
├── frontend/ # React frontend
└── README.md # This file
- User authentication and profile management
- Activity logging with carbon footprint calculation
- Dashboard with visual analytics
- Goal setting and progress tracking
- Personalized recommendations
- Monthly reports and insights
- Node.js
- Express.js
- MySQL
- JWT Authentication
- Sequelize ORM
- React.js
- Material-UI
- Chart.js for visualizations
- Axios for API calls
- Node.js (v14 or higher)
- MySQL (v8.0 or higher)
- npm or yarn package manager
-
Navigate to the backend directory:
cd backend -
Install dependencies:
npm install
-
Create a
.envfile with the following variables:DB_HOST=localhost DB_USER=your_username DB_PASSWORD=your_password DB_NAME=ecotrack JWT_SECRET=your_jwt_secret PORT=8080 -
Initialize the database:
mysql -u your_username -p < db/schema.sql mysql -u your_username -p ecotrack < db/seed.sql
-
Start the server:
npm start
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install
-
Start the development server:
npm start
The backend API provides the following endpoints:
- POST /api/auth/register - Register a new user
- POST /api/auth/login - Login user
- GET /api/auth/profile - Get user profile
- POST /api/activities - Log a new activity
- GET /api/activities - Get user's activities
- GET /api/activities/:id - Get specific activity
- GET /api/dashboard/summary - Get user's carbon footprint summary
- GET /api/dashboard/goals - Get user's goals and progress
- GET /api/recommendations - Get personalized recommendations
- 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
Made with ❤️ by Sarvagna


