NestJS, PostgreSQL, Redis, BullMQ, Drizzle ORM, Docker, Caddy, Cloudflare Tunnel

The Problem: Preventing seat double-booking and race conditions during high-volume ticket flash sales on a resource-constrained 1GB RAM virtual machine.

Architecture & Key Decisions:

  • Two-Tier Concurrency Control: Redis Redlock distributed locks serialize incoming seat reservation attempts, while PostgreSQL Pessimistic Locking (FOR UPDATE) guarantees row-level transactional isolation. BullMQ delayed queues handle automated 10-minute seat expiration releases.
  • Transactional Outbox Pattern: Guarantees atomic email confirmation dispatches via Resend API, eliminating notification drops during transient network failures. PayOS payment integration uses HMAC-SHA256 signature verification and Redis idempotency locks.
  • Zero-Downtime Infrastructure: Blue-Green deployment pipeline configured with Caddy reverse proxy and Cloudflare Tunnel (zero public inbound ports). Applied strict Docker memory constraints to prevent OOM crashes on limited VPS nodes.
Load Test: 5,000 Concurrent Requests (k6 stress test)
───────────────────────────────────────────────────────────
Double-Booking Rate:   0.00% (Zero seat overselling)
P99 Latency:           42 ms
Peak Memory:           320 MB (Bounded on 1GB VPS)

Next.js 16, React 19, PostgreSQL, Drizzle ORM, Turborepo, Zod, Bun

The Problem: Managing multi-warehouse inventory allocation and customer-tiered wholesale pricing with end-to-end type safety from database schema to client views.

Architecture & Key Decisions:

  • Full-Stack Type-Safe Monorepo: Structured a Turborepo monorepo coupling Next.js 16, React 19, and Drizzle ORM to enforce compile-time schema validation across database tables, API payloads, and frontend views.
  • Atomic Inventory Transactions: Designed relational database schemas supporting multi-warehouse inventory and tiered pricing, utilizing database transactions to guarantee stock consistency during concurrent checkouts.
  • Edge Caching & Mutation Security: Optimized product catalog load times using Next.js 16 Cache Components ("use cache", cacheLife, cacheTag). Secured mutation endpoints with Zod-validated Server Actions and automated test pipelines via GitHub Actions and Bun Test.
Catalog Performance & Validation
───────────────────────────────────────────────────────────
Edge TTFB:             < 35 ms (Next.js Cache Components)
Type Errors at Build:  0 (Strict compile-time schema sync)
Test Suite Pass Rate:  100% (Bun Test + GitHub Actions CI)

Astro, TypeScript, Static Site Generation, Minimalist CSS

The Problem: Eliminating frontend bloatware (heavy client JavaScript, complex animation libraries, hydration overhead) to achieve an instant, distraction-free technical writing space.

Architecture & Key Decisions:

  • Zero Client-Side JavaScript: Pure static HTML compilation using Astro and Markdown Content Collections, achieving instant TTFB and 100/100 Lighthouse performance scores.
  • Monochrome Academic Typography: Layout system inspired by classic Unix and academic technical blogs, utilizing semantic HTML and a single 2KB global stylesheet.