Skip to content
/ samuel Public

From Google Sheets and hole-punch cards to one-click order

License

Notifications You must be signed in to change notification settings

eyalch/samuel

Repository files navigation

Samuel

From Google Sheets and punch cards to a single-click order! This project was made to streamline the process of managing and scheduling dishes by our company chef, as well as placing orders by the employees.

Overview

Instead of each morning sending the dishes available for today to the reception desk and them sending an email to the employees, now the chef could easily do it by himself! Just fill the form for a new dish, choose a date, and click a button to send an email.

After scheduling some dishes and distributing them by email, the users could order them in a simple UI. When the dishes are ready, the chef would let the users know with a click of a button.

Instead of getting a 10-hole punch card and punching it for every order you make, now nothing needs to be done! The accounting department could charge employees by exporting their orders directly from the admin panel.

Environment Variables

Before developing/deploying, don't forget to set environment variables by:

cp .env.example .env

and modify the values.

Development

Prerequisites

Back-end

Front-end

Dependencies

Back-end

cd backend
PIPENV_VENV_IN_PROJECT=true pipenv install -d

PIPENV_VENV_IN_PROJECT documentation.

Front-end

cd frontend
yarn install

Usage

Back-end

VS Code

There's a VS Code launch configuration called Python: Django, so just hitting F5 should work for both running and debugging.

Docker
cd backend
docker-compose -f docker-compose.dev.yml up

Front-end

cd frontend
yarn start

Test

Back-end

VS Code

Just as the Python: Django configuration, there the Python: Django Test launch configuration that allows to run and debug tests.

Docker

cd backend
docker-compose -f docker-compose.test.yml up --exit-code-from tests

Front-end

cd frontend
yarn test --runInBand

Deploy

Download Required Files

curl --remote-name-all https://raw.githubusercontent.com/eyalch/samuel/production/{docker-compose.yml,.env.example}

Don't forget to configure environment variables in .env.

Run

After the CI/CD pipeline has finished successfully, run the following in the same directory where you've downloaded the required files:

docker-compose pull
docker-compose up -d

Technologies

Back-end

Front-end

Authentication

  • LDAP/Active Directory
  • JWT

Error Tracking

Architecture Diagram

image