AutoApp Backend
NestJS car marketplace API with Elasticsearch faceted search, Redis caching, Prisma/PostgreSQL, and dealer/CNIC verification workflows.

Project overview
AutoApp Backend: NestJS car marketplace API with Elasticsearch faceted search, Redis caching, Prisma/PostgreSQL, and dealer/CNIC verification workflows. Production-shaped API scaffold for high-volume car listings. Tekvers delivered a maintainable marketplace api system for AutoApp Backend using NestJS, PostgreSQL, Redis, Elasticsearch, with phased rollout, operator workflows, and documentation suited to long-term ownership.
- Industry
- Marketplace API
- Stack
- NestJS, PostgreSQL, Redis, Elasticsearch
- Services
- Software Development, Cloud & DevOps, Cybersecurity
Background
Car marketplaces in Pakistan live or die on search speed and trust. Buyers filter by make, model, city, and price at volume; dealers need verification; fraud patterns appear as soon as listings scale. AutoApp required an API foundation that could serve large listing catalogs without collapsing under faceted queries—and encode CNIC/dealer trust into the domain rather than bolting it on later.
Tekvers engineered a NestJS modular monolith (autoapp-backend): auth, users, dealers, listings, search, favorites, reports, admin, and health modules. PostgreSQL via Prisma holds transactional data; Redis caches popular listings; Elasticsearch powers text relevance plus facet aggregations with sync-on-write and a nightly reindex cron. Docker Compose runs API + dependencies for production parity.
Honesty for operators: phone OTP is mock (fixed code logged to console), image fields are URL lists without an upload pipeline, Prisma migrations/ are not checked in yet, and dealer registration does not auto-promote User.role to DEALER. The deliverable is a strong API foundation with clear hardening remaining before consumer-scale production.
The challenge
A Pakistan car marketplace needed faceted search, dealer and identity verification, favorites/reports, and infrastructure that can grow with listing volume—from an API-first modular backend.
Without a coherent marketplace api foundation, AutoApp Backend stakeholders faced fragmented tools, slow handoffs, and limited visibility—classic failure modes Tekvers designs against.
The solution
AutoApp Backend: NestJS car marketplace API with Elasticsearch faceted search, Redis caching, Prisma/PostgreSQL, and dealer/CNIC verification workflows.
Production-shaped API scaffold for high-volume car listings. Tekvers delivered a maintainable marketplace api system for AutoApp Backend using NestJS, PostgreSQL, Redis, Elasticsearch, with phased rollout, operator workflows, and documentation suited to long-term ownership.
Our approach
- 01
Search & cache architecture
Elasticsearch handles faceted listing discovery (cities, makes, models, fuelTypes) while Redis absorbs hot popular-listing reads. Listing create/update/delete syncs ES; admins can reindex; cron reindexes daily at 03:00.
- 02
Trust & marketplace modules
CNIC submit with format validation and admin verify; dealer register (business name + city) with admin verification/subscription plan patches; listing reports with admin status workflow; favorites per user.
- 03
Auth, RBAC, and ops
Phone OTP request/verify (mock SMS), JWT + hashed refresh token rotation, global throttling and DTO validation, Pakistan phone validation (`@IsPhoneNumber('PK')`), and `GET /api/health` across Postgres, Redis, and Elasticsearch.
What we delivered
- NestJS modular monolith API under `/api`
- Prisma/PostgreSQL persistence for users, dealers, listings, and related entities
- Elasticsearch faceted search with sync + nightly reindex fallback
- Redis caching for popular ACTIVE listings
- OTP auth (mock) with JWT access/refresh and role guards
- CNIC and dealer verification admin workflows
- Favorites and listing reports modules
- Docker Compose stack for API + Postgres + Redis + Elasticsearch
Outcomes & impact
- Production-shaped API scaffold for high-volume car listings
- Faceted search foundation suitable for marketplace UX
- Trust workflows (CNIC, dealers, reports) modeled in the core domain
- Clear hardening backlog: real SMS OTP, migrations, image upload, role auto-promotion
AutoApp’s marketplace can search, verify, and scale from a Tekvers API core—facets stay fast, dealers and identity are enforceable by admins, and ops can reproduce the dependency stack locally with Docker Compose.
Technology
- NestJS
- PostgreSQL
- Redis
- Elasticsearch
- Docker
- Prisma
Services delivered
Further reading
- Marketplace API Implementation Checklist for Growing Teams
- Marketplace API Buyer's Guide: How to Evaluate Vendors (2026)
- 7 Mistakes Teams Make Before Building Marketplace API
- ROI of Marketplace API: Outcomes Patterned After AutoApp Backend
- Architecture Lessons from AutoApp Backend: What We Shipped and Why
- AutoApp Backend: Marketplace API Implementation Playbook (2026)












