Prerequisites
- Node.js 20+ (recommended: use nvm)
- npm, yarn, pnpm, or bun
- Git
Quick start
1
Navigate to web directory
2
Install dependencies
3
Set up environment variables
.env.local with your configuration:4
Start the development server
5
Open in browser
Navigate to http://localhost:3000
Environment variables
Required variables
Optional variables
Feature flags
useFeatureFlag resolves in this order:
- Session override from the header beaker menu (this browser, persisted as
sc.dev.feature-flag-overrides) NEXT_PUBLIC_FF_*environment variables- PostHog
- Off
NEXT_PUBLIC_ENVIRONMENT / NODE_ENV is development). In QA and production it is gated by the feature-flag-overrides PostHog flag (or NEXT_PUBLIC_FF_FEATURE_FLAG_OVERRIDES), enabled for person emails containing @soundchecklive (same internal-only pattern as finances-csv-export). On/Off shows the value applied in this browser; a local marker and per-flag reset appear when that value is forced. Reset all restores env/PostHog defaults. The gate flag itself cannot be session-overridden, so localStorage cannot unlock the menu.
For Azure builds, configure NEXT_PUBLIC_FF_FEATURE_FLAG_OVERRIDES as a GitHub environment variable before building the image. The workflow forwards it into the Docker build; changing only the running app configuration does not update this client-side value. Route guards wait for stored overrides and the access gate to resolve. If browser storage is unavailable, overrides work in memory until the page reloads.
Running with backend
For full functionality, run the web app alongside api-events:1
Start shared infrastructure and API
In a separate terminal:
2
Start the web app
Access points
Development scripts
Core commands
Quality checks
Testing
Editor setup
VS Code / Cursor
Recommended extensions:- Oxc / oxlint - Linting
- Tailwind CSS IntelliSense - Tailwind autocompletion
- TypeScript and JavaScript - Language support
.vscode/settings.json for consistent configuration.
Code style
Styling
- Use Tailwind CSS only (no SCSS/CSS files)
- Use
cn()from@/lib/utilsfor className composition - Follow semantic design tokens for colors
Components
- Functional components with hooks
- Strong TypeScript typing (avoid
any) - Group imports: external → internal (
@/) → relative
Import order
Troubleshooting
Port 3000 already in use
Port 3000 already in use
Kill the process using the port:
Clerk authentication fails
Clerk authentication fails
Verify environment variables:
- Check
.env.localexists inweb/directory - Ensure both
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEYandCLERK_SECRET_KEYare set - Verify keys match your Clerk dashboard
API calls failing
API calls failing
- Ensure api-events is running:
curl http://localhost:4000/health - Check
NEXT_PUBLIC_API_URLin.env.local - Verify your origin is in
CORS_ORIGINS(defaults includelocalhost:3000for local dev)
TypeScript errors
TypeScript errors
Run type checking to see all issues:
Next steps
Architecture
Understand the app structure
Testing
Learn about testing strategies