Nightkey

Multi-sided nightlife marketplace — iPad club dashboard, mobile apps for guests and promoters, PayFac payments, and live operations from booking to door

Nightkey

Overview

Nightkey is a four-sided marketplace for high-end nightlife: an iPad-first club dashboard for venue operators, a guest app for table bookings and bottle service, a promoter app for guest lists and commissions, and a bottle-server experience for in-night service. One Supabase backend powers all four surfaces with row-level security per role, real-time booking state, an embedded payment facilitator pipeline for sub-merchant boarding and split payouts, and a Konva-based floor-plan editor that operators use to lay out their venue and accept reservations.

The challenge: Nightclubs run on spreadsheets, group chats, and improvised cash splits. Guests can't reliably book a table, promoters can't prove the heads they brought, and operators can't see their floor in real time. Nightkey is the operating layer that ties guests, promoters, hosts, and venues together — with payments, bookings, and accountability built in.

Key Features

01
Next.jsiPadiOS-grade UI

iPad-First Club Dashboard

Next.js App Router dashboard tuned for landing-on-the-iPad operations: 44px+ touch targets, Tonight cockpit for live floor view, Konva-based floor plan editor, staff management, and a Centurion-Lounge-style premium aesthetic — not a generic admin template.

02
KonvaCanvasEditor

Konva Floor-Plan Editor

Drag-and-drop venue layout editor with auto-layout templates, table sizing, shape primitives, and zone coloring. Operators design their venue once; bookings, server assignments, and door-side check-in all reference the same canonical layout.

03
Multi-tenantRLSPostgres

Four-Role Marketplace on One Schema

Clubs, promoters, guests, and bottle servers share one Postgres instance with role-aware RLS policies. Promoter affiliations join through promoter_profiles; club staff use is_active. Every table enforces tenancy at the database layer, not the app layer.

04
PayFacQorCommerceBoarding

PayFac Sub-Merchant Boarding

Clubs and promoters onboard as sub-merchants under a Payment Facilitator. board-merchant and board-promoter Edge Functions call QorCommerce new_merchant, store provider IDs, and gate live charges on a verified status returned by the payment-webhook.

05
pdf-libE-signCompliance

Promoter NSA PDF Pipeline

generate-promoter-nsa-pdf stamps a non-solicitation agreement with the promoter's name, EIN, signature image, and timestamp using pdf-lib, then writes the signed PDF to Supabase Storage and links it to the promoter profile. Drives the legal handoff for paid promoter status.

06
RenderStatic IPUnderwriting

Underwriting Document Relay

Underwriting documents (KYB/KYC) flow from Supabase Storage through a small Node forwarder deployed on Render with a static outbound IP, satisfying the payment processor's IP allowlist requirement without rewriting the Supabase egress story.

07
State machineRealtimeDoor

Booking State Machine + Door Operations

Bookings flow through pending → confirmed → active → completed | cancelled | no_show. guest-checkin-confirm flips state at the door, settle-booking captures the final charge, and the host-side Tonight view updates in realtime via Supabase Broadcast.

08
PayoutsSplitsCommissions

Split Payouts

daily-club-payout and disburse-payouts settle nightly: platform commission is deducted from the club share, promoter commissions are routed to the promoter sub-merchant, and the remainder is paid to the club sub-merchant. Configurable per-club schedules.

09
AWSGCPKYC

ID Verification (Rekognition + Vision)

verify-id Edge Function combines AWS Rekognition face match and Google Cloud Vision OCR for ID document verification — separate from Stripe Identity, so the platform owns the data pipeline and can adjust thresholds, retry behavior, and audit logging.

10
AuthStep-upAudit

Step-up Auth for Staff

staff-step-up-start and staff-step-up-verify add a second factor for sensitive operator actions (refunds, comps, settlement edits). Time-boxed elevation tokens scoped to the staff session, never to the device.

11
ExpoiOSAndroid

Cross-Platform Mobile (Expo)

Guest and promoter apps ship from a separate Expo repo against the same Supabase schema. Phone OTP auth for mobile, OAuth/email for the dashboard. EAS Build with auto-submit, TestFlight gated by an Apple-review demo venue that bypasses the payment processor for review screens.

12
WebhooksSyncDispatch

Webhook-Driven Status Sync

payment-webhook handles merchant.verified, merchant.declined, payment events, and disputes through a single typed dispatcher. updateMerchantBoardingStatus updates either clubs or promoter_payout_profiles depending on the sub-merchant role.

Tech Stack

Next.js 15 (App Router)React 19TypeScriptTailwind CSSKonvaFramer MotionExpo SDKReact NativeEAS Build & SubmitExpo PushSupabase Postgres73 MigrationsRow-Level Security24 Edge Functions (Deno)Supabase RealtimeSupabase StorageQorCommerce PFaaSSub-merchant boardingRender (static-IP relay)pdf-lib (NSA generation)VercelTwilio (SMS)AWS Rekognition (ID)Google Cloud Vision (ID)Resend (email)TECH STACK

Skills Applied

Multi-Tenant Postgres + RLS

73 versioned migrations across clubs, promoters, guests, staff, bookings, payments, and underwriting. Row-Level Security on every table with role-aware helpers (is_active for staff, promoter_profiles join for affiliations). Indexes tuned for live floor queries during peak hours.

Payment Facilitator Integration

Sub-merchant boarding flow against QorCommerce: new_merchant requests, status polling, underwriting doc upload, and a payment-webhook dispatcher that updates internal status. PayFac merchant of record routes funds through the platform before splits.

Edge Function Architecture

24 Deno-based Supabase Edge Functions covering boarding, payouts, webhooks, notifications, ID verification, and PDF generation. Shared helpers in _shared/ for state validation, timezone mapping, and QorCommerce request signing. TDD with Deno test suites.

PDF Generation & E-Sign

pdf-lib-based NSA stamping pipeline that overlays promoter signature, name, EIN, and ISO timestamp on a base PDF template. Signed agreements stored in Supabase Storage with row-level access tied to the promoter profile.

Realtime Operations UI

Supabase Broadcast + Realtime for the Tonight cockpit: live booking arrivals, host floor view, server assignments, and booking state transitions. Optimistic UI on the client, RLS-gated subscriptions on the server.

Canvas Editor (Konva)

Floor-plan editor with shape primitives, snap-to-grid, auto-layout templates, zone coloring, and persisted state. Hand-tuned for iPad pencil + touch input. Output drives every downstream surface — bookings, server assignments, door-side check-in.

Cross-Platform Schema Sharing

One Supabase project powers both the Next.js dashboard and an Expo mobile app in a separate repo. Generated TypeScript types from the Postgres schema flow into both clients. Phone OTP for mobile, OAuth/email for web, unified RLS for both.

Compliance & Static IP Networking

Vendor IP-allowlist requirement solved with a thin Node forwarder on Render with a static outbound IP. Supabase Storage signed URLs piped through the relay so client documents never leave the platform without being authenticated.

ID Verification Pipeline

AWS Rekognition face match + Google Cloud Vision OCR composed in a single verify-id Edge Function. Confidence thresholds tuned for nightlife at-the-door scenarios; failed attempts logged for audit with PII redaction.

TDD on Critical Paths

Deno test suites for payment-webhook (30 tests), board-promoter (15 tests), poll-merchant-status, and shared qor-helpers. Each flow developed RED → GREEN before deployment, with tests asserting state transitions, error mapping, and webhook idempotency.

Premium iPad UI

Amex Centurion Lounge and Airbnb references. Phosphor duotone icons (not lucide), generous spacing, photography-forward cards, Framer Motion page and list transitions. Amber accent with warm dark theme; iPad-class touch targets throughout.

Mobile Release Engineering

Expo EAS Build with --auto-submit to TestFlight and Play Internal. Apple-review demo venue isolated from production data via dashboard bypass mode for payments; live venue data never exposed to review accounts.