Web · CRM · ERP · Business Systems
TATLP — real-estate website, CRM/ERP and mobile app in one monorepo
A real-estate developer's public website, its admin CRM/ERP (which is also the API for the site and the mobile app) and a role-gated Expo app — built as one TypeScript monorepo around a shared domain engine.
Problem
What needed solving?
TATLP sells plots, duplex and singlex homes at Ashirwad Homes, an approved colony of 123 homes on Govindgarh Road. Its promise to buyers is documentary — every plot has a number, every number has a file, one printed rate — but that promise only holds if the office, the website and the sales agents all read from the same record. The business needed live plot availability on the public site, a booking process with approvals and payment plans, receipts and a ledger the accounts team can trust, and one app in which customers, agents and staff each see only what their role allows.
Context
Who was it for?
Client system · TATLP Trade Pvt. Ltd., real-estate developer, Rewa (MP)
Approach
- One monorepo, three apps: the marketing website, the admin CRM/ERP, and the mobile app — with the CRM doubling as the versioned API that the website and the app read from, so availability is never copied.
- Put the business rules in a framework-free package (role-based access control, auth tokens, the booking life cycle, payments and the ledger) that every app imports, and share the request/response schemas as Zod contracts.
- Model the sales office as it actually works: projects → blocks → plots with price history; payment plans with milestones; bookings that move through an approval chain, schedule revisions and installments; receipts that are recorded, verified, allocated and reversible.
- Let the website be a fast, static-feeling Next.js app that reads the CRM for plot status and price, with an article section, tools page and legal pages for search visibility.
- Ship one mobile app rather than three: customers, agents and staff sign in and the app gates screens by role.
Architecture
How the system was designed.
The CRM is a Next.js 16 app that serves the admin UI and the /api/v1 backend; Prisma 7 talks to Postgres through the pg adapter and pg-boss runs background sweeps such as auto-cancelling expired holds. The website (Next.js 16) and the mobile app (Expo) are clients of that API. Domain logic lives in a shared core package and validation in a shared contracts package.
Implementation
What was built.
- 01Monorepo with npm workspaces and Turborepo: apps/web, apps/crm, apps/mobile; packages/db (Prisma schema, migrations, seed), packages/core (domain engine), packages/contracts (Zod 4 schemas).
- 02CRM/ERP in Next.js 16 with shadcn/ui: employees, roles and permissions, projects, plots with CSV import and price history, payment plans, five-step bookings with an approval chain, receipts with PDF output, verification and reversal, charges, bank accounts and a double-entry style ledger.
- 03Operations beyond sales: leads, customers and site visits; commission schemes, tiers and agent payouts; coupons; a documents and KYC vault with an access log; tasks and field-executive location pings; support tickets, FAQs, staff chat and careers; attendance, holidays, leave and payroll; campaigns, banners and a website CMS; reports.
- 04Sign-in by OTP challenge or password; sessions and permissions enforced by the shared RBAC engine; an activity log and notifications for what the system does by itself.
- 05Website in Next.js 16, React 19, Tailwind 4 and Motion with Cormorant Garamond and Inter, a dark and light theme, a page per plot showing its status and price from the CRM, four buying-guide articles, Organization, WebSite and RealEstateAgent JSON-LD, a Content-Security-Policy and X-Frame-Options.
- 06Mobile app on Expo SDK 54 with expo-router 6 — one app, role-gated after login.
- 07Verification: a live-database regression script for the booking and payment engine, Playwright smoke tests for login, bookings and payments, and cleanup scripts that remove test data and free plots.


AI
Where AI was used and why.
This project did not use AI — a deliberate choice. Not every system needs a model.
Technology
Relevant stack.
- Next.js 16
- React 19
- TypeScript
- Prisma 7
- PostgreSQL 16
- pg-boss
- Zod 4
- shadcn/ui
- Tailwind CSS 4
- Motion
- Expo SDK 54
- Turborepo
- Railway
Outcome
Only factual results.
Outcome to be added. Results are only published here when they can be stated factually — no estimated metrics.
Lessons
Important engineering insights.
- When the CRM is also the API, the website can promise 'what's open today' and mean it — availability is read, never re-entered.
- A framework-free domain package pays for itself the moment a second client (the mobile app) needs the same rules.
- Booking and money flows need regression scripts against a real database; unit tests alone do not catch a ledger that stops balancing.
Have a project in mind?
Tell me what you're trying to build. I'll come back with an honest view on scope, architecture and the right approach.