saas multi-tenant nestjs nextjs stripe

Wedding Planner Platform

A multi-tenant SaaS for wedding agencies, couples, and guests — four apps over a NestJS core with Stripe billing, resumable S3 media uploads, and tiered authentication.

4 apps

admin, planner, guest & API

Multi-tenant

org-scoped shared-schema model

Resumable

tus + S3 guest media uploads

[ role ] Full-stack engineer · Orbic-M

Project specs

Tech Stack

Next.js 16 NestJS PostgreSQL TypeORM Stripe AWS S3

R&D Focus

Multi-Tenant SaaS & Media Infrastructure

Complexity

A multi-tenant SaaS platform that lets wedding agencies run their business, couples track their wedding, and guests contribute media — each served by a purpose-built app over a shared NestJS core. Billing, storage quotas, and access tiers are all enforced per organization.

Problem

A wedding platform has four very different audiences with conflicting needs: a super admin governing tenants and billing, agencies managing clients and weddings, couples tracking progress, and guests uploading photos from their phones at the venue. Each needs its own tailored surface and auth model, while the business needs strict tenant isolation, plan-based usage limits, and reliable media handling at scale.

Approach

  • Tenant-aware core: A shared-database / shared-schema multi-tenancy model where every core entity (User, Wedding, Media) is scoped by organizationId , served by a modular NestJS API over PostgreSQL/TypeORM.
  • Four targeted apps: A Vite/React super-admin dashboard, a Next.js 16 planner app for agencies and couples, an Astro mobile-first guest-upload site, and a shared package of Zod schemas and types.
  • Resumable media pipeline: Guests scan a wedding-specific QR/link; the backend validates wedding status, deadline, and per-guest limits, then handles large uploads via tus resumable upload to S3 with Sharp image processing.
  • Billing & usage: Stripe subscriptions (Free/Pro/Enterprise) with a usage module tracking storage and active weddings to enforce plan limits.
  • Tiered authentication: JWT for admins, organization-scoped auth for planners, magic links / wedding credentials for couples, and anonymous session access for guests — with throttling and audit logging.

Outcome

  • A single codebase serving four distinct personas with isolated, tenant-scoped data.
  • Robust media handling: resumable uploads, image optimization, background processing (BullMQ), and planner curation before couples see the gallery.
  • Plan-aware billing that ties Stripe subscriptions directly to storage and wedding usage.

Stack notes

NPM Workspaces monorepo. backend (NestJS 11, TypeORM/PostgreSQL, BullMQ + ioredis queues, AWS S3 + tus resumable uploads, Sharp, Stripe, Resend/react-email, throttler, scheduler). planner (Next.js 16, React 19, TanStack Query + Router, react-hook-form + Zod, dnd-kit, Recharts, shadcn/Radix). admin (Vite/React). guest_upload (Astro, mobile-first). packages/shared (Zod schemas + TS types).