Basic management system to coordinate the meal delivery for Cornershop employees.
- You'll need to install docker
- Clone this repo
$ git clone https://github.com/dannyboscan/Backend-Test-Boscan.git
- Create a Slack app, the app created must have the following permissions chat:write, im:write, channels:join and channels:read
- Finally copy and save your bot token. You'll need this to setup the app.
Create and start containers
$ docker-compose up -d --build
Create a admin user
$ docker-compose exec mealorders python manage.py createsuperuser --username <username> --email <email>
Navigate to http://localhost:3000/ within your browser of choice to view the client app and http://localhost:8000/docs/ to view the Cornerlunch API Docs.
Don't forget sign in with your admin user credentials
Navigate to http://localhost:3000/settings/ to setup the Slack App with your bot token previously copied and saved, then choose one channel of your preference for notifications.
Note: If you don't receive the slack message please add the created App to the channel
Before place a order, you'll need to create a menu, to do that navigate to http://localhost:3000/menus/
Navigate to http://localhost:3000/menu/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/ (Menu UUID)
Run the tests with coverage
$ docker-compose exec mealorders pytest -p no:warnings --cov=. --cov-report html
The HTML version can be viewed within the newly created "htmlcov" directory.
$ open app/htmlcov/index.html
$ docker-compose down -v