Back to home

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)]
    
LayerTechnologyNotes
Internal DashboardSvelteKit + Tailwind CSSRole-based: Admin, Manager, Pre-press, Accounts, Delivery
Client PortalSvelteKit + Tailwind CSSCustomer self-service: quotes, tracking, invoices
Backend APIGo (Gin)RESTful, JWT auth, clean architecture
DatabasePostgreSQLGIN full-text search for archive module
File StorageAWS S3Artwork files, job bag documents
EmailAWS SESNotifications, quote delivery
DeploymentAWS EC2 / ECS (planned)Currently: local pilot

Core Modules

ModuleFrontend RouteAPI NamespaceDescription
Smart Quotation/quotations/api/v1/quotationsMaterial-driven quote generation with finishing rules
PO & Advance Verification/verifications/api/v1/verificationsTwo-stage approval queue for accounts officers
Production Kanban/production/api/v1/jobsStage-based job board with drag-and-drop
Outsource Tracker/outsource/api/v1/outsourceVendor tracking with expected return dates
Digital Gate Pass/gate-passes/api/v1/gate-passesQR-code authorized delivery release
Invoice & Payment/invoices/api/v1/invoicesAuto-generated invoices with payment status
Archive & Reprint/archive/api/v1/archiveGIN-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.