Kiosk application to print QR codes to authenticated users.
The user first has to input their employee identifier (email or internal ID) so as to verify their identity. If the identifier is known, a verification code is sent to their email address. Upon verification of the email address a unique QRCode is printed to them.
On server startup a default administrator user is created with a default password and the OAuth scope "admin". Users with the admin role can create new users and grant them finely grained roles which have already been defined.
If you only plan on running the Docker containers you can directly jump to Running using Docker after having set up your environment variables.
The user interface can be installed using npm
. Inside the front
directory run:
npm install
Dependencies are defined in pyproject.toml
and requirements.txt
.
The application server can be installed in a virtual environment. For example using Poetry and in the project root:
poetry install
In .env.example
:
SMPT_*
variables define settings for the emails service. Failing to update these values will not allow you to send emails.ALGORITHM
andSECRET_KEY
keys are used to sign JWT tokens.- Change the value of
SECRET_KEY
to a randomly generated key using for example:
openssl rand -hex 32
ORIGINS
andVITE_API_URL
keys define respectively the URLs where the user interface and the API are accessible.
Attention, update .env.example
with your environment variables. Do not change the file name.
Both frontend and backend are dockerized. To start them, run in the project directory:
docker compose up -d [--build]
or
docker compose run -d [--build] <frontend | backend>
The application is served to localhost:5173
by default.
The API documentation is available at localhost:8000/docs
by default.
Attention, copy .env.example
to .env
with your environment variables.
Start the vite development server using:
npm run dev
The application is served to localhost:5173
by default.
Activate the virtual environment where the server is installed. For example using Poetry and in the project root:
poetry shell
Then run:
uvicorn app.main:api --reload
The API documentation is available at localhost:8000/docs
by default.
Typescript
, Vite
, VueJS
frontend, served through NGINX
. NGIX server running as frontend Docker
service.
Python
, FastAPI
backend, served through uvicorn
. Uvicorn server running as backend Docker service.
- Update README pictures
- Backend: Printing using cups
- Backend: Cleanup qr codes once they are printed, enhance the security of csv route
- Backend: Enhance OpenAPI documentation
- Frontend: Implement employee management in admin dashboard
- Frontend: Enhance error/loading handling when accessing backend
- More efficient use of environment variables on the backend