Manage food in your fridge and get inspired by recipes based on your current products - fight food waste today!
- Live demo
- The goal of the project
- Main functionalities of the application
- Watch the user tutorial
- Run project locally
- Why did I create this project?
- What I've learnt during this project?
- Used libraries
- Possible future improvements
- Contributing
- License
Use this link to check the demo of this application hosted by Pythonanywhere.com.
The goal of this project is to deploy a Django web application allowing the users to manage their fridges and reduce the food waste. The key functionality of the app is to search for recipes using the products stored currently in the fridge.
The application provides an interface and tools designed for managing products stored in a fridge.
The key functionalities in the app include:
- Register as a new user - Register to the system.
- Add your fridge - Create your fridge and define its details
- Share your fridge with another users - Use an invitation link, send it to another user, and manage one fridge together
- Add products to your fridge - Add new products by defining their name, expiration date, amount, etc.
- Search for recipes - Check out the meal which can be made using the products in your fridge
- User dashboard - See statistics of your account in one place
- Install virtualenv:
pip install virtualenv
- Create a virtual environment:
virtualenv <my_env_name>
- Activate the environment:
source <my_env_name>/bin/activate
- Install the requirements in the current environment:
pip install -r requirements.txt
- This step is optional - if you want to deactivate your current environment use hte following command:
deactivate
- Register at Spoonacular here
deactivate
- Copy your private api key from the user dashboard. Remember to keep your api key private and do not share it publicly!
- Create .env file with api key in the directory with manage.py file (FridgeManager/fridgemanager). Use the template given below and paste your private api key.
SPOONACULAR_API_KEY=your_api_key
With active virtual environment, run the following commands to run the Django project.
- Go to the project directory:
cd fridgemanager
- Run server using manage.py file:
python manage.py runserver
By creating this app I would like to have an impact on the global food waste problem. According to Greenly Institute:
"Over a third of all food produced (~2.5 billion tons) is lost or wasted each year. One third of this occurs in the food production stage. Boston Consulting Group (BCG) estimates this wasted food is worth $230 billion.
👉 Researchers estimate the lost food calories from food waste amount to roughly 24% of the total available food calories."
Users of my app can #ActLocallyAndThinkGlobally by reducing their own food waste.
The database diagram shows the relationships between the models. It was generated using DataGrip from Jetbrains.
During this project I learnt how to:
- setup user authorisation in Django (docs)
- use Bootstrap for styling (docs)
- create custom error pages (tutorial)
- manage relationships between Django models (docs)
- improved my skills in creating Django forms (docs)
- use spoonacular API (docs)
- create a better README.md
- write Unit tests in Django (docs)
- Django
- requests
- secrets
- Add an option to define the priority of products used as ingredients - the user can define what products he/she wants to use today
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.