Skip to content
← Selected workCase study 02Cairo, Egypt

ZS Tech CRM

CRM and operations console

ZS Tech CRM dashboard with cash in and out, win rate and lost reasons, beside the quote builder
ZS Tech CRM dashboard with cash in and out, win rate and lost reasons, beside the quote builder

01 / Overview

ZS Tech CRM is the operations console of ZS Tech, a smart home and access control company in Cairo: contacts, a sales pipeline with a quote builder, projects, a price book, and money, in seven modules on 34 tables. I designed and built it alone on Next.js 16 and Supabase.

02 / Problem

ZS Tech sells and installs smart home and access control systems. A deal starts as a contact, becomes a priced quote built from a catalogue of devices and labour, turns into a project on site, and ends as instalments that have to be collected. Spreadsheets lost track of every step.

The team needed one place for that whole path, simple enough to learn in a day, and strict enough that field staff never see cost or margin.

03 / What I built

Seven modules that follow a deal from first contact to the last instalment, built smaller on purpose so the team actually uses every screen.

7
modules in one console
34
tables, all under RLS
44
unit, RLS, and end to end tests
  • Dashboard: cash in and out by month, receivables and overdue, open pipeline, win rate with lost reasons, top products, and deals by source
  • Pipeline as a drag and drop kanban and a list, with a deal page per opportunity
  • Quote builder: price book, packages, sections, discount and terms, margin per line, a live client preview, and a print view
  • Contacts with filters, deals, payments, and notes
  • Projects for won deals: tasks, payments, installed devices with warranty, site photos, and handover sign off
  • Price book with inline cost and price, a package builder, and multi supplier sourcing with currency conversion
  • Money: receivables with instalments and recorded payments, expenses, project profit and loss, and accounts with transfers
  • Settings: company and quote rules, user invites with per module access, suppliers, exchange rates, lists, and an activity log

04 / How it works

Row-Level Security is the real boundary, not the UI. Owners edit everything; every other user gets None, View, or Edit per module. Cost and margin columns come back empty for anyone without money access, enforced by database views and column grants, so a field account cannot read a margin even through the API.

Reads go through views and writes through validated server actions on a user scoped client, so the database checks every change again. Seven migrations build 34 tables, 10 views, and 22 functions, and the money maths lives in a pure, unit tested library.

Unit tests cover the calculations, integration tests hit the database as each seeded role to prove the access rules, and a Playwright suite walks the main flows end to end. Uploads go to Cloudflare R2, and the app runs on Vercel.

05 / Outcome

ZS Tech runs its pipeline, quotes, projects, and collections from one console, live on Vercel, with the money rules enforced by the database rather than by the screens.

It is deliberately small: seven modules that match how the business actually works, so every screen earns its place.

06 / Screens

ZS Tech CRM dashboard: receivables, open pipeline, cash in versus out by month, win rate, and what earns
01ZS Tech CRM dashboard: receivables, open pipeline, cash in versus out by month, win rate, and what earns
ZS Tech CRM pipeline kanban from lead to surveyed, quoted, won, and in progress with value, margin, and due dates
02ZS Tech CRM pipeline kanban from lead to surveyed, quoted, won, and in progress with value, margin, and due dates
ZS Tech CRM quote builder: price book and packages, line items with margin per line, and a live client preview
03ZS Tech CRM quote builder: price book and packages, line items with margin per line, and a live client preview
ZS Tech CRM receivables: overdue and upcoming instalments per deal with record payment
04ZS Tech CRM receivables: overdue and upcoming instalments per deal with record payment

Related writing

Next project03
Hessa Events system
HR, payroll, WhatsApp campaigns