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.

config.yml is the primary configuration file for all shop-facing content in QR Print Station. It lives in the project root alongside the server and client directories. You can change your shop name, contact details, customer-facing instructions, pricing, and the options shown on the upload form — all without touching any Python code.

Full example

shop:
  name: QR Print Station
  address: Local print shop
  phone: "+91 XXXXX XXXXX"
  instructions:
    - Scan QR.
    - Add one or more files.
    - Choose print settings for each document.
    - Submit order and wait for staff review.
  supported_file_types:
    - PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, images, text files, and other common print files
  max_upload_mb: 50

theme:
  accent: "#166a5b"
  accent_2: "#e2b23c"
  background: "#f6f7f2"

pricing:
  - label: A4 B/W Single Side
    paper_size: A4
    color_mode: bw
    print_style: single
    price_per_page: 2
  - label: A4 B/W Double Side
    paper_size: A4
    color_mode: bw
    print_style: double
    price_per_page: 1.5
  - label: A4 Color Single Side
    paper_size: A4
    color_mode: color
    print_style: single
    price_per_page: 10
  - label: A4 Color Double Side
    paper_size: A4
    color_mode: color
    print_style: double
    price_per_page: 8

options:
  paper_sizes:
    - A4
    - A3
    - Letter
  color_modes:
    bw: Black & white
    color: Color
  print_styles:
    single: Single side
    double: Double side

shop section

The shop section controls your shop’s identity and the information displayed on the customer home page.
shop.name
string
required
Displayed as the page <title> and the main heading (<h1>) on the home page. Defaults to QR Print Station.
shop.address
string
required
Shown as the eyebrow/subtitle text above the shop name on the home page. Rendered using the .eyebrow CSS class styled in the accent color.
shop.phone
string
Optional phone number shown in the shop info section on the home page. Leave blank or omit entirely if you prefer not to display a phone number.
shop.instructions
string[]
A YAML list of instruction strings rendered as a bullet list under the Instructions heading on the home page. Each item in the list becomes one <li> element. Defaults to ["Add files", "Choose settings", "Submit order"].
instructions:
  - Scan QR.
  - Add one or more files.
  - Choose print settings for each document.
  - Submit order and wait for staff review.
shop.supported_file_types
string[]
A YAML list of strings rendered under the Supported heading on the home page. Use this to inform customers which file types your shop accepts.
supported_file_types:
  - PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, images, text files, and other common print files
shop.max_upload_mb
integer
default:"50"
Maximum file size in megabytes allowed for a single document upload. The server enforces this limit during order submission. Must be a positive integer. Defaults to 50.

theme section

The theme section controls the three CSS custom properties injected into every customer-facing page. See Theming for full details on how these values are applied.
theme.accent
string
default:"#166a5b"
Primary action color used on buttons, links, the eyebrow text, and the file-drop border. Must be a valid CSS color value (hex recommended). Defaults to #166a5b.
theme.accent_2
string
default:"#e2b23c"
Secondary accent color used for highlights and badges throughout the customer interface. Defaults to #e2b23c.
theme.background
string
default:"#f6f7f2"
Page background color applied to the <body> element on all customer-facing pages. Defaults to #f6f7f2.

pricing section

The pricing section is a YAML list of pricing rows. Each row defines the price per page for a specific combination of paper size, color mode, and print style.
pricing[].paper_size
string
required
The paper size this price applies to (e.g. A4, A3, Letter). Must match one of the values in options.paper_sizes.
pricing[].color_mode
string
required
Color mode for this row. Accepted values: bw (black & white) or color.
pricing[].print_style
string
required
Print style for this row. Accepted values: single (single side) or double (double side).
pricing[].price_per_page
decimal
required
Price charged per page for this combination, expressed as a decimal (e.g. 2, 1.5, 10).
pricing[].label
string
Human-readable display label for this pricing row (e.g. A4 B/W Single Side). Used when displaying the pricing table to customers and in order summaries.

How pricing is seeded into the database

On every server startup, config.yml pricing rows are inserted into the MySQL pricing table using INSERT IGNORE. Because of the UNIQUE KEY uq_pricing (paper_size, color_mode, print_style) constraint on the table, rows that already exist are skipped — so re-starting the server will not overwrite manual price edits you have made directly in the database. The database takes precedence at runtime. When the server loads configuration it calls load_db_pricing(), which queries only rows where deleted_at IS NULL (active rows). If at least one active row is found, the database pricing fully replaces the config.yml pricing for that request. Rows with a non-null deleted_at are treated as soft-deleted and are excluded from the result. To add a new pricing combination not defined in config.yml, insert it directly into the pricing table:
INSERT INTO pricing (paper_size, color_mode, print_style, price_per_page)
VALUES ('A3', 'color', 'single', 15.00);
The UNIQUE KEY prevents duplicate combinations, so each (paper_size, color_mode, print_style) triplet can only appear once.

options section

The options section controls which choices are presented to the customer on the upload form.
options.paper_sizes
string[]
List of paper size strings shown in the paper size selector on the upload form. Each entry in the list becomes one <option> in the dropdown. Defaults to ["A4", "A3", "Letter"].
paper_sizes:
  - A4
  - A3
  - Letter
options.color_modes
object
Key/value map of color mode ID to display label. The key (e.g. bw) is stored on the order; the value (e.g. Black & white) is shown in the dropdown. Defaults to {bw: "Black & white", color: "Color"}.
color_modes:
  bw: Black & white
  color: Color
options.print_styles
object
Key/value map of print style ID to display label. The key (e.g. single) is stored on the order; the value (e.g. Single side) is shown in the dropdown. Defaults to {single: "Single side", double: "Double side"}.
print_styles:
  single: Single side
  double: Double side

config.yml is read on every incoming request — it is never cached in memory. This means any change you save to the file takes effect immediately on the next page load or API call, without restarting the server.

Build docs developers (and LLMs) love