Case study · Software

Retail commerce platform with a dynamic rule engine: pricing policy changes without a redeploy

An instalment and retail commerce platform for a large defence-sector retailer in Pakistan, built from scratch for more than 50 branches. Sikandar Waheed led the 12-person engineering team before founding ILMOTECH.

Client
Defence-sector retailer, Pakistan
Timeline
2023 to 2025
Role
Team lead and backend architect (Sikandar Waheed, before ILMOTECH)
Stack
Node.js, NestJS, PostgreSQL, Oracle, SQL, Jenkins

The challenge

The retailer sells goods on instalment plans across a large branch network. Prices, discounts and instalment terms depend on the customer's category, the product, the branch, the date and a long list of conditions that change roughly every month. Hard-coding those rules meant a code change and a redeploy for every policy update, and a queue of branches waiting for it.

There was also a legacy system holding years of customer and transaction data that had to be carried over without a gap in daily operations.

Approach

Rather than encode policy in application code, the team designed a rule engine that lets authorised staff define rules on any column of the relevant records: an operator set, value ranges and date-based criteria, evaluated at checkout. Policy changes became configuration, not code.

The legacy migration was written in pure SQL and Node.js batch jobs so it could be run, verified and re-run against real data before cut-over. Delivery moved onto an automated Jenkins pipeline so every change went through the same tested path to production.

Architecture

  • Node.js and NestJS services over PostgreSQL, with Oracle connectivity for the systems already in place at the retailer.
  • A rule engine that evaluates dynamic conditions against customer, product and branch data at transaction time.
  • Batch migration jobs in SQL and Node.js with verification steps between stages.
  • Jenkins CI/CD with automated deployments replacing what had been hours of manual release work.

Results

The platform was rolled out across more than 50 branches and is in daily use by branch operators serving over 100,000 customers, with new customers added continuously. Pricing and discount policy is now changed by the business without engineering involvement.

This work was delivered by Sikandar Waheed as team lead at his previous employer. It is included here because the same approach to rule engines, migrations and delivery pipelines is what ILMOTECH brings to new projects.

  • 50+
    Retail branches using the platform daily
  • 100k+
    Customers served, growing continuously
  • 12
    Engineers led through the build
Back to all work
Next projectLexBase: private legal knowledge assistant

Have a similar challenge?

Book a call and we will walk through how this would apply to your situation.