Skip to content

Admin & Order Management โ€‹

The backend includes a built-in admin dashboard for viewing orders, downloading gang sheet files, and monitoring statistics.

Admin Dashboard โ€‹

Access the admin dashboard at:

https://your-backend-url.com/admin

The dashboard shows:

  • Orders โ€” All orders received via the Shopify webhook, with order number, customer name, sheet size, and timestamp.
  • Download links โ€” Click to download the gang sheet PNG for any order.
  • Statistics โ€” Total orders, total files uploaded, and storage used.

The dashboard auto-refreshes every 30 seconds.

No authentication by default

The admin dashboard currently has no login. For production, restrict access via your hosting provider's IP allowlist or add authentication middleware. Contact support@saasyllama.com for guidance.


Email Notifications โ€‹

When a customer places an order, the backend sends an email to your configured OWNER_EMAIL address containing:

  • Order number and customer name
  • Sheet size ordered
  • A direct download link for the gang sheet PNG
  • Timestamp

Email Configuration โ€‹

Set these environment variables on your backend:

VariableDescriptionExample
EMAIL_HOSTSMTP serversmtp.gmail.com
EMAIL_PORTSMTP port587
EMAIL_SECURETLS (true = port 465, false = STARTTLS)false
EMAIL_USERSMTP usernameorders@yourdomain.com
EMAIL_PASSSMTP password or app passwordyour-app-password
EMAIL_FROMFrom address shown to recipientGang Sheet Orders <orders@yourdomain.com>
OWNER_EMAILWhere to send order notificationsyou@yourdomain.com

Supported Email Providers โ€‹

ProviderHostPort
Gmailsmtp.gmail.com587
Ionossmtp.ionos.com587
Outlooksmtp.office365.com587
SendGridsmtp.sendgrid.net587

Gmail App Password

Gmail requires an App Password instead of your regular account password. Generate one at Google Account โ†’ Security โ†’ 2-Step Verification โ†’ App passwords.


Downloading Gang Sheet Files โ€‹

From the admin dashboard, click the download link for any order. The link uses a secure token and is served directly from your backend's file storage.

Download links are persistent โ€” they remain valid as long as the backend is running and the file exists on disk.

File Format โ€‹

Gang sheets are exported and stored as PNG at 300 DPI. The resolution is calculated from the canvas size and is suitable for DTF printing.


Order Database โ€‹

Orders are stored in a SQLite database at data/gangsheets.db. Two tables:

TableContents
filesUploaded gang sheet files โ€” ID, filename, download token, upload timestamp
ordersShopify order records โ€” order ID, customer info, associated file ID, timestamp

Manual Database Access โ€‹

If needed, you can query the database directly:

bash
sqlite3 data/gangsheets.db
.tables
SELECT * FROM orders;
SELECT * FROM files;
.quit

Statistics API โ€‹

The backend exposes a stats endpoint:

GET /api/stats

Returns total order count, total file count, and storage used. The admin dashboard uses this endpoint for its summary cards.


File Retention โ€‹

Gang sheet files are stored indefinitely until manually deleted. For storage management:

  • Periodically review the uploads/ directory.
  • Files can be safely deleted after you've fulfilled the order (keep them for at least 30 days for reprint requests).
  • Future versions will include automatic cleanup policies.

SaasyLlama โ€” Niche Apps. Built Different.