HYPERYOND
Back to Projects
Platform Engineering / Multi-tenant SaaS2026

Multi-Tenant Prize-Draw SaaS Platform

A multi-tenant SaaS platform we lead-architected for a UK marketing agency — a central CMS that programmatically spawns isolated Supabase + GitHub + Vercel deployments per client campaign, with full rollback, template-sync, and a built-in probability/raffle engine. 20+ live campaigns running on it.

CLIENTA UK Marketing Agency (under NDA)
AGENCYCatalyst
Multi-tenant SaaSNext.jsSupabaseCloud OrchestrationDevOps AutomationGDPR
Multi-Tenant Prize-Draw SaaS Platform

Multi-Tenant Prize-Draw SaaS Platform

A multi-tenant SaaS platform built for a UK marketing agency to run client prize-draw and instant-win campaigns at scale. The central CMS lets campaign managers spawn brand-new, isolated campaign deployments from a form — and a cloud orchestrator we engineered handles the actual provisioning of Supabase databases, GitHub repos, and Vercel deployments under the hood. 20+ live campaigns are running on the platform today.

Project Overview

For a UK marketing agency (under NDA), Hyperyond designed and built the multi-tenant control plane behind their prize-draw and instant-win activations. Before this platform, every new campaign meant a new bespoke build — branded micro-site, new database, new deployment, manual configuration. The platform we shipped collapses that to a form.

The mechanic, end to end:

  1. A campaign manager creates a new project in the central CMS.
  2. Our cloud orchestrator programmatically creates a fresh Supabase project, forks the campaign template repo on GitHub, configures it for the new campaign, and provisions a Vercel deployment.
  3. If any step fails, the orchestrator rolls back every resource it touched — no orphaned databases, no abandoned repos, no half-deployed projects.
  4. The newly-deployed sub-frontend talks back to the central API for participation, prize logic, and reporting.

The platform has been live since late 2025 and currently powers 20+ campaigns for the agency's roster of brand clients, with new campaigns being spun up regularly. Hyperyond owned the architecture and the overwhelming majority of the engineering work — roughly six months of active development and approximately 92% of the codebase by commit volume.

Role Division: The agency's product team owned campaign concept and brand direction. Hyperyond was the lead architect and primary engineer — designing the multi-tenant data architecture, building the cloud orchestrator, the central CMS, the template repo, the template-sync engine, the probability and raffle logic, and the GDPR-compliance and audit-logging layers.

What We Built

Multi-Tenant Architecture

The platform is split into two distinct tiers, by design:

  • Central database stores users, clients, projects, prize metadata, audit logs — the operational truth.
  • Per-project Supabase instances store participation entries and winner records — isolated by tenant, with their own resource limits and security boundary per campaign.
  • Unified API surface lets every sub-frontend talk to the central system through a stable contract, regardless of which campaign it belongs to.

This split is what makes 20+ campaigns coexist without stepping on each other.

Cloud Orchestrator (with Rollback)

The piece of engineering we're proudest of. When a campaign manager creates a new project in the CMS, the orchestrator coordinates a transactional flow across three cloud providers:

  • Supabase — programmatically creates a new project and initialises its schema.
  • GitHub — creates a fresh repo from our template, applies per-campaign customisations, commits the initial state.
  • Vercel — provisions a new project, sets environment variables, attaches the GitHub repo, triggers the first deployment, and adds custom domains.

If any step fails, the orchestrator rolls back every resource it has already created — deleting the Supabase project, removing the GitHub repo, tearing down the Vercel project. Every action is audit-logged, with structured deployment logs for ops review. This is the kind of work usually owned by a platform team at a tech company; we shipped it solo.

Template Synchronisation

A naive multi-tenant build that forks a template per campaign creates a maintenance bomb: every bug fix or feature update has to be re-applied to N already-deployed forks. We engineered a template-sync engine that pushes selective updates from the template repo into already-deployed campaign repos — so improvements travel out, but per-campaign customisations are preserved. This is the kind of system you build the second time around, after you've felt the pain of the first version.

Campaign Logic & Compliance

  • Probability and raffle engine. Three instant-win modes (preset winning moments, probability-based draws, guaranteed/consolation prizes) and a draw engine for end-of-campaign raffles, with backup-winner support and re-draw capability.
  • Prize allocation and stock alerts. Prize pools with daily caps, stock thresholds, single-user limits, and stock-running-low alerts.
  • Coupon code distribution. Bulk generation, distribution, expiration tracking.
  • Three-tier role system. super_admin (full access including infrastructure), campaign_manager (per-project scope), read_only (statistics only, no PII).
  • GDPR compliance. Consent tracking, data retention policies, scheduled deletion, full audit log on all mutations.
  • Anti-fraud. reCAPTCHA verification, honeypot fields, rate limiting at the API edge.
  • Rich-content authoring. Tiptap-powered editor for prize descriptions, terms, and campaign content.

Technologies Used

  • Next.js 16 (App Router) / React 19
  • TypeScript
  • Supabase (Postgres, Auth) — both as the central data layer and as a per-project provisioned resource
  • GitHub API (programmatic repo creation and template management)
  • Vercel API (programmatic deployment)
  • MUI 6 (admin UI)
  • Tiptap (rich-text editor)
  • Recharts (analytics dashboards)
  • reCAPTCHA, honeypot, rate limiting (anti-fraud)
  • Tailwind CSS (template frontend)

Why It Matters

Most agencies that run 20+ campaigns a year build them as 20+ bespoke micro-sites — and pay for that choice in maintenance, deployment overhead, and engineering time-to-market on every new campaign. The platform we built collapses that overhead: campaign managers self-serve new deployments, the orchestrator handles the infrastructure, the template-sync engine keeps the fleet healthy, and the central system handles all the cross-campaign business logic and compliance. It's the kind of internal infrastructure investment that quietly turns a custom-build agency into a productised one.

Technical Implementation

For Catalyst agency and the end client (under NDA), we provided:

  • The full multi-tenant architecture and data model (central + per-project Supabase split)
  • The cloud orchestrator coordinating Supabase + GitHub + Vercel with transactional rollback
  • The template repository for campaign sub-frontends, including DOMPurify-sanitised content rendering and reCAPTCHA-protected forms
  • The template-sync engine for selective updates to already-deployed campaigns
  • The probability, raffle, and prize-allocation engines
  • The three-tier role and permission system
  • GDPR consent tracking, data retention, and audit logging
  • Anti-fraud (reCAPTCHA, honeypot, rate limiting) and stock-alert systems
  • The central CMS UI on MUI, with Tiptap-driven content authoring and Recharts analytics