UHADEVSee DMS
← Back to work
2025/Gunawardana Motors & Enterprises / TMR Trading Lanka

UHADEV DMS

A full-spectrum dealership management system replacing disconnected paper and spreadsheet workflows with unified billing, inventory, quotations, warranty, and compliance tools. Run in production across two dealerships since 2025.

React 18ViteAnt DesignTailwind CSSTypeScriptNode.js 18ExpressTypeScriptMongooseMongoDB Atlas (M10)Redis CloudCloudflare PagesRailway (autoscaled)PDFKit with dynamic dealer branding

Context

TMR Trading Lanka is a motorcycle dealership group in Sri Lanka operating multiple locations. Their daily operations spanned sales, inventory, insurance, warranty claims, and compliance reporting — all running on paper forms, whiteboards, and individual spreadsheets.

The problem

Invoicing took 20–30 minutes per bill. Customer records, inventory, and financial data were scattered across disconnected paper forms and individual Excel files. Each salesperson maintained their own records. There was no single source of truth for stock positions, outstanding payments, or customer history. Insurance quotations were handwritten. Warranty claims were filed on paper and manually tracked.

Why existing tools failed

Spreadsheets and paper forms lack access control, audit trails, and concurrent-use safety. A salesperson updating a spreadsheet on their machine meant everyone else had stale data. Paper forms were easy to misplace and impossible to search. There was no way for the principal to get a real-time view of the business without walking the floor and collecting papers from each desk.

Constraints

The system had to work on low-bandwidth connections typical for dealerships in semi-urban Sri Lanka. Staff had varying levels of computer literacy — the UI needed to be simple and forgiving. Regulatory compliance required encrypted storage of customer NIC numbers and addresses. The dealership principal needed visibility into daily sales without technical training.

Solution

A role-based web application with a React frontend and Express API backed by MongoDB. The system covers the full dealership workflow: billing with advance-to-final-sale conversion, inventory tracking with real-time status updates, multi-line quotations with insurance metadata, warranty claim processing with auto-numbering and bilingual PDFs, and compliance reporting. Every transaction is logged with old/new values for full auditability. PDFs are dynamically generated with dealer branding.

Architecture

Cloudflare Pages serves the React SPA at CDN edge. The Express API runs on Railway in autoscaled containers. MongoDB Atlas (M10) stores all transactional data with encrypted PII fields. Redis Cloud handles sessions, rate limits, and email verification tokens. PDF generation runs server-side using PDFKit with dealer-specific branding (logo, colors, address).

Key design decisions

  • Encrypted PII fields (NIC, address, phone) at the database level using AES, so a data breach doesn't expose customer identity.
  • Ownership-enforced access — sales staff only see their own records unless escalated to admin.
  • Single-unit inventory model — each bike chassis is tracked individually through the sale lifecycle, preventing double-selling.
  • Transactional inventory changes on bill edit — when a bill is modified, inventory is atomically released or claimed.
  • Bilingual PDF generation using NotoSansSinhala for Sinhala text in warranty claims.
  • BullMQ-ready worker architecture on Redis for future async job processing.

Tech stack

Frontend

  • React 18
  • Vite
  • Ant Design
  • Tailwind CSS
  • TypeScript

Backend

  • Node.js 18
  • Express
  • TypeScript
  • Mongoose

Database

  • MongoDB Atlas (M10)
  • Redis Cloud

Infrastructure

  • Cloudflare Pages
  • Railway (autoscaled)

PDF

  • PDFKit with dynamic dealer branding

Screenshots

UHADEV DMS dashboard showing dealership management overview

Result

Invoicing time reduced from 20–30 minutes to under 5 minutes. Real-time inventory visibility eliminated overselling. Warranty claims processing became fully digital with auto-generated documentation. The dealership principal gained a real-time dashboard of daily sales, outstanding balances, and stock positions. The system now serves two dealership locations and is packaged as a deployable platform for any motorcycle dealership.

Lessons learned

  • Dealership staff adopt software fastest when it mirrors their existing workflow rather than imposing a new one — the bill creation flow was redesigned three times based on watching salespeople work.

  • Encrypted PII fields add significant complexity to search and reporting queries. Worth the trade for compliance, but plan for it from the start rather than retrofitting.

  • PDF generation is the highest-touch feature in a document-heavy business. Every field position and font decision gets tested by real documents going to customers and insurers.