Truong Van Luyn /
← Skill catalog

Git

Git for every project, with small, focused commits.

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.

Werewolf 3D: a server-authoritative party game

A ten-seat social deduction game played around a 3D campfire in the browser, with private lobbies, built-in AI players, text chat and a WebRTC voice path.

Problem
A Werewolf match needs ten players, and every player must see only what their role allows. Rejoining after a drop must not leak or lose state. A group of friends should be able to play without filling every seat, and without paid AI services.
Contribution
Sole developer: game rules, server, AI players, 3D client, networking protocol, media service and CI.
Approach
A TypeScript monorepo separates a pure rules package, a shared protocol package, a WebSocket game server, a Three.js client and a mediasoup media service. The server is the only authority. It projects a per-recipient view of each match, so hidden roles and night actions never reach clients that should not see them. AI players run inside the server and deliberately have no access to the match's private state — they act only on what they observed. Voice uses a mediasoup SFU, with TURN credentials minted per session from an HMAC of a shared secret.
Outcome
Playable locally and over a LAN with one to ten humans and up to nine AI players, core and starter role presets, reconnect handling with 60-second seat holds, and phone and tablet layouts. Voice is implemented but disabled by default; hardware benchmarks and human playtests are still pending.