Sometimes, you just need the header.
- Create a
.envfile with yourSECRET_KEY:cp .env.example .env # Edit .env and set a strong SECRET_KEY - Build and run:
docker compose up --build
- Go to the frontend
- Create a
.envfile:cp .env.example .env # Edit .env and set a strong SECRET_KEY - Install dependencies:
uv sync
- Run the development server:
uv run --env-file .env python -m brieffenster_generator.app
- Go to the frontend (default Flask port)
The application validates all required fields on the server side. Client-side validation (HTML5 required attributes) is included for user convenience, but all validation is performed server-side for security.
The PDF generation can be automated using a HTTP POST request with curl:
curl -X POST 'http://localhost:10000/generate/' \
-F "abs_name=Erika Mustermann" \
-F "abs_street=Heidestraße 1" \
-F "abs_city=51477 Köln" \
-F "empf_name=Bundeskanzleramt" \
-F "empf_street=Willy-Brand-Straße 1" \
-F "empf_city=10577 Berlin" \
--output Briefkopf.pdfAll form fields are required. Missing or empty fields will result in a 400 error response.
This project is licensed under the MIT License. See LICENSE.md
