Skip to content

App designed to reduce food waste by managing prodcuts in your fridge

License

Notifications You must be signed in to change notification settings

Danzigerrr/Fridge-Manager

Repository files navigation

Fridge Manager - web application using Django framework

Manage food in your fridge and get inspired by recipes based on your current products - fight food waste today!

Author: Krzysztof Nazar

Table of contents

Live demo

Use this link to check the demo of this application hosted by Pythonanywhere.com.

The goal of the project

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.

Main functionalities of the application

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

Run project locally

Installation of libraries

  1. Install virtualenv:
pip install virtualenv
  1. Create a virtual environment:
virtualenv <my_env_name>
  1. Activate the environment:
source <my_env_name>/bin/activate
  1. Install the requirements in the current environment:
pip install -r requirements.txt
  1. This step is optional - if you want to deactivate your current environment use hte following command:
deactivate

Set up Spoonacular API

  1. Register at Spoonacular here
deactivate
  1. Copy your private api key from the user dashboard. Remember to keep your api key private and do not share it publicly!

getting_api_key.png

  1. 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

Running the project

With active virtual environment, run the following commands to run the Django project.

  1. Go to the project directory:
cd fridgemanager
  1. Run server using manage.py file:
python manage.py runserver

Why did I create this project?

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.

Database diagram

The database diagram shows the relationships between the models. It was generated using DataGrip from Jetbrains.

database_diagram.png

What I've learnt during this project?

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)

Used libraries

  • Django
  • requests
  • secrets

Possible future improvements

  • Add an option to define the priority of products used as ingredients - the user can define what products he/she wants to use today

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

About

App designed to reduce food waste by managing prodcuts in your fridge

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published