Technical Overview
A reviewer-oriented summary of PrintFlow LK's architecture, modules, and key engineering decisions.
System Architecture
PrintFlow LK is a cloud-native, multi-tenant SaaS platform built on a clean three-tier architecture.
[Client Portal (SvelteKit)] ──┐
├──→ [REST API (Go/Gin)] ──→ [PostgreSQL]
[Internal Dashboard (SvelteKit)] ──┘ ├──→ [AWS S3 (File Storage)]
└──→ [AWS SES (Email)]
| Layer | Technology | Notes |
|---|---|---|
| Internal Dashboard | SvelteKit + Tailwind CSS | Role-based: Admin, Manager, Pre-press, Accounts, Delivery |
| Client Portal | SvelteKit + Tailwind CSS | Customer self-service: quotes, tracking, invoices |
| Backend API | Go (Gin) | RESTful, JWT auth, clean architecture |
| Database | PostgreSQL | GIN full-text search for archive module |
| File Storage | AWS S3 | Artwork files, job bag documents |
| AWS SES | Notifications, quote delivery | |
| Deployment | AWS EC2 / ECS (planned) | Currently: local pilot |
Core Modules
| Module | Frontend Route | API Namespace | Description |
|---|---|---|---|
| Smart Quotation | /quotations | /api/v1/quotations | Material-driven quote generation with finishing rules |
| PO & Advance Verification | /verifications | /api/v1/verifications | Two-stage approval queue for accounts officers |
| Production Kanban | /production | /api/v1/jobs | Stage-based job board with drag-and-drop |
| Outsource Tracker | /outsource | /api/v1/outsource | Vendor tracking with expected return dates |
| Digital Gate Pass | /gate-passes | /api/v1/gate-passes | QR-code authorized delivery release |
| Invoice & Payment | /invoices | /api/v1/invoices | Auto-generated invoices with payment status |
| Archive & Reprint | /archive | /api/v1/archive | GIN-indexed full-text search across historical jobs |
Key Engineering Decisions
Why Go
Performance, small binary, strong concurrency for job-event processing across pre-press, press, finishing, and dispatch.
Why two SvelteKit apps
Internal staff and external customers have different auth domains, different navigation, and different surface areas. Splitting them keeps each app focused and lets the customer-facing portal stay much smaller.
Why PostgreSQL with GIN indexes
The archive module requires sub-second full-text search across customer name, product type, and order ID. GIN over a tsvector column makes that fast without an external search service.
Dual-gate PO verification
A uniquely Sri Lankan workflow: accounts marks the PO received, then separately marks the advance payment received. Production can only start once both gates clear.
Digital gate pass
Replaces handwritten triplicate gate pass books. QR generation on dispatch, manager approval over mobile, driver confirmation at the gate.
Security
- JWT-based authentication with role-based access control across five roles.
- S3 pre-signed URLs for artwork access; no public S3 bucket.
- All API endpoints require a valid JWT. Portal and dashboard run as separate auth domains.
Pilot Status
PrintFlow LK is in active pilot development with Wayamba Printers Pvt Ltd, Kurunegala, Sri Lanka. Planned AWS services: EC2/ECS for the API, RDS for PostgreSQL, S3 for storage, SES for email, CloudFront for static assets.