Getting started with Comedy Club
Clone the source, configure PostgreSQL and secrets, apply migrations, create the first user, run setup, and sell a ticket.
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 API 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 installConfigure .env
DATABASE_URL=postgresql://user:password@localhost:5432/openfront_comedy_club
SESSION_SECRET=replace-with-48-or-more-random-characters
PUBLIC_SIGNUPS_ALLOWED=false
# Card payments
NEXT_PUBLIC_STRIPE_KEY=pk_...
STRIPE_SECRET_KEY=sk_...
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=| Variable | Notes |
|---|---|
DATABASE_URL, SESSION_SECRET | Required. Generate the secret with openssl rand -hex 32. |
NEXT_PUBLIC_STRIPE_KEY, STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET | Stripe card payments and the signed webhook. |
PUBLIC_SIGNUPS_ALLOWED | The dashboard sign-up page is open only when this is true. |
SMTP_*, SMTP_STORE_LINK | Password-reset email and links. |
OPENROUTER_API_KEY | Optional dashboard AI chat. |
Apply migrations and start
npm run devnpm 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.
Sell a ticket
Open the storefront at /, choose a show, hold tickets, and pay by card. The confirmation page shows the order number and ticket codes. Refund it from Orders in the dashboard.
Hold expiry
No cron job is needed. Listing or opening a show releases its expired holds, then settles pending payments whose hold ran out more than five minutes ago. Stripe decides the outcome: a confirmed payment becomes tickets, a failed or cancelled one frees the seats. The expireHolds(showId) mutation runs the same release on demand.
Tests
npm test