Truong Van Luyn /
← Skill catalog

Redis

Redis for BullMQ background jobs and for caching.

In practice

A multi-tenant point-of-sale platform

A point-of-sale product for small shops — a checkout app that keeps selling offline, an owner dashboard, a platform-admin console and subscription billing — built and deployed end to end.

Problem
Small shops need to ring up sales, track stock and close shifts on whatever device is at the counter, and they cannot stop selling when the connection drops. Each shop's data must stay isolated on one shared backend, and the platform has to bill shops for their plans.
Contribution
Sole developer. I designed and built the Angular checkout and admin apps, the NestJS API, the PostgreSQL schema, the realtime and offline sync, the billing and payment integrations, the CI pipeline and the EC2 deployment.
Approach
An Nx monorepo holds three apps: an Angular point-of-sale web app with a service worker and IndexedDB, an Angular platform-admin console, and a NestJS API on Fastify with Prisma over PostgreSQL. Tenancy is enforced in middleware that derives the shop from the access token, while the platform-admin plane uses a separate secret and never gets a shop context. Redis backs BullMQ jobs for work such as invoice renewal. Sales events reach open devices over WebSockets. Production runs on EC2 behind nginx with PM2, TLS from Let's Encrypt, and PostgreSQL on RDS.
Outcome
The product covers checkout, returns, inventory reservation, shelf-life lots, shifts, sales analytics, receipts, store settings, staff, VietQR and SePay payments, plan subscriptions with auto-renewal, and a platform-admin console. CI lints, tests and builds affected projects, enforces a bundle budget, scans for CVEs with Trivy and runs Playwright end-to-end tests.

A microservice shop backend

An e-commerce backend split into an API gateway and four NestJS services that talk over TCP for requests and Kafka for events.

Problem
A shop backend should be able to scale its catalog, carts, orders and users independently, without every service sharing one database or one deployment.
Contribution
Sole developer: service boundaries, inter-service contracts, data models, messaging, local infrastructure and tests.
Approach
An API gateway handles authentication and routes requests to user, product, cart and order services, using NestJS's TCP transport for synchronous calls. State changes such as a placed order are published to Kafka so other services can react without being called directly. Each service owns its own Prisma schema over PostgreSQL, and Redis provides caching. Shared libraries hold auth, database, messaging and common code.
Outcome
The gateway and four services are defined with written request/response and event contracts. Docker Compose brings up PostgreSQL, Redis and Kafka. There are gateway end-to-end tests, Testcontainers for integration tests and Pact for consumer contracts.