DocsGetting StartedConfiguration

Configuration

Shipfastai uses environment variables for configuration. Here's what you need to set up.

Frontend Environment Variables

Create frontend/.env.local:

Supabase

NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co

NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key

Backend API

NEXT_PUBLIC_API_URL=http://localhost:8000

Stripe (publishable key)

NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_...

Optional: Analytics

NEXT_PUBLIC_POSTHOG_KEY=your-key

NEXT_PUBLIC_POSTHOG_HOST=https://app.posthog.com

Backend Environment Variables

Create backend/.env:

Supabase

SUPABASE_URL=https://your-project.supabase.co

SUPABASE_SERVICE_KEY=your-service-role-key

Stripe

STRIPE_SECRET_KEY=sk_test_...

STRIPE_WEBHOOK_SECRET=whsec_...

OpenAI

OPENAI_API_KEY=sk-...

Optional: Other LLMs

ANTHROPIC_API_KEY=sk-ant-...

Email (Resend)

RESEND_API_KEY=re_...

App Config

APP_NAME=Shipfastai

APP_URL=http://localhost:3000

Supabase Setup

1. Get Your Keys

1. Go to your Supabase project dashboard

2. Navigate to Settings > API

3. Copy the URL and anon key for frontend

4. Copy the service role key for backend

2. Run Migrations

supabase db push

Or manually run each file in supabase/migrations/.

Stripe Setup

1. Get API Keys

1. Go to Stripe Dashboard > Developers > API keys

2. Copy publishable key for frontend

3. Copy secret key for backend

2. Set Up Webhook

1. Go to Stripe Dashboard > Developers > Webhooks

2. Add endpoint: https://your-domain.com/api/stripe/webhook

3. Select events: checkout.session.completed, customer.subscription.*

4. Copy webhook secret

3. Create Products

Create your pricing plans in Stripe:

1. Go to Products > Add product

2. Create pricing tiers (e.g., Starter, Pro, Enterprise)

3. Note the price IDs for your frontend

OpenAI Setup

1. Go to [platform.openai.com](https://platform.openai.com)

2. Create an API key

3. Add to backend environment variables

Resend Setup (Emails)

1. Go to [resend.com](https://resend.com)

2. Create an API key

3. Verify your sending domain

4. Add to backend environment variables