Overview:
EcoHabit is a web app project designed to create awareness and encourage environmentally friendly habits. The app tracks users’ activities such as recycling, commuting, and eating, and visualizes their habits. It also provides users with information on the closest recycling locations and instructions on how to properly recycle various materials. The frontend of the app is built using React and Material UI, while the backend is built using NodeJS/ExpressJS and MongoDB as the database.
Features:
- Habit tracking and visualization of users’ activities
- Encouragement for users to improve their habits with alternative options
- Information on the closest recycling locations
- Clear instructions on how to properly recycle each material
Installation:
To get started, follow these steps:
- Download and install the latest version of Git from https://git-scm.com/downloads.
- Open the terminal and run the command
git -v
to check if Git is on the latest version. - Download and install the latest version of NodeJS and npm from https://nodejs.org/en/. npm is included with the NodeJS installation.
- Run the command
node -v
to check if NodeJS is on the latest version. - Run the command
npm -v
to check if npm is on the latest version. - Clone the repository for this project by running the following command in a terminal:
git clone https://github.com/lugenx/ecohabit.git
- Open the cloned folder in VS Code.
- Open the terminal and make sure it is pointing to the root of the cloned project.
To run the backend NodeJS application:
- Change the directory to the server folder using the terminal command:
cd server
- Create an .env file in the root of the server directory and copy the content from .env.example into the new .env file.
- Run the command
npm install
to download all the packages/dependencies. - Once the download is complete, run the command
npm start
to start the app in development mode. - You can start making HTTP calls to http://localhost:3001.
To run the frontend ReactJS application:
- Change the directory to the client folder using the terminal command:
cd client
- Run the command
npm install
to download all the packages/dependencies. - Once the download is complete, run the command
npm start
to start the app in development mode. - Open http://localhost:3000 to view the app in the browser.
- The page will automatically reload if you make any edits, and lint errors will be displayed in the console.
Summary:
EcoHabit is a web app project that aims to create awareness of the environment and help users build environmentally friendly habits. It tracks users’ activities, encourages them to improve their habits, and provides information on recycling locations and instructions. The app’s frontend is built using React and Material UI, and the backend uses NodeJS/ExpressJS with MongoDB as the database.