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.

The QR Print Station admin dashboard gives print shop staff a single page to track every incoming order, inspect uploaded documents, and move orders through their lifecycle from intake to completion. There is no separate login page — access is controlled entirely by knowing the secret dashboard URL.

Accessing the Dashboard

The dashboard lives at:
/admin/<ADMIN_TOKEN>
The ADMIN_TOKEN value is set in your .env file. Anyone who navigates to this URL in a browser is granted full dashboard access and no further credentials are required.
ADMIN_TOKEN=change-this-secret-token
Once the server starts, it prints the full admin URL to the terminal:
Admin:     http://192.168.1.10:8000/admin/change-this-secret-token
ADMIN_TOKEN is the only thing protecting your dashboard. Keep it secret — do not share the URL, do not commit the token to version control, and rotate it if it is ever exposed. Anyone who has the URL has complete control over all orders and uploaded files.

Authentication Methods

The server’s is_admin() function recognises three ways to prove admin identity. The secret URL covers browser access; the other two are used by the dashboard’s own JavaScript when it calls the API.
MethodHow to use
Secret URL pathGET /admin/<token> — navigate to this URL in a browser to load the dashboard HTML
X-Admin-Token headerSend the token in the X-Admin-Token request header — used by the dashboard for all API calls
?token= query parameterAppend ?token=<value> to any API request — alternative to the header for direct API access
When ADMIN_TOKEN is set in .env, only these three paths are accepted. If ADMIN_TOKEN is left empty the server falls back to a PIN-based cookie session, but using a token is strongly recommended.

Dashboard Features

Status Stats Bar

At the top of the dashboard a stats bar shows a live count of orders in each status. All seven statuses are represented:
StatusMeaning
NewOrder submitted, awaiting staff review
ReviewingStaff have started examining the order
ReadyApproved and queued for printing
PrintingPrint job is in progress
PrintedJob complete and collected
CancelledOrder was cancelled before printing
FailedPrint command returned a non-zero exit code

Order List

Below the stats bar all orders are shown as cards, sorted by submission time (newest first). Each card displays:
  • Order ID and customer name in the heading
  • Status badge colour-coded to the current state
  • Submission timestamp
  • Document count
  • Estimated total cost
  • Phone number (if provided)
  • Order notes (if provided)
  • Cancel reason or failure reason in red, when applicable

Search and Filter

A search box and a status dropdown sit above the order list. The search queries order ID, customer name, and phone number simultaneously. The status dropdown filters to a single status. Both controls update the list in real time without a page reload.

Document Details

Each order card expands to list every uploaded document. Per-document information includes:
  • File link — click to open the file directly in a new browser tab (served via /files/<doc_id>?token=<admin_token>)
  • File size
  • Page count (auto-detected for PDF files)
  • Color mode — Black & White or Color
  • Print style — Single side or Double side
  • Paper size — e.g. A4, A3, Letter
  • Copies
  • Estimated cost (calculated from the pricing table, or “Estimate after review” if unavailable)
  • Document notes (if provided by the customer)

Action Buttons

Each card shows only the action buttons that are valid for the order’s current status. Available actions are Start Review, Approve, Mark Printing, Printed, Failed, and Cancel. See Order Management for the full state machine.

Order Management

Review, approve, cancel, and track orders through every status transition.

Printing

Configure PRINT_COMMAND to automate print jobs, or manage printing manually.

Build docs developers (and LLMs) love