How lukiprince/printpapi works
printpapi is a self-hosted print-job service: clients submit jobs to its HTTP API, the server queues them in SQLite, and an outbound-polling agent retrieves and prints them. The dashboard is an API client; e-commerce integrations turn orders into packing-slip jobs. Separate paths cover Star CloudPRNT printers, PrintNode-compatible clients, and billing. The excerpts show only parts of the server and agent, so links among unsampled server subsystems are limited to documented capabilities and are not expanded into speculative call chains.
Main entry points: server.py HTTP API · orders.py Order intake · store.py SQLite queue · print_agent.py Print agent
Components 18
Clients
- Web dashboard
web/app/print/page.tsx - Web API client
web/lib/api.ts
Server
- HTTP API
app/server.py - SQLite queue
app/store.py - Accounts and auth
app/auth.py - PrintNode API
app/printnode.py
Print fleet
- Print agent
agent/print_agent.py - CloudPRNT protocol
app/cloudprnt.py
Commerce
- Order intake
app/orders.py - Packing slips
app/packing_slip.py - WooCommerce plugin
integrations/woocommerce/printpapi/printpapi.php - Shopify webhook
app/server.py
Operations
- Plans and billing
app/billing.py - Email delivery
app/mail.py - Fleet monitoring
app/server.py
Other components
- Print clients
- Local printers
- Star printer
Connections 20
- Print clients → HTTP API: submits jobs
- Web dashboard → Web API client: calls
- Web API client → HTTP API: HTTP requests
- HTTP API → Accounts and auth: authenticates
- HTTP API → SQLite queue: queues and reads
- WooCommerce plugin → HTTP API: submits order jobs
- Shopify webhook → Order intake: delivers orders
- HTTP API → Order intake: routes order requests
- Order intake → Packing slips: renders slips
- Order intake → SQLite queue: enqueues jobs
- Print agent → HTTP API: polls and reports
- HTTP API → Print agent: returns claimed jobs
- Print agent → Local printers: prints jobs
- Star printer → CloudPRNT protocol: polls for jobs
- CloudPRNT protocol → SQLite queue: claims and reads jobs
- PrintNode API → SQLite queue: serves compatible data
- HTTP API → PrintNode API: routes compatibility requests
- HTTP API → Plans and billing: handles billing webhook
- HTTP API → Email delivery: sends account mail
- HTTP API → Fleet monitoring: exposes metrics