Skip to content

SmartDTT/as-sandbox

Repository files navigation

Prototype Demo Platform

A Nuxt 3 + TypeScript monorepo for securely demoing client prototypes behind access codes.

How it works

  1. A client visits the landing page and enters their unique access code
  2. The server validates the code against Supabase, issues an HTTP-only session cookie
  3. The client is redirected to their protected prototype route
  4. Access lasts for the current browser session only

Tech Stack

  • Nuxt 3 (SSR) — public shell + prototype routes
  • Supabase — access code validation and session backing
  • pnpm workspaces — monorepo with apps/web + packages/*
  • Vercel — deployment target
  • Vitest — unit tests | Playwright — e2e tests

Local Setup

# Prerequisites: Node 22+, pnpm 10+, Supabase CLI

# 1. Install dependencies
pnpm install

# 2. Copy and fill environment variables
cp .env.example .env

# 3. Start local Supabase
supabase start
supabase db reset   # runs migrations + seed

# 4. Start the dev server
pnpm dev

Environment Variables

Variable Description
SUPABASE_URL Your Supabase project URL
SUPABASE_SERVICE_ROLE_KEY Service role key (server-only, never exposed to client)
SUPABASE_ANON_KEY Public anon key

Running Tests

# Unit tests
pnpm --filter @agency/web exec vitest run
pnpm --filter @agency/shared exec vitest run

# E2E tests (requires dev server + local Supabase running)
pnpm --filter @agency/web exec playwright test

Adding a New Prototype

See docs/runbooks/adding-prototype.md.

Deployment

  1. Push to GitHub — CI runs unit tests + build
  2. Connect repo to Vercel
  3. Set SUPABASE_URL and SUPABASE_SERVICE_ROLE_KEY in Vercel environment variables
  4. Deploy

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors