Skip to content

Meal management app built using Python-Django to coordinate the meal selection for employees.

Notifications You must be signed in to change notification settings

jubins/Cornershop-Meals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cornershop-Meals

Cornershop meals is a meal management app built using Python-Django that provides a very convenient way of meal reservation to employees. This app has following features:

  • There is a custom Login page, Signup page, Employee profiles and Admin panel.
  • Admin can create a menu with various options for employees to choose, modify the menu and send Slack messages to all the employees in the company.
  • Employees can login using their credentials, view the menu and make their food selection. Employees cannot make a selection after 11 AM ET, they also have option to write custom notes to modify their meals or mention their diet restrictions.
  • Employees can only view their own selection, not the selection of other employees.
  • Admin can view selections of all the employees.

Go to the menu page to see what's in today's menu and use the app!

Setup

This app is deployed on Heroku https://cornershop-meals-app.herokuapp.com. Please follow below steps if you would like to setup the project locally.

  1. Clone this repository

    $ git clone https://github.com/jubins/Cornershop-Meals.git
    
  2. Create a virtual env with Python 3

    $ virtualenv venv
    $ virtualenv source venv/bin/activate
    
  3. Install dependences

    $ pip install -r requirements.txt
    
  4. I am using Postgres database for storing the data, Redis as message broker, Celery for asynchronous slack messaging and Slack webhook. Configure these environment variables in corenershopmeals/env.ini.

  5. Apply Django migrations

    $ cd cornershopmeals
    $ python manage.py makemigrations
    $ python manage.py migrate
    
  6. Start Django server

    $ python manage.py runserver
    
  7. Run Celery (in a different terminal window)

    $ celery -A cornershopmeals worker -l info
    
  8. Go to localhost:8000/signup to create a food admin employee account that will be the food admin, by checking is_staff option and make sure to choose good username and password otherwise Signup will not occur. You can also create a superuser.

    $ python manage.py createsuperuser
    
  9. Go to localhost:8000/login to create some employee accounts and use the app.

  10. Slack notifications are sent on a channel. Please configure your slack WEBHOOK_URL in corenershopmeals/env.ini to test slack notifications.

Tests

All the test cases are located in

Contact

Demo

This project is hosted on Heroku: feel free to create accounts https://cornershop-meals-app.herokuapp.com/signup/ and test the app.

Login page

Open menu page

Admin can view all menus

Admin can view all employee selections

Employee can choose options

Slack notifications using Celery

About

Meal management app built using Python-Django to coordinate the meal selection for employees.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages