Getting Started
Prerequisites
Section titled “Prerequisites”Ensure the following tools are installed before proceeding:
| Tool | Minimum Version | Purpose |
|---|---|---|
| Node.js | 20+ | JavaScript runtime |
| npm | 10+ | Package manager (ships with Node) |
| Supabase CLI | latest | Local Supabase development stack |
| Wrangler CLI | latest | Cloudflare Pages deployment and local bindings |
Clone and Install
Section titled “Clone and Install”git clone <repository-url> honeycombcd honeycombnpm installEnvironment Variables
Section titled “Environment Variables”Create a .env file in the project root. The following variables are required:
# SupabasePUBLIC_SUPABASE_URL= # Your Supabase project URL (e.g. https://xxxxx.supabase.co)PUBLIC_SUPABASE_PUBLISHABLE_KEY= # Supabase anon/public key for client-side accessSUPABASE_SERVICE_ROLE_KEY= # Supabase service role key for server-side operations
# StripeSTRIPE_SECRET_KEY= # Stripe secret key for server-side billing operationsSTRIPE_WEBHOOK_SECRET= # Stripe webhook signing secret for verifying eventsPUBLIC_STRIPE_PUBLISHABLE_KEY= # Stripe publishable key for client-side checkout
# AI ProvidersOPENAI_API_KEY= # OpenAI API key for GPT-based featuresANTHROPIC_API_KEY= # Anthropic API key for Claude-based features
# Third-Party ServicesPUBLIC_GIPHY_API_KEY= # Giphy API key for GIF search and display
# InternalCRON_SECRET= # Shared secret for authenticating scheduled cron job endpointsRunning Locally
Section titled “Running Locally”Start the development server:
npm run devThis launches SvelteKit in development mode with hot module replacement. The app is available at http://localhost:5173 by default.
Supabase Local Setup
Section titled “Supabase Local Setup”For a fully local development environment, spin up Supabase locally:
supabase startThis 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:
supabase db resetThis drops and recreates the local database, then applies all migrations from the supabase/migrations directory and seeds any seed data.
supabase migration new <migration_name>Creates a new empty SQL migration file in supabase/migrations/.
supabase db diff --use-migraGenerates a migration by comparing your local schema against the current migration state.
supabase db pushApplies pending local migrations to the linked remote Supabase project.
Building for Production
Section titled “Building for Production”Generate a production build:
npm run buildThis produces an optimized output in the build directory, configured for the Cloudflare Pages adapter. You can preview the production build locally:
npm run previewDeploying to Cloudflare Pages
Section titled “Deploying to Cloudflare Pages”Deploy manually using Wrangler:
wrangler pages deploy .svelte-kit/cloudflareSet production environment variables through the Cloudflare dashboard or via Wrangler:
wrangler pages secret put SUPABASE_SERVICE_ROLE_KEYwrangler pages secret put STRIPE_SECRET_KEYwrangler pages secret put STRIPE_WEBHOOK_SECRETwrangler pages secret put OPENAI_API_KEYwrangler pages secret put ANTHROPIC_API_KEYwrangler pages secret put CRON_SECRETEach 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.