Case study

Muscled's own education + community platform — now powering internal training for 8 employees.

Unpuzzle is Muscled's own multi-tenant course and community SaaS, not a client engagement. Next.js 15 / React 19 on self-hosted PostgreSQL with Stripe Connect, Better Auth, Backblaze B2, and a Cloudflare Worker CDN. Built using a two-agent Claude Code workflow on separate git branches. We use it ourselves to train our team — and it is the live reference for the technical capability Muscled brings to every build.

By the numbers

The numbers speak for themselves

Vault-backed numbers. No presentation-grade estimates. Each one is reconcilable to the founder's own reporting.

Hours vibe-coded on Claude Code
1,000+

Mahtab logged over a thousand hours of vibe-coding with Claude Code at 10-15 hours per day across roughly six months to ship Unpuzzle as Muscled's own multi-tenant SaaS.

SRC: Loom 191a8f5c (founder self-report), 2026-05-16

Production commits on unpuzzle-mvp
745

745 commits across the main production codebase (unpuzzle-mvp) between Aug 2025 and May 2026. Active. Built using a two-agent Claude Code workflow on separate git branches.

SRC: GitHub muscled-clients/unpuzzle-mvp, 2026-05-16

PostgreSQL migrations shipped
295+

Over 295 numbered PLpgSQL migrations on the self-hosted Hetzner PostgreSQL, including the Better Auth UUID-to-text migration across 18 FK-linked tables and recurring normalization passes (e.g., profiles table reduced from 35 to ~18 columns).

SRC: knowledge-base/clients/unpuzzle/projects/1-course-community-saas-technical.md, 2026-05-31

Unpuzzle monthly revenue

Post-rebuild growth
Desktop & Mobile

The full homepage, shown two ways

Two side-by-side screenshots of the long homepage. Hover the desktop card to slowly scroll the screenshot top to bottom, so visitors see the entire page without leaving this one.

  • Desktop · full homepage after rebuild
    1,000+
    Hours vibe-coded into our own SaaS (676 mo)
    /mo at peak
  • Mobile-first after rebuild
    Mobile traffic share
    676 mo
    Engagement length
The work

How the engagement unfolded

  1. Original AI confusion-resolver prototype

    Dec 2023 - Mar 2024

    First concept was an AI-powered confusion resolver inside course videos. Built unpuzzle-ai-project (Node.js / Express / OpenAI / FFmpeg, 10 commits) for AI-assisted video processing — ElevenLabs text-to-speech, ChatGPT integration, video clip generation. Then the V1 Next.js frontend (unpuzzle, 32 commits, Jan-Mar 2024) shipped the confusion-aware course player: students flag confusion moments at video timestamps and get AI explanations. A V2 clean-slate reboot followed (unpuzzle2.0, 3 commits).

    • Node.js + Express
    • OpenAI + FFmpeg
    • Next.js V1
    • Confusion-aware player
    • ElevenLabs TTS
  2. Full SaaS platform on Next.js 15 + Supabase

    Aug 2025 - Dec 2025

    Restart on unpuzzle-mvp as a full multi-tenant course + community SaaS: instructor communities, courses, chapters, video upload pipeline, community feed, Stripe Connect memberships, in-video checkpoint system (voice memo / Loom / quiz / reflection), private mentorship threads with daily proof submission.

    Monetary-goal architecture shipped as the product differentiator: communities are organized around revenue milestones ($1K, $2K, $5K total or MRR), and a student's course visibility is gated by which goal they are assigned. Stack: Next.js 15 / React 19 / TypeScript / Tailwind / Drizzle ORM / Supabase Postgres / Stripe / Backblaze B2 / Anthropic Claude SDK / Groq / Whisper.

    • Next.js 15 + React 19
    • Multi-tenant SaaS
    • Monetary-goal arch
    • Stripe Connect
    • Checkpoint system
    • Private mentorship
  3. Hetzner self-host + Better Auth migration

    Dec 2025 - Feb 2026

    Hit Supabase I/O limits with one user testing across 50+ tables. Migrated PostgreSQL to a self-hosted Hetzner instance behind Coolify (one shared Postgres, one DB per app — 4 apps total for $15/month vs $35/month single-app Supabase). Replaced Supabase Auth with Better Auth (migrations 242-250), including a UUID-to-text ID migration across 18 FK-linked tables, magic link, Google OAuth, and an app-level OAuth flow for Electron app integration. Added Cloudflare Turnstile to auth forms after discovering 17 bot accounts in the database.

    • Hetzner self-host
    • Coolify
    • Better Auth
    • UUID -> text migration
    • Cloudflare Turnstile
  4. Internal training tool + ongoing build (active)

    Mar 2026 - present

    Unpuzzle is now also used internally to train Muscled's own team (8 employees onboarded against checkpoint videos, true/false embedded quizzes, voice-memo and Loom-response prompts). Active development continues on the white-label custom domain system (Traefik dynamic config + auto SSL via Let's Encrypt), eBook builder with Tiptap and AI generation, platform app store with internal OAuth, and Meta CAPI conversion tracking. Documented publicly on the 'Unpuzzle - Vibe Coding SaaS' YouTube channel toward a $1M SaaS revenue goal.

    • Internal employee training
    • White-label domains
    • eBook + Tiptap
    • Platform app store
    • Built publicly on YouTube
Project overview

What we built

Unpuzzle is Muscled's own SaaS product, not a paid client engagement. Mahtab Alam (Muscled founder) is building it using Muscled's development capacity and the multi-agent Claude Code workflow he developed. The original Dec 2023 prototype explored an AI confusion-resolver inside course videos; the current production codebase (unpuzzle-mvp, Aug 2025 - present, active) is a full multi-tenant course and community platform competing in positioning with Kajabi, Teachable, Mighty Networks, and School.

Its product differentiator is the monetary-goal architecture: every community is structured around revenue milestones ($1K / $2K / $5K total or MRR), and a student's course visibility is gated by which goal they are assigned. Removing the goal removes course access; reassigning the goal restores it. Stack: Next.js 15 / React 19 / TypeScript / Tailwind / shadcn/ui / Drizzle ORM / self-hosted PostgreSQL on Hetzner with Coolify / Better Auth / Stripe Connect for instructor payouts / Backblaze B2 with a Cloudflare Worker CDN / Anthropic Claude SDK + Groq + OpenAI Whisper for the AI surface.

Unpuzzle now also serves Muscled internally as the training platform for our 8-person team, with checkpoint videos, voice-memo prompts, Loom-response prompts, and embedded true/false quizzes. Mahtab documents the build publicly on the 'Unpuzzle - Vibe Coding SaaS' YouTube channel toward a stated $1M SaaS revenue goal.

In their own words

I've been doing this for 10-15 hours a day for the last 6 months. I've spent over a thousand hours vibe-coding like crazy.

Mahtab Alam is the founder of Muscled and the builder of Unpuzzle. He grew up in Bangladesh, moved to Canada at age 9, and leads a 17-employee company. Unpuzzle is documented publicly on the 'Unpuzzle - Vibe Coding SaaS' YouTube channel, with a stated goal of $1M in SaaS revenue. It is also used internally as the training surface for Muscled's own team.

Mahtab AlamFounder, Muscled / Unpuzzle
The challenge

What was holding them back?

Unpuzzle was Muscled's chance to prove out the multi-agent Claude Code workflow on a real product with real schema complexity (50+ tables, 295+ migrations, Stripe Connect payouts, white-label custom domains, video upload + transcription + AI features) — and to give our own team the internal training surface we wanted to use. Both had to ship without a paid client deadline forcing the shape of the work.

  1. 01

    Existing community platforms treat goals as text, not as revenue milestones

    Kajabi, Teachable, Mighty Networks, and School let creators write down goals but do not structure the product around them. For a community whose whole reason for existing is to help members hit revenue milestones ($1K, $2K, $5K total or MRR), goals need to be first-class data, not a description field. Course access needs to follow goal assignment.

  2. 02

    Supabase free and entry tiers stop scaling under a real schema

    With 50+ tables and Mahtab as the only user testing, the project hit Supabase I/O operation limits on free, then on the $25/month plan, then on the $35/month nano-to-micro upgrade. Supabase did not surface the specific I/O chart in the dashboard, so the team could not diagnose the bottleneck without leaving the platform.

  3. 03

    Onboarding 8 employees needs more than a Loom playlist

    Muscled needed an internal training surface where new hires move through structured videos, are gated by checkpoints (voice memo, Loom response, true/false quiz, reflection), and where their progress is visible to a mentor. Buying a third-party LMS for an 8-person internal team was overkill; building it inside our own SaaS gave us the tool and the product at once.

  4. 04

    Solo founder + 17-person team needs a build process that is faster than a sprint

    Shipping a Kajabi-class multi-tenant platform with a single founder driving the architecture would normally take a year of engineering. The constraint was speed without losing schema discipline: every few days the codebase risks accumulating redundant columns and one-off tables.

Before / After

Before and after

Before

After

Funnel collapse: we removed a full page from the path to purchase.

Solutions

What we built to fix it

Each fix maps to a specific lift in the funnel.

  • Monetary-goal data model gating course access

    Communities contain optional tracks, tracks contain goals, and goals are linked to courses. Every student gets a default goal on join; their course library only shows courses mapped to that goal. Dedicated student_goal_assignments table holds goal_id, track_id, student_id, community_id, and current_amount so progress lives with the assignment, not the profile.

  • Three-service Docker architecture on Hetzner + Coolify

    Dockerfile, Dockerfile.websocket, and Dockerfile.worker run as three coordinated services: the Next.js 15 app, a Node.js WebSocket server for real-time chunked-upload progress, and background workers (thumbnail / transcription / duration) using FFmpeg and Backblaze B2. Self-hosted PostgreSQL on the same Hetzner box, one shared instance with one database per app. Total infra: $15/month for 4 apps, not stressed.

  • Multi-agent Claude Code workflow with checkpoint discipline

    Two Claude Code instances run in parallel on separate git branches (mohtab-agent1 handles auth and core infrastructure, mohtab-dev-agent2 handles feature development). Every phase starts with a planning MD file Mahtab reviews before code is written. Checkpoint pattern: Claude updates the MD with a testing checklist after each phase; Mahtab confirms before the next phase begins. Periodic database normalization passes (e.g., profiles 35 -> ~18 columns) prevent schema bloat.

  • White-label custom domains + Cloudflare Worker CDN

    Instructors enter a domain in community settings; Unpuzzle writes it to communities.custom_domain, updates Traefik dynamic config server-side, and SSL is provisioned automatically via Let's Encrypt. Subdomain routing on the apex (e.g., upwork.unpuzzle.co) handled by Next.js middleware + Traefik wildcard. Asset delivery runs through a Cloudflare Worker at cdn.unpuzzle.co that proxies Backblaze B2 with HMAC-signed token auth.

The stack

What it was built on

Tools picked for the job, not for the resume.

  • Next.js 15 + React 19
    App framework
  • TypeScript + Tailwind v3 + shadcn/ui
    Frontend
  • PostgreSQL (Hetzner self-hosted)
    Database
  • Drizzle ORM + Drizzle Kit
    ORM / schema
  • Better Auth v1
    Authentication
  • Stripe + Stripe Connect
    Payments / payouts
  • Backblaze B2 + Cloudflare Workers
    Storage / CDN
  • Anthropic Claude SDK + Groq + OpenAI Whisper
    AI
How we engineer performance

Speed is a revenue lever, not a vanity score

Every Muscled build is engineered to the same standard. The numbers below are the published industry benchmarks we design against, not stand-ins for any one client's figures.

conversions per 0.1s of load-time improvement on ecommerce sites.

+8.4%

SRC: DELOITTE / GOOGLE

conversion rate for stores loading under 2s, vs the ~1.4% Shopify average.

2.4%

SRC: SHOPIFY PERFORMANCE DATA

conversion lift per 1s of mobile load-time gained, where 90% of traffic lives.

+10-20%

SRC: SHOPIFY MOBILE BENCHMARKS

// OUR PERFORMANCE GATE we don't ship unless field Core Web Vitals hold: LCP ≤ 2.5s · INP ≤ 200ms · CLS < 0.1 (p75, mobile)

Capability surface

The techniques behind a build like this

Full-stack SaaS engineering

  • Next.js 15 + React 19
  • TypeScript
  • Drizzle ORM
  • PostgreSQL
  • Tailwind v3
  • shadcn/ui
  • Radix UI
  • TanStack Query v5
  • Zustand v5 (30+ store slices)
  • Tiptap v3 rich text editor
  • Framer Motion v12
  • GSAP v3
  • Recharts v3
  • WaveSurfer.js v7
  • react-hook-form v7 + Zod
  • XState v5 state machines

AI + media pipeline

  • Anthropic Claude SDK
  • Groq SDK
  • OpenAI Whisper
  • FFmpeg workers
  • AI chat (instructor + student)
  • AI topic summaries
  • AI video summaries
  • AI quiz generation
  • AI ebook drafting (Tiptap)
  • Reflection journal parsing
  • YouTube import with transcript
  • Chunked multipart upload (<100MB)
  • Direct browser -> B2 upload (>100MB)
  • WebSocket upload progress
  • FFmpeg thumbnails + duration

Infrastructure + auth + payments

  • Hetzner self-hosted Postgres
  • Coolify deploys
  • Stripe Connect
  • Better Auth
  • 3-service Docker (app / websocket / worker)
  • Traefik reverse proxy
  • White-label custom domains + auto SSL
  • Cloudflare Worker CDN (HMAC-signed)
  • Backblaze B2 storage
  • Cloudflare Turnstile bot protection
  • Magic link + Google OAuth + app-level OAuth
  • 295+ PLpgSQL migrations
  • Meta CAPI conversion tracking

Multi-agent Claude Code workflow

  • Two parallel Claude Code agents
  • MD-file-first planning
  • Checkpoint-gated phases
  • Branch-per-agent (mohtab-agent1 / agent2)
  • PR-based merges between agents
  • Pattern reuse across MD references
  • 'What did you understand?' pre-flight
  • Periodic schema normalization passes
  • Profiles table normalized 35 -> ~18 columns
  • Large-gap drag-and-drop positions (100, 200, 300)
  • Goal-progress moved off profiles to assignments table
Storefronts

One build. Multiple markets.

Same theme code across markets, with localized pricing, currency, and region-specific content routed automatically.

  • Canada (global product)

    Multi-tenant SaaS / white-label custom domains
    • Multi-tenant SaaS
    • Next.js 15 + React 19
    • Hetzner self-hosted Postgres
    • Stripe Connect
    • White-label custom domains
    • Backblaze B2 + Cloudflare Worker CDN
    • Better Auth + Cloudflare Turnstile
    Canada (global product) screenshot
    Served from the same Shopify Markets build. Dedicated capture not included.
Full build · sections

Every section, built mobile-first

The full build is many numbered sections, each designed for the phone first. The rail below shows a sample. Scroll horizontally to step through.

The results

What the work delivered

Each number is reconcilable to the founder's own reporting.

Hours vibe-coded on Claude Code
1,000+

Mahtab logged over a thousand hours of vibe-coding with Claude Code at 10-15 hours per day across roughly six months to ship Unpuzzle as Muscled's own multi-tenant SaaS.

SRC: Loom 191a8f5c (founder self-report), 2026-05-16

Production commits on unpuzzle-mvp
745

745 commits across the main production codebase (unpuzzle-mvp) between Aug 2025 and May 2026. Active. Built using a two-agent Claude Code workflow on separate git branches.

SRC: GitHub muscled-clients/unpuzzle-mvp, 2026-05-16

PostgreSQL migrations shipped
295+

Over 295 numbered PLpgSQL migrations on the self-hosted Hetzner PostgreSQL, including the Better Auth UUID-to-text migration across 18 FK-linked tables and recurring normalization passes (e.g., profiles table reduced from 35 to ~18 columns).

SRC: knowledge-base/clients/unpuzzle/projects/1-course-community-saas-technical.md, 2026-05-31

Ready to ship yours?

Let's talk about what you want to ship.

Unpuzzle is the live reference for what Muscled can build for a client: full-stack Next.js 15 SaaS, self-hosted Postgres, Stripe Connect, Better Auth, a video upload + transcription + AI pipeline, white-label custom domains with auto SSL, and a Cloudflare-Worker CDN. 745 commits and 295+ migrations on the production codebase, 1,000+ logged vibe-coding hours, and it is the platform we use internally to train our own team.

30 minutes. No deck.