Leads, inventory, deals, finance and the workshop in one system for a multi-branch premium car dealership in Nairobi.
Project Summary
- Client: Mascardi Cars
- Industry: automotive
- My role: Lead Engineer
- Core tasks: Product architecture, Admin web app, Cloud Functions backend, Data protection
- Appointed date: Jun 2026
- Completion: Ongoing
- Team size: 1
Mascardi Cars sells premium pre-owned cars from showrooms in Spring Valley and Lavington, Nairobi. Every sale touches leads, test drives, trade-ins, financing, paperwork and the workshop, and all of it was spread across spreadsheets, phones and WhatsApp. I built the system that ties it together.
What I built
- CRM. Leads, a 360° customer view, test drives, tasks and follow-ups.
- Vehicle inventory. Stock numbers, pricing and photos, publishing to the public website, and transfers between branches.
- Deal desk. Deals with trade-ins, logbook status, F&I products and finance applications tracked to approval.
- Workshop and parts. Service bookings, job cards, parts, suppliers and purchase orders.
- Money and documents. A payments ledger for cash, card, M-Pesa and bank transfers, with PDF invoices and statements.
- Data protection. Consent, export and erasure workflows for Kenya's Data Protection Act, plus a full audit log.
Under the hood
A pnpm monorepo with a SvelteKit admin app (Svelte 5, Tailwind 4, shadcn-svelte, LayerChart) and a Cloud Functions backend on Node 24: 120 transactional operations and 12 scheduled jobs, all validated with Zod. Thirteen roles are scoped to branches through custom claims, and Firestore security rules are generated from a shared registry, so the UI, API and rules can't drift apart. Public read models feed the website, Algolia powers search, and emulator-based tests cover the backend.
Where it stands
The system covers sales, finance and the workshop end to end and is running in staging. Payment gateway, e-signature and messaging integrations are planned for go-live.
Tech stack
- SvelteKit 2
- Svelte 5
- TypeScript
- Tailwind CSS 4
- shadcn-svelte
- LayerChart
- Cloud Functions v2 (Node 24)
- Zod
- Cloud Firestore
- Algolia
- Firebase Hosting
- Cloud Run
- Firebase Auth
- pdf-lib
- Jest
What I did
- Designed the domain model across sales, finance and the workshop
- Built the SvelteKit admin app and the Cloud Functions backend
- Built branch-scoped roles and generated security rules
- Built data-protection workflows and the audit log
Key decisions
- Security rules generated from a shared registry so the UI, API and rules stay in sync
- All writes through transactional callables, never direct client writes
- Public read models for the website, separate from internal records
Challenges
- Modelling deals that span trade-ins, financing and paperwork
- Branch-scoped access across 13 roles
- Keeping security rules in lockstep with the API
Have a similar problem to solve? Let's talk.
Start a conversation