Unbound Web App

Unbound Web App

Next.js 16 web application for the Unbound platform.

Prerequisites

  • Node.js 20+
  • pnpm 9+
  • Supabase CLI (for local development)

Environment Variables

Copy .env.example to .env.local and configure the following:

Required Variables

VariableTypeDescription
NEXT_PUBLIC_SUPABASE_URLPublicSupabase project URL
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEYPublicSupabase anonymous/publishable key
SUPABASE_SECRET_KEYSecretSupabase service role key
SUPABASE_JWT_SIGNING_KEYSecretJWT signing key for token validation
STRIPE_SECRET_KEYSecretStripe secret API key
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEYPublicStripe publishable key
STRIPE_WEBHOOK_SECRETSecretStripe webhook signing secret
ADMIN_EMAILSecretAdmin email for notifications
RESEND_API_KEYSecretResend email service API key
UNKEY_ROOT_KEYSecretUnkey root API key
UNKEY_API_IDSecretUnkey API identifier

Analytics & Monitoring

VariableTypeDescription
NEXT_PUBLIC_POSTHOG_API_KEYPublicPostHog analytics API key
NEXT_PUBLIC_POSTHOG_APP_IDPublicPostHog app ID
NEXT_PUBLIC_POSTHOG_HOSTPublicPostHog server URL
NEXT_PUBLIC_GA_IDPublicGoogle Analytics ID
NEXT_PUBLIC_SENTRY_DSNPublicSentry error tracking DSN

Site Configuration

VariableTypeDescriptionDefault
NEXT_PUBLIC_SITE_URLPublicApplication public URLhttp://localhost:3000
NEXT_PUBLIC_RELAY_URLPublicRelay WebSocket URLws://localhost:8080

OAuth Providers (Optional)

VariableTypeDescription
GITHUB_CLIENT_IDSecretGitHub OAuth client ID
GITHUB_CLIENT_SECRETSecretGitHub OAuth client secret
GOOGLE_CLIENT_IDSecretGoogle OAuth client ID
GOOGLE_CLIENT_SECRETSecretGoogle OAuth client secret
TWITTER_API_KEYSecretTwitter/X API key
TWITTER_API_SECRETSecretTwitter/X API secret

Development Options

VariableTypeDescription
USE_LOCAL_EMAILStringSet to "true" to skip sending real emails
NODE_ENVStringdevelopment, test, or production

Development

# Install dependencies
pnpm install

# Start local Supabase
pnpm supabase start

# Run development server
pnpm dev

# Build for production
pnpm build

# Run production build
pnpm start

Local Supabase

For local development, the app expects Supabase at http://127.0.0.1:54321.

Default local credentials:

  • URL: http://127.0.0.1:54321
  • Anon Key: (see Supabase CLI output)
  • Database: postgresql://postgres:postgres@127.0.0.1:54322/postgres

Code Quality

# Format and lint
npx ultracite fix

# Check for issues
npx ultracite check