Documentation
Documentation
Introduction

Getting Started

Getting started
Getting StartedInstallationQuick StartProject Structure

Configuration

Configuration
ConfigurationEnvironment ConfigurationEdge ConfigDatabaseAuth SecretStripeFirebaseStorageGoogle Maps And Cloud Service AccountOAuth ProvidersEmail DeliverySentryFeature Flags

Architecture

Architecture
Architecture OverviewTech StackoRPC MiddlewareDesign Principles

Patterns

Patterns
Code Patterns & ConventionsFeature ModulesError HandlingType Safety

Database

Database
DatabaseSetupSchema DefinitionDatabase OperationsMigrationsCaching
Data Tables

API

oRPCProceduresRoutersoRPC Proxy Setup
APIsOpenAPIREST Endpoints

Auth & Access

AuthenticationConfigurationOAuth ProvidersRolesSession Management
AuthorizationUser RolesPermissions

Routing & i18n

RoutingDeclarative RoutingNavigation
InternationalizationTranslationsLocale Routing

Components & UI

ComponentsButtonsFormsNavigationDialogs
StylesTailwind CSSThemingTypography

Storage

Storage
StorageConfigurationUsageBuckets
Stripe Billing

Extra

Caching

Templates

Templates
Template GuidesCreate New FeatureCreate New PageCreate Database TableCreate oRPC RouterAdd Translations

Development

Development
DevelopmentCommandsAI AgentsBest Practices
Pulling Updates

Environment Configuration

Complete environment variable setup guide for the downloadable template spec

How To Use This Section

This environment guide is organized by integration area. Open each area page and copy values into your .env.local.

Template Version Note

This section follows the new downloadable template spec from this guide. It intentionally focuses on those variables.

Variable Index

VariableAreaNotes
VERCEL_EDGE_CONFIG_IDEdge ConfigRequired for feature-flag read access
VERCEL_EDGE_CONFIG_TOKENEdge ConfigRequired for feature-flag read access
VERCEL_API_TOKENEdge ConfigOptional, used for write/update operations
DATABASE_URLDatabasePostgreSQL connection string
BETTER_AUTH_SECRETAuth SecretHigh-entropy secret for auth signing
STRIPE_SECRET_KEYStripeStripe server-side API key
STRIPE_WEBHOOK_SECRETStripeStripe webhook signing secret
NEXT_PUBLIC_FIREBASE_API_KEYFirebaseFirebase web SDK config
NEXT_PUBLIC_FIREBASE_AUTH_DOMAINFirebaseFirebase Auth domain
NEXT_PUBLIC_FIREBASE_PROJECT_IDFirebaseFirebase project ID
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKETFirebaseFirebase Storage bucket
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_IDFirebaseFirebase messaging sender ID
NEXT_PUBLIC_FIREBASE_APP_IDFirebaseFirebase web app ID
NEXT_PUBLIC_GA_IDFirebaseGoogle Analytics measurement ID
S3_ENDPOINTStorageOptional custom endpoint (R2/MinIO/etc.)
S3_REGIONStorageRegion or auto for R2
S3_ACCESS_KEYStorageAccess key ID
S3_SECRET_KEYStorageSecret access key
S3_BUCKETStorageBucket name
NEXT_PUBLIC_GOOGLE_MAPS_API_KEYGoogle MapsBrowser maps API key
NEXT_PUBLIC_GOOGLE_MAP_IDGoogle MapsRequired for map style rendering
GOOGLE_CLOUD_CLIENT_EMAILGoogle CloudService account client email
GOOGLE_CLOUD_PRIVATE_KEYGoogle CloudService account private key
GOOGLE_CLIENT_IDOAuthGoogle OAuth client ID
GOOGLE_CLIENT_SECRETOAuthGoogle OAuth client secret
GITHUB_CLIENT_IDOAuthGitHub OAuth client ID
GITHUB_CLIENT_SECRETOAuthGitHub OAuth client secret
RESEND_API_KEYEmailResend API key
EMAIL_SENDEREmailDisplay name for sender
EMAIL_DOMAINEmailPrimary sender domain
NODEMAILER_EMAIL_HOSTEmailSMTP host
NODEMAILER_EMAIL_PORTEmailSMTP port
NODEMAILER_EMAIL_USERNAMEEmailSMTP username
NODEMAILER_EMAIL_PASSWORDEmailSMTP password
NODEMAILER_FALLBACK_EMAILEmailFallback from address
SENTRY_AUTH_TOKENSentryToken for source maps and integrations
SENTRY_ORGSentrySentry organization slug
SENTRY_PROJECTSentrySentry project slug
NEXT_PUBLIC_SENTRY_DSNSentryPublic DSN for browser/server SDK init

Area Guides

Edge Config

Vercel Edge Config IDs, read token, and optional write token.

Database

Neon and Supabase setup for DATABASE_URL.

Auth Secret

Generate and manage BETTER_AUTH_SECRET securely.

Stripe

Stripe API key and webhook signing secret setup.

Firebase

Firebase web app config and analytics measurement ID.

Storage

Firebase Storage provider setup and S3-compatible configuration.

Google Maps + Cloud

Maps API keys, map style ID, and service account credentials.

OAuth

Google and GitHub OAuth app credentials.

Email

Resend and SMTP (Nodemailer) configuration.

Sentry

Project setup, DSN, and auth token mapping.

Troubleshooting Quick Links

  1. Database bootstrap commands: Database Setup
  2. Common command reference: Development Commands
  3. OAuth callback troubleshooting: Auth Providers
  4. Feature flag behavior details: Feature Flags

On this page

How To Use This Section
Variable Index
Area Guides
Troubleshooting Quick Links