Skip to main content

Distribuidora DMA

A production B2B platform for a wholesale automotive parts distributor in Argentina — full commercial lifecycle from catalog and orders through payment processing, collections, and CRM.

B2BPayment EngineMulti-tenantRTK Query

Project summary

RoleFull-Stack Software Developer (Next.js 15 + NestJS + MongoDB)
Period2024 – Present
StatusIn production

Technology stack

Next.js 15NestJSMongoDBRTK QueryTypeScript

Key highlights

  • Payment allocation engine: sequential document settlement (oldest-first), DCR-based discount rates, check interest amortization, and multi-installment refinancing plan generation
  • 43 RTK Query API slices for server state, React Context for session state, and a multi-tenant config system enabling white-label deployment per distributor
  • 50+ NestJS modules with JWT RBAC (Admin/Seller/Customer roles), ERP sync via multisoft_id, GPS customer visit tracking, and PDF/Excel export

Gallery

Real screenshots of the system in use.

3 screenshots

Project context

Argentine wholesale distribution runs on complex credit workflows — post-dated checks, discount rates tied to document age, and refinancing plans — that no generic ERP handles cleanly at the point of sale.

The distributor's sales force needed a field tool — on mobile or desktop — to quote, place orders, register multi-method payments, and track client balances in real time, operating alongside the existing ERP (Multisoft).

The platform covers the full commercial lifecycle: product catalog with vehicle compatibility matrices, sales orders, open invoice tracking, multi-method payment processing with check interest calculation, collection workflow, and a seller-facing CRM.

What I built

  • Payment allocation engine: per-value sequential settlement of open invoices (oldest first), DCR-based discount rate computation, check interest amortization (annual rate → daily → deferred days), and PlanCalculator for multi-installment refinancing schedules
  • Full-stack architecture: Next.js 15 frontend with 43 RTK Query API slices and React Context for session state, backed by a 50+ module NestJS REST API on MongoDB Atlas with JWT authentication and role-based access control
  • Multi-tenant config system enabling white-label deployment per distributor via environment variables, per-client theming, and feature flags (Maps, Finance, CRM, Marketing) — no code changes required per new client

In production, used daily by the sales force of a real wholesale distributor: 520+ clients and an 11,000+ product catalog per distributor. Includes GPS customer visit tracking, Excel/PDF export, i18n, Recharts dashboards, and a mobile-first interface for field sellers.