π βHappiness doesnβt result from what we get, but from what we give." ~ Ben Carson π
Majority of us have noticed items which go to waste even when they are in their prime condition. For example, many atriums, dining halls around the world, dispose of their leftovers at the end of the day, and a lot of food is being wasted.
We introduce to you Donatify, a platform for donors and receivers to communicate, donate and recieve items respectively. In simple terms, a user would put up items which they would like to donate, and other users, if their interests match with the item, would choose to receive it.
Want to be part of an environment saving initiative, while sitting in the comfort of your home? Get on Donatify, donate the stuff you don't need, and feel good.
Demo_video.mp4
List available items:
Donate an item:
Accept a donation:
-
Backend: flask (2.2.2), flask_cors (3.0.10), json, asyncio, ast, re, mysql (8.0.30), pytest (7.1.2), pdoc (0.10.0).
Frontend: axios (1.0.0), antd (4.23.4), jsdoc (3.6.11), react-select (5.4.0), react-tag-input (6.8.1), reactstrap (9.1.4), jest.
-
Backend: Documentation
- Create virtual environment
python -m venv <name_of_virtualenv>
- Activate Python Virtual environment
<name_of_virtualenv>\Scripts\activate.bat for Windows users. source <name_of_virtualenv>/bin/activate for linux users.
- Install dependencies
pip install -r requirements.txt
-
Make sure the database is imported from
src/database/donationsystem.sql
onto the mysql server. -
Run the below command from the main directory to start the backend application server.
python -m src.Backend.app
- The backend flask application will be up and running at
localhost:5001
Frontend: Documentation
-
After cloning the repository, move to the directory
src\frontend
where our frontend code is located. -
Install all the dependencies using npm. Command to run:
npm install
. This will fetch the dependecies from package.json file, and install them. -
Start the server by using the command
npm start
. This will run the server on port3000
, and the website can be accessed by going tohttp://localhost:3000/
. -
If credentials of a registered user are available, use them, or register a new user and interact with the website.
-
Backend
- Run the below command from the main directory. This should run all the test cases for app.py.
pytest
Frontend
-
Move to the directory
src\frontend
where our frontend tests are located. -
Run the tests using the command
npm test -- --coverage --watchAll=false
. This will run all the tests across the frontend code.
-
Try the following troubleshooting steps. If none of them work, contact the repository owner/file an issue.
Backend
- We have added the print statements in all of the backend functions to know execution of the codes.
- In case of error the print statements will let us know about the issue of code break.
- The api responses the status code, valid message and response header which they can share back for troubleshooting.
Frontend
- Since frontend is build using JavaScript, React and Redux, check for console logs under developer tools to identify any failures.
- Consider installing and using React developer tools and Redux developer tools to track the request through the system.
.
βββ .github
| βββ workflows
| | βββ frontendGitActions.yml # GitActions workflow for frontend
| | βββ backendGitActions.yml # GitActions workflow for frontend
βββ .vscode
| βββ extensions.json # Recommended extensions for vscode
| βββ settings.json # Workspace settings for vscode
βββ docs
| βββ Rubrics
| | βββ proj1rubric.md # Project rubric
| βββ Backend # Documentation for backend
| βββ frontendDocs/left-overs/0.1.0 # Documentation for frontend
| βββ README.md # Readme file for docs folder
βββ src
| βββ Backend
| | βββ __init__.py # Init file for backend
| | βββ app.py # File containing backend APIs
| | βββ dbconfig.py # DB configuration for backend
| | βββ utils.py # Utilities for backend
| βββ database
| | βββ donationsystem.sql # Backend SQL
| βββ frontend
| | βββ public # Folder containing assets and images
| | βββ src
| | | βββ API # Folder containing API calling frontend code
| | | βββ __tests__ # Folder containing unit tests for frontend
| | | βββ app # Folder containing redux store configuration
| | | βββ components # Folder containing frontend react components
| | | βββ containers # Folder containing containers to connect components with redux store
| | | βββ reducers # Folder containing reducers
| | | βββ axiox.js # API client generation
| | | βββ index.css # CSS configuration for frontend
| | | βββ index.js # Entry point for frontend
| | | βββ leftOver.jsx # Root react component
| | | βββ setupTests.js # Setup jest configuration for unit testing
| | βββ .eslintignore # Ignore configuration for eslint
| | βββ .eslintrc.js # eslint configuration
| | βββ package.json # Package configuration and dependency closure
| βββ README.md # Readme file for src folder
βββ test
| βββ README.md # Readme file for test folder
| βββ __init__.py # Init file for test folder
| βββ test_app.py # Tests for backend
βββ .gitattributes # File for git attributes
βββ .gitignore # File for git ignore
βββ CODE_OF_CONDUCT.md # Code of conduct for repository
βββ CONTRIBUTING.md # Details about contributing to the repository
βββ LICENSE.md # MIT License details
βββ README.md # Readme file for repository
βββ requirements.txt # Details of dependency packages
βββ setup.py # Setup file for the module
- Donatify v0.1: Initial v0.1 release
- Donatify v1.0.0: First major release
- Donatify v1.0.1: Minor version release
- Donatify v1.0.2: Minor version release
- Roadmap for this project can be found here.
- All the communication was handled through a private chat channel and online meets. Some screenshots of discussions can be found here.
We do our best to answer all tickets in a timely manner, but sometimes we accumulate a backlog and may take awhile to respond. Please be patientβwe will get back to you as soon as we can! Please do contact any of us:
- Akash Gupta(agupta57@ncsu.edu)
- Arun Srinivasan P(apartha4@ncsu.edu)
- Nagaraj Madamshetti(nmadams@ncsu.edu)
- Nitesh Mishra(nmishra4@ncsu.edu)
- Sumit Singh(ssingh57@ncsu.edu)
- We are using MIT license
- Copyright (c) 2022 Group 22
Thanks goes to these wonderful people.