Skip to main content

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.

When a customer walks up to the counter, all they need to do is point their phone camera at a QR code. That single scan opens a mobile-friendly web page hosted directly by QR Print Station — no app download, no account creation, no friction. From there the customer can read shop information, review pricing, and place a print order in a few taps.

The Home Page (/)

The home page is served from client/home.html and driven by client/home.js. As soon as the page loads, the JavaScript calls GET /api/config and uses the response to populate every section of the page with live data from config.yml (and the database when available).
async function loadHome() {
  const response = await fetch("/api/config");
  const config = await response.json();
  // shop name, address, instructions, pricing, supported file types
  // are all populated from the config response
}

What the home page displays

Shop name & address

Pulled from shop.name and shop.address in config.yml. Displayed as the page heading and an eyebrow label above it.

Instructions

Each item in shop.instructions is rendered as a bullet. The default list walks the customer through scanning, adding files, choosing settings, and submitting.

Supported file types

Items from shop.supported_file_types are listed so customers know which formats are accepted before they start uploading.

Pricing table

Every entry in the pricing array is shown as a two-column table row: the label on the left and the price per page on the right (e.g. Rs 2/page for A4 B/W Single Side).
A default config.yml ships with the following pricing rows:
LabelPrice per page
A4 B/W Single SideRs 2
A4 B/W Double SideRs 1.50
A4 Color Single SideRs 10
A4 Color Double SideRs 8

How the QR code is generated

The QR code printed and placed at the counter encodes the shop’s upload URL. The server resolves that URL at startup using the following logic (from server/app.py):
def get_upload_url(port: int) -> str:
    public_url = load_env().get("PUBLIC_URL", "").strip()
    if public_url:
        public_url = public_url.rstrip("/")
        return public_url if public_url.endswith("/upload") else public_url
    return f"http://{local_ip()}:{port}/upload"
If PUBLIC_URL is set in .env, that value is used. Otherwise the URL is constructed from the server’s local IP address and port (default 8000), for example http://192.168.1.10:8000/upload. The generated QR PNG is saved to qr-codes/upload.png and is also accessible at GET /qr.png.

Customer Journey

1

Scan the QR code at the counter

The customer opens their phone camera and scans the QR code displayed at the print shop counter. The camera app redirects them to the upload URL — either a public HTTPS address or the shop’s local network address.
2

View shop info and pricing on the home page

The browser opens the home page at /. The page fetches GET /api/config and displays the shop name, address, step-by-step instructions, supported file types, and the full pricing table — all without requiring a login.
3

Tap Start Print Order

A prominent Start Print Order button (an <a> tag linking to /upload) takes the customer to the upload form.
4

Fill in contact details, add files, set print options

On the upload page the customer enters their name and optionally a phone number and order notes. They then add one or more files and configure per-document options: color mode, print style, number of copies, and per-file notes. See Uploading Files for full details.
5

Submit the order

Tapping Submit order POSTs the form to POST /api/orders. The server assigns a UUID order ID, stores the documents, and returns the new order object.
6

Receive an order ID on the success page

On success the browser is redirected to /success?id=<order-id>. This page displays the order ID so the customer can quote it to staff when collecting their prints.

The Success Page (/success)

After a successful submission the browser navigates to /success?id=<uuid>. The page reads the id query parameter and displays it prominently so the customer has a reference number to share with the print shop staff. No further action is required from the customer.
Customers never need to create an account or log in. Every order is identified solely by its auto-generated UUID order ID, which is displayed on the success page and stored in the database. Staff look up orders by this ID — or by customer name or phone number — from the admin dashboard.

Build docs developers (and LLMs) love