ShipAIKit

Documentation

Get ShipAIKit running in ~20 minutes. Everything you need from first clone to live deployment.

Quick Start

Get up and running in ~20 minutes.

  1. 1

    Clone the repo

    git clone https://github.com/your-username/shipaikit.git my-app && cd my-app && npm install
  2. 2

    Copy the env file

    cp .env.example .env.local
  3. 3

    Fill in your environment variables

    See the Environment Variables section below.

  4. 4

    Push the database schema

    npx prisma db push
  5. 5

    Run locally

    npm run dev

    Then visit http://localhost:3000

  6. 6

    Deploy

    Push to GitHub, connect to Vercel, add env vars in Vercel settings.

Environment Variables

Complete .env.local reference. Copy .env.example and fill in each value.

Clerk — Authentication

NEXT_PUBLIC_CLERK_PUBLISHABLE_KEYFrom Clerk dashboard → API Keys
CLERK_SECRET_KEYFrom Clerk dashboard → API Keys
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-inSign-in page path
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-upSign-up page path
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/dashboardRedirect after sign in
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/dashboardRedirect after sign up
CLERK_WEBHOOK_SECRETWebhook signing secret — Clerk Dashboard → Webhooks → Add Endpoint → Signing Secret. Required for user sync.

Database — Supabase

DATABASE_URLTransaction pooler URL, port 6543 (Supabase → Settings → Database → Transaction pooler)
DIRECT_URLDirect connection URL, port 5432 (Supabase → Settings → Database → Direct connection)
NEXT_PUBLIC_SUPABASE_URLOptional — only needed for realtime/storage. Supabase → Settings → API → Project URL
NEXT_PUBLIC_SUPABASE_ANON_KEYOptional — only needed for realtime/storage. Supabase → Settings → API → anon public key

Payments — Lemon Squeezy

LEMONSQUEEZY_API_KEYFrom Lemon Squeezy → Settings → API
LEMONSQUEEZY_WEBHOOK_SECRETFrom your webhook endpoint configuration

Email — Resend

RESEND_API_KEYFrom Resend dashboard → API Keys

AI — Anthropic or OpenAI

ANTHROPIC_API_KEYFrom console.anthropic.com — use this OR OpenAI
OPENAI_API_KEYFrom platform.openai.com — use this OR Anthropic
AI_PROVIDERSet to "anthropic" or "openai" to match your key

Discord — Community Auto-Join

DISCORD_BOT_TOKENBot token from Discord Developer Portal → Bot → Token. Required for Pro + AI Guided buyers.
DISCORD_CLIENT_IDApplication/Client ID from Developer Portal (default: 1485266619667054763)
DISCORD_CLIENT_SECRETFrom Developer Portal → OAuth2 → Client Secret
DISCORD_GUILD_IDYour Discord server ID (right-click server → Copy Server ID)
DISCORD_ROLE_PRORole ID for Pro members (right-click role in Server Settings → Copy Role ID)
DISCORD_ROLE_AGENCYRole ID for AI Guided members (right-click role in Server Settings → Copy Role ID)
DISCORD_REDIRECT_URIhttps://yourdomain.com/api/auth/discord/callback — must match OAuth2 redirect in Developer Portal

Services Setup

Step-by-step setup for each external service. Free tiers are sufficient to get started on all of them.

Clerk

  1. 1.Go to clerk.com → Create application
  2. 2.Choose Email + Google sign-in methods
  3. 3.Copy Publishable Key and Secret Key to .env.local
  4. 4.Dashboard → Webhooks → Add Endpoint → URL: https://yourdomain.com/api/webhooks/clerk
  5. 5.Subscribe to events: user.created and user.deleted
  6. 6.Copy the Signing Secret → set as CLERK_WEBHOOK_SECRET in .env.local

Supabase

  1. 1.Go to supabase.com → New project
  2. 2.Choose a region close to your users
  3. 3.Settings → Database → Connection string
  4. 4.Copy Transaction pooler URL (port 6543) as DATABASE_URL
  5. 5.Copy Direct connection URL (port 5432) as DIRECT_URL
  6. 6.Run npx prisma db push to create your tables

Lemon Squeezy

  1. 1.Go to lemonsqueezy.com → Create a store
  2. 2.Create your products (Starter $97, Pro $197, AI Guided $397)
  3. 3.Settings → API → Create API key → paste as LEMONSQUEEZY_API_KEY
  4. 4.Set up a webhook pointing to https://yourdomain.com/api/webhooks/lemonsqueezy
  5. 5.Copy the webhook signing secret as LEMONSQUEEZY_WEBHOOK_SECRET
  6. 6.Copy each variant ID to LEMON_SQUEEZY_PRODUCT_STARTER_VARIANT_ID, LEMON_SQUEEZY_PRODUCT_PRO_VARIANT_ID, LEMON_SQUEEZY_PRODUCT_AI_GUIDED_VARIANT_ID

Resend

  1. 1.Go to resend.com → Create account
  2. 2.Add and verify your sending domain
  3. 3.API Keys → Create API key → paste as RESEND_API_KEY

AI (Anthropic or OpenAI)

  1. 1.Go to console.anthropic.com or platform.openai.com
  2. 2.Create an API key
  3. 3.Set ANTHROPIC_API_KEY or OPENAI_API_KEY in your env
  4. 4.Set AI_PROVIDER=anthropic or AI_PROVIDER=openai to match

Discord Community Auto-Join (Pro + AI Guided)

  1. 1.Go to discord.com/developers/applications → select your app (or create one)
  2. 2.OAuth2 → Redirects → Add: https://yourdomain.com/api/auth/discord/callback
  3. 3.Copy Client ID → set as DISCORD_CLIENT_ID
  4. 4.OAuth2 → Client Secret → copy → set as DISCORD_CLIENT_SECRET
  5. 5.Bot → Token → copy → set as DISCORD_BOT_TOKEN
  6. 6.Right-click your Discord server → Copy Server ID → set as DISCORD_GUILD_ID
  7. 7.In Server Settings → Roles: right-click your Pro role → Copy Role ID → set as DISCORD_ROLE_PRO, same for AI Guided role → DISCORD_ROLE_AGENCY
  8. 8.Make sure the bot role is above Pro/AI Guided roles in the role hierarchy (Server Settings → Roles)

Deployment

Vercel is recommended — it works great with Next.js out of the box.

Vercel (recommended)

  1. 1.Push your repo to GitHub
  2. 2.Go to vercel.com/new → Import your repository
  3. 3.Settings → Environment Variables → add every variable from .env.local (all three environments)
  4. 4.Critical: DATABASE_URL must be the transaction pooler URL (port 6543) in production — Vercel uses serverless functions
  5. 5.Deploy — your app goes live at a .vercel.app URL
  6. 6.Add a custom domain: Settings → Domains

Custom domain

Point your nameservers or a CNAME record to Vercel. SSL is provisioned automatically.

AI Guided Setup

The AI Guided plan includes Kit — an AI agent that walks you through your entire setup step by step. Kit runs inside OpenClaw on your Mac.

K

Kit — Your AI Setup Agent

Powered by Anthropic Claude via OpenClaw

Kit knows your product, remembers your progress across sessions, and guides you through every step — Vercel, Supabase, Clerk, payments, and DNS. No terminal knowledge required.

Step 1 — Install OpenClaw

OpenClaw is the AI agent runtime Kit lives inside. Install it on your Mac:

npm install -g openclaw

Or visit openclaw.ai for full installation instructions.

Step 2 — Download Kit's config files

These three files turn OpenClaw into Kit — your ShipAIKit setup agent. Download them and place them in your OpenClaw workspace folder (~/.openclaw/workspace/).

Step 3 — Start Kit

Once the files are in place, start OpenClaw:

openclaw start

Kit will introduce herself and ask what you want to set up first. Just talk to her — she'll handle the rest.

💡 Kit remembers your progress

Kit uses a 3-layer memory system — she logs every session, remembers what's been set up, and picks up exactly where you left off if you close and reopen the app.

Troubleshooting

Common issues and how to fix them.

Build fails on Vercel with a Prisma error

Make sure DATABASE_URL and DIRECT_URL are both set in Vercel env vars for all three environments (Production, Preview, Development). The build runs `prisma generate` — it needs the database URL at build time.

Prisma errors when running locally

Run `npx prisma db push` to sync your schema. "Table not found" errors are always fixed by this.

Clerk redirects to homepage after sign in

Add NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/dashboard to .env.local and to Vercel env vars for production.

Sign-in / sign-up page appears blank

Your Clerk publishable key is missing. NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY must be set — the NEXT_PUBLIC_ prefix is required for client-side initialization.

AI chat returns an error or doesn't respond

Check ANTHROPIC_API_KEY (or OPENAI_API_KEY) is set and AI_PROVIDER matches: "anthropic" or "openai".

Payments aren't activating subscriptions

Configure a Lemon Squeezy webhook pointing to https://yourdomain.com/api/webhooks/lemonsqueezy and set LEMONSQUEEZY_WEBHOOK_SECRET.

Credits show 0 after signing up

Your Clerk webhook is not configured. Go to Clerk Dashboard → Webhooks, add an endpoint at https://yourdomain.com/api/webhooks/clerk, subscribe to user.created and user.deleted, and set CLERK_WEBHOOK_SECRET in your env vars.

Discord role not assigned after connecting

Make sure the bot's role is higher than Pro/AI Guided roles in Server Settings → Roles. The bot needs Manage Roles permission. Also verify DISCORD_BOT_TOKEN, DISCORD_GUILD_ID, DISCORD_ROLE_PRO, and DISCORD_ROLE_AGENCY are all set correctly in your env vars.

Get Help

Stuck? We respond within 24 hours on business days.

Email

support@shipaikit.com

Response within 24 hours on business days

AI Chat

In your dashboard

Available after purchase

Discord

Private channel

Pro and AI Guided customers get private Discord access

Response time

Within 24 hours

On business days

Ready to ship?

Get ShipAIKit and launch your SaaS in hours, not weeks.

View pricing