Our capstone project, Pantry Helper, addresses difficulties and inefficiencies in food pantry operations, making processes smoother for both pantries and donors. Pantry Helper simplifies operations for pantries while providing donors with a more seamless experience. Our solution aims to alleviate operational challenges, ultimately improving the efficiency and effectiveness of food pantry operations.
Pantry Helper is a web-based inventory application designed to help food pantries, specifically the Feed U Pantry at the University of Utah, streamline their donation management process.The application provides a user-friendly interface for recording incoming donations, tracking outgoing food distribution, and generating insightful data analysis reports. Pantry Helper's data analysis features help food pantries identify patterns in donation trends and popular items,enabling them to make informed decisions about future inventory needs and fundraising efforts. The data analysis will also gather data regarding what items are expiring so that future donations will lead to more distributions and less waste. It will also monitor items that are low in stock, encouraging donors to contribute the needed items.
Additionally, the application's automated email system fosters positive relationships between donors and recipients by allowing recipients to express their gratitude directly to the donors, potentially encouraging repeat donations. Pantry Helper automates tedious inventory management tasks and provides valuable data insights, which empowers food pantries to operate more efficiently and effectively.
By simplifying the donation process, this will ultimately enable them to serve their communities to a greater extent. This project is a perfect capstone project as it addresses a real-world need within the food pantry community. The project is feasible, impactful, and has the potential to make a significant difference in the lives of those who rely on food pantries for assistance.
- Introduction
- Technologies Used
- Setup Instructions
- Frontend Setup
- Backend Setup
- Running the Application
- Environment Variables
- Troubleshooting
This project consists of two parts:
- Frontend: Built with React.js and serves as the user interface.
- Backend: Built with Node.js and Express, acting as the API and database handler.
- React.js
- Ant Design
- Axios
- Recharts
- Moment.js
- XLSX
- React Grid Layout
- Node.js
- Express
- MySQL
- Swagger for API Documentation
Before setting up the project, ensure the following are installed:
-
Navigate to the frontend directory:
cd pantry-helper-frontend -
Install dependencies:
npm install
-
Configure environment variables: Create a
.envfile in thepantry-helper-frontenddirectory:touch .env
Add the following:
REACT_APP_BACKEND_URL=http://localhost:5000
-
Run the frontend server:
npm start
By default, the frontend will be available at http://localhost:3000.
-
Navigate to the backend directory:
cd pantry-helper-backend -
Install dependencies:
npm install
-
Configure environment variables: Create a
.envfile in thepantry-helper-backenddirectory:touch .env
Add the following:
DB_HOST=localhost DB_USER=your_db_username DB_PASSWORD=your_db_password DB_NAME=your_db_name PORT=5000
-
Start the MySQL database: Ensure your MySQL server is running. Create the required database:
CREATE DATABASE pantry_helper;
-
Run the backend server:
npm start
By default, the backend will be available at http://localhost:5000.
To run the full application:
-
Start the backend server:
cd pantry-helper-backend npm start -
Start the frontend server in a new terminal:
cd pantry-helper-frontend npm start -
Open your browser and navigate to http://localhost:3000.
Add the following to the pantry-helper-frontend/.env file:
REACT_APP_BACKEND_URL=http://localhost:5000Add the following to the pantry-helper-backend/.env file:
DB_HOST=localhost
DB_USER=your_db_username
DB_PASSWORD=your_db_password
DB_NAME=your_db_name
PORT=5000-
Module not found errors:
- Ensure all dependencies are installed in both the
pantry-helper-frontendandpantry-helper-backenddirectories:npm install
- Ensure all dependencies are installed in both the
-
Database connection issues:
- Check your
.envfile for correct database credentials. - Ensure the MySQL server is running.
- Check your
-
CORS issues:
- Ensure the backend is configured to accept requests from the frontend's origin.
-
Port conflicts:
- Change the
PORTvariable in the.envfile for the backend. - Use the following command to start the frontend on a different port:
PORT=3001 npm start
- Change the
-
Layout overlapping issues:
- Clear browser cache or refresh the application.
-
API issues:
- Use tools like Postman or Insomnia to debug backend API endpoints.
-
API Documentation: The backend includes Swagger for API documentation. You can access it at:
http://localhost:5000/api-docs -
Version Compatibility: Ensure you have Node.js 14+ and npm installed. Check your versions using:
node -v npm -v
By following these instructions, you will:
- Install dependencies for both the frontend and backend.
- Configure environment variables.
- Run the servers to access the Pantry Helper application.
Enjoy using Pantry Helper! 🎉