The ultimate web app for a well organized lunch.
- Table of contents
- Development environment setup
- Additional installations before contributing
- Release strategy from
development
tomain
branch - Google Cloud Platform utilities
Data-Lunch is a web app to help people managing lunch orders.
The interface make possible to upload a menu as an Excel file or as an image. The menu is copied inside the app and people are then able to place orders at preset lunch times.
Users can flag an order as a takeway one, and, if something change, they can move an order to another lunch time (or change its takeaway status).
The systems handle guests users by giving them a limited ability to interact with the app (they can in fact just place an order).
Once all order are placed it is possible to stop new orders from being placed and download an Excel files with every order, grouped by lunch time and takeaway status.
The idea behind this app is to simplify data collection at lunch time, so that a single person can book a restaurant and place orders for a group of people (friends, colleagues, etc.).
Important
This section is a work in progress, the app has a lot of configurations, not yet described in this documentation.
Authentication and guest management are just examples of what is missing from this documentation.
Install commitizen using pip
:
pip install dlunch
For the program to work properly you need the following system dipendencies:
- SQLite: used if you set the database to
sqlite
. - Tesseract: used to convert images with menu to text.
If you need help on how to install those system preferences on linux (Debian) you can check the file docker/web/Dockerfile.web
.
It shows how to install them with apt
.
Before starting you need the following environment variables to avoid errors on Data-Lunch startup.
Important
DATA_LUNCH_COOKIE_SECRET
and DATA_LUNCH_OAUTH_ENC_KEY
are required even if server=no_auth
is set.
Tip
Use the command data-lunch utils generate-secrets
to generate a valid secret.
Variable | Type | Required | Description |
---|---|---|---|
PANEL_ENV |
str | ✔️ | Environment, e.g. development, quality, production, affects app configuration (Hydra) |
PORT |
int | ❌ | Port used by the web app (or the container), default to 5000; affects app configuration (it is used by Hydra) |
DATA_LUNCH_COOKIE_SECRET |
str | ✔️ | Secret used for securing the authentication cookie (use data-lunch utils generate-secrets to generate a valid secret); leave it as an empty variable if no authentication is set |
DATA_LUNCH_OAUTH_ENC_KEY |
str | ✔️ | Encription key used by the OAuth algorithm for encryption (use data-lunch utils generate-secrets to generate a valid secret); leave it as an empty variable if no authentication is set |
Note
The following variables are just a small part of the total. See [here][environment-variables] for more details.
Use the following command to start the server with default configuration (SQLite database, no authentication):
python -m dlunch
Connect to localhost:5000 (if the default port is used) to see the web app.
Data-Lunch configurations explout Hydra versatility. It is possible to alter default configurations by using Hydra's overrides, for example
python -m dlunch panel/gui=major_release
will alter some graphic elements to show a release banner.
A Docker image with Data-Lunch is available here.