This is the official repository for our MERN stack project aimed at reducing food waste by connecting donors with NGOs.
Follow these steps carefully to get the project running on your local machine.
Make sure you have the following software installed:
First, clone the repository to your machine:
git clone https://github.com/your-username/your-repo-name.git
cd surplus-food-platform
The backend server runs on Node.js and connects to our shared database.
- Navigate to the server directory:
cd server - Install all required packages:
npm install - IMPORTANT: Configure Environment Variables
- Create a copy of the
.env.examplefile and name it.env. - Open the new
.envfile. - Ask the team leader for the
MONGO_URIconnection string and paste it as the value forMONGO_URI.
- Create a copy of the
- Start the backend server:
npm run dev
The server should now be running at http://localhost:5001.
The frontend is a React application.
- Open a new terminal window.
- Navigate to the client directory from the project root:
cd client - Install all required packages:
npm install - Start the frontend application:
npm start
Your browser should automatically open to http://localhost:3000. You are now ready to code!