SuitUP: an ERP for a tailoring workshop
Orders, customers, measurements and fabric photos for a tailoring workshop, secured inside PostgreSQL.

01The problem
A tailoring workshop tracked orders, measurements and fabric photos on paper and phones. Staff needed shared data without seeing what they should not.
02What it had to do
- Orders, customers, measurements and fabric images in one system.
- Access rules enforced by the database itself.
- Order numbers that never collide.
- Fast photo uploads from phones on a workshop network.
03What I built
An ERP for orders, customers, measurements and fabric images, on Supabase with PostgreSQL doing the heavy lifting.
04Architecture
- FrontendReact 19Order and customer screens; Canvas compresses photos before upload.
- BackendSupabaseAuth, storage and auto-generated APIs.
- DataPostgreSQL + PL/pgSQLRLS policies and JSONB triggers on 10+ entities; atomic order-number RPCs.
05Engineering decisions
01Row-Level Security
- Challenge
- Staff share one database but must only see the rows their role allows.
- Decision
- PostgreSQL Row-Level Security policies and JSONB triggers across 10+ entities.
- Why
- The rule lives in the database, so no API path or bug in the UI can bypass it.
02Atomic order numbers
- Challenge
- Two orders created together could get the same number.
- Decision
- Order numbers come from atomic RPC functions written in PL/pgSQL.
- Why
- Duplicate IDs are impossible, not just unlikely.
03Compress before upload
- Challenge
- Full-size fabric photos from phones are slow to upload and store.
- Decision
- HTML5 Canvas compresses images in the browser before they are sent.
- Why
- Fabric images came out about 75% smaller.
06Security
- PostgreSQL Row-Level Security
- JSONB audit triggers
- Supabase Auth
07Outcome
- RLS on 10+ entities
- Zero duplicate order numbers by design
- ~75% smaller fabric images