[03] Case study · ERP · Tailoring workshop

SuitUP: an ERP for a tailoring workshop

Orders, customers, measurements and fabric photos for a tailoring workshop, secured inside PostgreSQL.

Role
Software developer at Tests & Funnels. I designed the schema, the security policies, the database functions and the React app.
Industry
Fashion & tailoring
Stack
React 19, Supabase, PostgreSQL, PL/pgSQL, HTML5 Canvas
Live
Open the live demo (new tab)
SuitUP ERP customer list with order counts and amounts due, built by Shiv Sagar Kumar Sinha, full stack MERN developer
SuitUP ERP customer list with order counts and amounts due

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

  1. FrontendReact 19Order and customer screens; Canvas compresses photos before upload.
  2. BackendSupabaseAuth, storage and auto-generated APIs.
  3. DataPostgreSQL + PL/pgSQLRLS policies and JSONB triggers on 10+ entities; atomic order-number RPCs.

05Engineering decisions

  1. 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.
  2. 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.
  3. 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

Want this kind of engineering on your team?