Skip to content

Getting Started

Ensure the following tools are installed before proceeding:

ToolMinimum VersionPurpose
Node.js20+JavaScript runtime
npm10+Package manager (ships with Node)
Supabase CLIlatestLocal Supabase development stack
Wrangler CLIlatestCloudflare Pages deployment and local bindings
Terminal window
git clone <repository-url> honeycomb
cd honeycomb
npm install

Create a .env file in the project root. The following variables are required:

Terminal window
# Supabase
PUBLIC_SUPABASE_URL= # Your Supabase project URL (e.g. https://xxxxx.supabase.co)
PUBLIC_SUPABASE_PUBLISHABLE_KEY= # Supabase anon/public key for client-side access
SUPABASE_SERVICE_ROLE_KEY= # Supabase service role key for server-side operations
# Stripe
STRIPE_SECRET_KEY= # Stripe secret key for server-side billing operations
STRIPE_WEBHOOK_SECRET= # Stripe webhook signing secret for verifying events
PUBLIC_STRIPE_PUBLISHABLE_KEY= # Stripe publishable key for client-side checkout
# AI Providers
OPENAI_API_KEY= # OpenAI API key for GPT-based features
ANTHROPIC_API_KEY= # Anthropic API key for Claude-based features
# Third-Party Services
PUBLIC_GIPHY_API_KEY= # Giphy API key for GIF search and display
# Internal
CRON_SECRET= # Shared secret for authenticating scheduled cron job endpoints

Start the development server:

Terminal window
npm run dev

This launches SvelteKit in development mode with hot module replacement. The app is available at http://localhost:5173 by default.

For a fully local development environment, spin up Supabase locally:

Terminal window
supabase start

This starts local instances of PostgreSQL, Auth, Storage, and the Supabase API. On first run it will pull the required Docker images.

Apply existing database migrations:

Terminal window
supabase db reset

This drops and recreates the local database, then applies all migrations from the supabase/migrations directory and seeds any seed data.

Terminal window
supabase migration new <migration_name>

Creates a new empty SQL migration file in supabase/migrations/.

Generate a production build:

Terminal window
npm run build

This produces an optimized output in the build directory, configured for the Cloudflare Pages adapter. You can preview the production build locally:

Terminal window
npm run preview

Deploy manually using Wrangler:

Terminal window
wrangler pages deploy .svelte-kit/cloudflare

Set production environment variables through the Cloudflare dashboard or via Wrangler:

Terminal window
wrangler pages secret put SUPABASE_SERVICE_ROLE_KEY
wrangler pages secret put STRIPE_SECRET_KEY
wrangler pages secret put STRIPE_WEBHOOK_SECRET
wrangler pages secret put OPENAI_API_KEY
wrangler pages secret put ANTHROPIC_API_KEY
wrangler pages secret put CRON_SECRET

Each command prompts for the secret value interactively. Public variables (prefixed with PUBLIC_) should be set as plaintext environment variables in the Cloudflare Pages project settings.