This guide walks you through cloning the project, creating the MySQL database, writing your environment file, and starting the server for the first time. By the end, you will have a running QR Print Station that customers on your local network can reach by scanning a QR code.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/hxmz-axfn07/qr-printing-sfw/llms.txt
Use this file to discover all available pages before exploring further.
Clone and set up a virtual environment
Clone the repository, then create an isolated Python virtual environment and install the three required packages from
requirements.txt:requirements.txt pins qrcode[pil]==8.2, PyMySQL==1.1.1, and PyYAML==6.0.2. No other runtime dependencies are needed — the HTTP server itself is pure Python stdlib.Create the MySQL database and user
Run the bundled schema file against your MySQL instance as root. It creates the After this command completes your database will contain:
If you need a different password or database name, edit
qr_printing database, a dedicated qr_print_user account with a password of change_me, and all four tables (orders, documents, pricing, settings), then seeds the pricing and settings tables with sensible defaults:| Table | Purpose |
|---|---|
orders | One row per customer submission, tracks status lifecycle |
documents | One row per uploaded file, linked to its parent order |
pricing | Per-combination price rules (paper size × color mode × print style) |
settings | Key/value shop settings that override config.yml at runtime |
server/schema.sql before running it and reflect the same values in .env (next step).Configure .env
Copy
.env.example to .env at the project root and fill in your values. Every variable is described inline below:Start the server
Run The process stays in the foreground and logs every request to stdout. You should see startup output similar to the following:On first startup the server also initialises any missing database tables and runs schema migrations, so it is safe to restart after upgrading.
server.py from the project root using the virtual environment interpreter:Access the interfaces
With the server running, open a browser on the same network. Replace
Point a phone camera at the QR displayed on the home page to test the full customer flow. The QR image encodes the
<host> with the IP or hostname shown in the startup output and <token> with your ADMIN_TOKEN value.| Interface | URL |
|---|---|
| Shop home (shows QR) | http://<host>:8000/ |
| Customer upload flow | http://<host>:8000/upload |
| Admin dashboard | http://<host>:8000/admin/<token> |
| Generated QR code PNG | qr-codes/upload.png (local file, also served via the home page) |
/upload URL and is regenerated automatically whenever the target address changes.