← All work
SaaS, 2026

Rekhdekh — after-sales and maintenance CRM

Never lose a recurring sale: every sale of a serviceable product schedules its own next maintenance job, and the system chases it.

Role
Architect and developer
Context
Own product, Ottr Technology
Scale
13 Prisma models, 15 API modules, 45 commits, Apr – Sep 2026
Sales list with job status per invoice
Sales: every invoice shows the state of its next service job, with overdue ones flagged in the sidebar.

Background

Businesses that sell fire extinguishers, CCTV, water purifiers or generators make most of their money on the second visit: the refill, the service, the annual check. In practice that revenue lives in a notebook or a spreadsheet, and it leaks. Rekhdekh (Nepali for 'keeping an eye on') is a small CRM built around one idea: a sale is not finished until its next service is booked.

Screens

The problem

The client tracked customers, branches and service dates by hand. Overdue refills were discovered when a customer complained or never at all. Quotes were typed in Word. Moving their existing customer list in had to be painless or the tool would never be used.

Approach

  1. Model the business, not a generic CRM: Customer with multiple branches, Product types with a service interval, Sale and SaleItem, and a Job per item that is due on install date plus interval.
  2. Registering a sale spawns the next maintenance job for each serviceable item automatically. Completing a job spawns the one after it.
  3. Two scheduled tasks run the business: at 1 AM jobs past due flip to overdue; at 7 AM the day's reminders go out by email through Resend and are logged per job.
  4. One zod schema package shared by the NestJS API and the Next.js app, so forms, DTOs and validation cannot drift apart.
  5. CSV and XLSX import with a preview step for existing customer lists, PDF quotes with react-pdf, sales and job reports, and an audit log of every change.
  6. Two Docker images and a Postgres container behind one compose file for staging and production.

Architecture

apps/apiNestJS 11: auth, customers, products, sales, jobs, reminders, quotes, import, reports, audit.
apps/webNext.js 16 with shadcn and Base UI, Recharts dashboards.
packages/sharedzod schemas and DTOs used by both.

Outcome

  • The overdue count sits in the sidebar on every screen, so follow-ups are the first thing staff see.
  • Seeded with a PRD and a client change log; deployed with a two-image Docker build.

Lessons

  • The whole product is one relationship: sale → next job. Getting that into the data model on day one made every other screen simple.

Stack

NestJS 11Next.js 16PrismaPostgreSQLzod@nestjs/scheduleResendreact-pdfpapaparsexlsxDocker