Guy McKechnieSoftware Engineer · PAS-SA
All Projects & Systems
Dance Studio Multi-Tenant SaaSLive in Production

Qaydence

Multi-tenant studio operations platform with studio-scoped Row Level Security on Supabase PostgreSQL, competition matrices, and split billing.

Client / DomainQaydence Platform Venture
My RoleFounder & Lead Architect
Timeline2024 – Present
External Links
Qaydence Production Interface Screenshot
FIGURE 1.0 // QAYDENCE PRODUCTION INTERFACE VIEWTAGS: React · Supabase · Multi-Tenant · PostgreSQL RLS · TypeScript · Tailwind CSS
Metrics // Quantifiable Outcomes

Production Impact

100%Data Isolation

Zero cross-tenant data exposure across all studios.

<100msMatrix Scoring

Real-time leaderboard updates during competitive dance rounds.

LiveCommercial Status

Actively serving dance studios and competitive academies.

01 // Context & Problem

The Engineering Challenge

Dance studios manage complex choreography rosters, competition registrations, parent accounts, and tuition fees. Most software either lacks multi-tenant data isolation or cannot handle complex competition scoring brackets and multi-child family billing splits.

02 // Architecture & Data Flow

System Design & Pipeline

Built on a single-database multi-tenant model where every query is strictly governed by PostgreSQL Row Level Security (RLS) policies tied to JWT studio claims.

[Dance Studio Users: Directors, Instructors, Parents]
                     |
                     v
             [React Web App (PWA)]
                     |
                     v  (Authenticated JWT with tenant_id)
        [Supabase API / PostgREST Gateway]
                     |
                     v
     [PostgreSQL Database with Enforced RLS]
     - Policy: tenant_id = current_setting('app.tenant_id')
     - Table: students, classes, invoices, scores
                     |
                     v
           [Strict Tenant Isolation]

Step 01: Multi-Tenant RLS Enforcement

Database policies automatically filter all SELECT, INSERT, UPDATE, and DELETE operations by studio tenant ID, making cross-tenant data leakage impossible.

Step 02: Competition Matrix Engine

Computes dynamic age brackets, difficulty categories, and live judge scoring tallies with instantaneous rank updates.

Step 03: Parent Billing & Family Splits

Automates multi-child tuition discounts, costume fees, and itemized monthly account statements.

03 // Implementation & Tradeoffs

Technical Decisions

React frontend with Supabase serverless backend, leveraging PostgreSQL functions, triggers, and Row Level Security policies.

Decision 01

Engine-level PostgreSQL RLS over application-layer filtering

Rationale:

Even if application logic has a bug, the database engine itself rejects queries across different studio boundaries.

Trade-off Accepted:

Complex multi-table join policies require indexed foreign keys to prevent sequential scans.

Decision 02

PostgreSQL generated columns for competition eligibility

Rationale:

Offloaded age division calculations into the DB schema, ensuring instant sorting without frontend computation.

Trade-off Accepted:

Schema changes to division cutoff rules require database migrations.

Specification Sheet

Technical Stack

Languages
TypeScript · SQL
Frameworks & Libs
React · Supabase · Tailwind CSS
Infrastructure
PostgreSQL · Supabase Cloud · Vercel
Protocols & Formats
REST · Realtime WebSockets · PostgREST
Testing & Profiling
Vitest · pgTAP Database Unit Tests