Skip to content
All projects

SaaS case study

Inventory Management SaaS

Multi-tenant stock, purchase order and low-stock forecasting tool for small distributors.

Reorder planning
1 day → 15 min
Stockouts
-46%
Tenants onboarded
9
supabase · table editor
idskuon_handreorder_at#100046#100458#100870#101282

Interface reference — rendered from the real component structure, not a stock image.

The problem

Spreadsheets could not answer 'what do we reorder this week' without a day of manual work.

The solution

Per-tenant Postgres schema with row level security, reorder point calculation from real sales velocity, and CSV import for legacy data.

Hard parts

Getting tenant isolation right. Every table is protected by RLS policies, verified with automated tests per role.

Outcome

Reordering became a fifteen-minute weekly task backed by actual sales data.

Technology used

  • Next.js
  • PostgreSQL
  • Supabase
  • React Query
  • Zod

How it was delivered

  1. 01Client problemPurchasing decisions were guesswork based on stale spreadsheets.
  2. 02ResearchReviewed twelve months of sales to model realistic velocity and lead times.
  3. 03PlanningChose shared-schema multi-tenancy with strict RLS over separate databases.
  4. 04WireframeThree core screens: stock list, reorder suggestions, purchase orders.
  5. 05DevelopmentTyped server functions, Zod validation on every input, React Query caching.
  6. 06TestingRole-based integration tests proving no tenant can read another's rows.
  7. 07DeploymentMigrations run in CI, rollback plan documented before each release.
  8. 08ResultsDistributors reorder from data instead of memory.

Lessons learned

Write the tenant isolation tests before the features. Retrofitting them is painful and unconvincing.

More case studies