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/adminThe 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:
| Variable | Description | Example |
|---|---|---|
EMAIL_HOST | SMTP server | smtp.gmail.com |
EMAIL_PORT | SMTP port | 587 |
EMAIL_SECURE | TLS (true = port 465, false = STARTTLS) | false |
EMAIL_USER | SMTP username | orders@yourdomain.com |
EMAIL_PASS | SMTP password or app password | your-app-password |
EMAIL_FROM | From address shown to recipient | Gang Sheet Orders <orders@yourdomain.com> |
OWNER_EMAIL | Where to send order notifications | you@yourdomain.com |
Supported Email Providers โ
| Provider | Host | Port |
|---|---|---|
| Gmail | smtp.gmail.com | 587 |
| Ionos | smtp.ionos.com | 587 |
| Outlook | smtp.office365.com | 587 |
| SendGrid | smtp.sendgrid.net | 587 |
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:
| Table | Contents |
|---|---|
files | Uploaded gang sheet files โ ID, filename, download token, upload timestamp |
orders | Shopify order records โ order ID, customer info, associated file ID, timestamp |
Manual Database Access โ
If needed, you can query the database directly:
sqlite3 data/gangsheets.db
.tables
SELECT * FROM orders;
SELECT * FROM files;
.quitStatistics API โ
The backend exposes a stats endpoint:
GET /api/statsReturns 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.
