← ALL WORKCASE 01 / 13

Hotel CRM.

Multi-Tenant Hospitality SaaS Platform

CLIENTSelf-Initiated SaaS Product
ROLESole Architect & Full Stack Developer
TIMELINEOct 2025 - Present
STATUSIn production
Hotel CRM screen
(01)OVERVIEW

A production-grade multi-tenant SaaS platform for hospitality businesses — a six-application monorepo with an event-driven NestJS backend, real-time SSE notifications, Redis caching, Stripe subscription billing, and a booking widget any hotel can embed with a single script tag.

Hotel CRM is a complete SaaS product I architected and built end to end. A hotel owner signs up, is guided through an onboarding wizard, configures one or more properties, builds a menu and item catalogue, designs a reservation form by dragging fields around, and embeds the resulting booking widget on their own website with one line of code. Bookings and orders flow straight back into a dashboard with a live calendar, real-time notifications, and Stripe-billed subscription tiers that gate how much of the platform each account can use.

06Apps in one monorepo
75REST endpoints
19TypeORM entities
16API controllers
(02)HOW IT WAS BUILT

Six applications in a single npm workspace sharing one dependency graph, a NestJS 11 + PostgreSQL API (16 controllers, 75 REST endpoints, 19 TypeORM entities, versioned migrations), a React 18 + Vite management dashboard, a Next.js 16 public site, a platform-level super-admin console, a public menu showcase, and a standalone embeddable booking widget.

Hotel CRM: Monorepo Architecture

Email and notification work is published to a RabbitMQ topic exchange instead of running inline. Every live queue is paired with a retry queue on a separate exchange carrying a 5-second message TTL that dead-letters back to the main exchange, plus a terminal DLQ. A failed send is retried on a delay and, if it keeps failing, is quarantined for inspection rather than silently disappearing. The routing-key registry is typed, so adding a notification rule wires its live, retry and dead-letter bindings together automatically.

Hotel CRM: Event-Driven Messaging with Real Failure Handling

An @Sse() endpoint streams notifications to the browser through an RxJS subject fanned out per user, filtering on userId is what keeps tenants isolated. The payload carries the post-write unread count so the badge updates without a follow-up request, and a heartbeat stops proxies closing idle connections. Redis caching sits on a central typed key registry with tag-based invalidation: editing a hotel's branding invalidates every widget key derived from it in one operation instead of waiting for TTLs to expire.

Hotel CRM: Real-Time Notifications & Caching

Hotels compose reservation forms visually with dnd-kit, field ordering, validation rules and theming persist as configuration and are rendered identically by the admin preview and the public widget from a single source of truth. The API serves an embed.js loader and a shortcode-addressed widget document (never an internal UUID), backed by a dedicated public API for availability checks and submissions that is fully separate from the authenticated admin routes.

Hotel CRM: Drag-and-Drop Form Builder & Embeddable Widget

Stripe powers checkout, subscriptions and webhooks, with plan tiers defining maximum hotels, bookings and staff — enforced by a request-level guard rather than as a UI-only suggestion. Tenant isolation is enforced in the services themselves: scoped reads and writes run through a hotel-ownership assertion before touching data. Auth is JWT over httpOnly cookies with encrypted token payloads plus Google OAuth, and a global exception filter, response-transform interceptor and logging middleware standardise every response and error shape across the API.

Hotel CRM: Multi-Tenancy, Billing & Security
(03)INSIDE THE PRODUCT
Hotel CRM screen
Hotel CRM screen
Hotel CRM screen
Hotel CRM screen
Hotel CRM screen
Hotel CRM screen
Hotel CRM screen
Hotel CRM screen
Hotel CRM screen
Hotel CRM screen
Hotel CRM screen
(04)STACK
  • NestJS 11
  • TypeScript
  • PostgreSQL
  • TypeORM
  • RabbitMQ
  • Redis
  • Server-Sent Events
  • Stripe
  • Next.js 16
  • React 18
  • Redux Toolkit
  • TanStack Query
  • React Hook Form + Zod
  • dnd-kit
  • FullCalendar
  • Tailwind CSS v4
  • Radix UI
  • JWT & Google OAuth
  • Swagger / OpenAPI
  • Docker
  • Railway
NEXT CASE — 02ZMD Radiators