Getting started with Comedy Club

Clone the source, configure PostgreSQL and secrets, apply migrations, create the first user, run setup, and take a test payment.

The hosted app is at comedy-club.openship.org if you want to look before installing anything.

Requirements

  • Node.js 20 or later.
  • npm.
  • A PostgreSQL database you are allowed to migrate.
  • Stripe test keys if you want to take card payments.
  • An SMTP relay if you want password-reset email.

Clone and install

git clone https://github.com/openshiporg/openfront-comedy-club.git
cd openfront-comedy-club
npm install

Configure .env

DATABASE_URL=postgresql://user:password@localhost:5432/openfront_comedy_club
SESSION_SECRET=replace-with-48-or-more-random-characters
PUBLIC_SIGNUPS_ALLOWED=false
CRON_SECRET=another-random-value

# Card payments (test keys for development)
NEXT_PUBLIC_STRIPE_KEY=pk_test_...
STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...

# Optional
STOREFRONT_URL=http://localhost:3000
SMTP_HOST=
SMTP_PORT=
SMTP_USER=
SMTP_PASSWORD=
SMTP_FROM=
SMTP_STORE_LINK=http://localhost:3000
OPENROUTER_API_KEY=
VariableNotes
DATABASE_URL, SESSION_SECRETRequired. Generate the secret with openssl rand -hex 32.
CRON_SECRETBearer token for POST /api/cron/expire-holds.
NEXT_PUBLIC_STRIPE_KEY, STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRETStripe card payments and the signed webhook.
PUBLIC_SIGNUPS_ALLOWEDThe dashboard sign-up page is open only when this is true.
SMTP_*, SMTP_STORE_LINKPassword-reset email and links.
OPENROUTER_API_KEYOptional dashboard AI chat.

Apply migrations and start

npm run dev

npm run dev builds the Keystone schema, applies the migrations in migrations/ with prisma migrate deploy, and starts Next.js.

Create the first user

Open /dashboard/init and create the first admin. After that, the init page is closed.

Run setup

Open the setup card at the bottom of the dashboard sidebar and choose Get started.

  • Complete adds The Laugh Track with two rooms, four sections, 32 tables, 12 comedians, a 20-item menu, four weekly show templates, two promo codes, Stripe and manual payment providers, a headliner run, upcoming shows and recent history.
  • Basic adds one room, one template and two shows.

Setup is onboarding only. It records what it saved; review prices, fees and roles before you sell tickets.

Take a test payment

Open the storefront at /, choose a show, hold tickets, and pay with Stripe's test card 4242 4242 4242 4242. The confirmation page shows the order number and ticket codes. Refund it from Orders in the dashboard.

Hold sweeper

Call this every minute in production. It releases expired holds and settles pending payments the provider has since confirmed or failed.

curl -X POST https://your-host/api/cron/expire-holds -H "Authorization: Bearer $CRON_SECRET"

Tests

npm test

On this page