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

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.
Approach
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.
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.
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.
Deliverables
- ▸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
- ▸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
Impact
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.
Tech stack
Want something similar?
I build production systems like AutoApp Backend—from architecture through launch. Tell me what you need.
Contact me →