AI-assisted Electronic Press Kit generator for artists, labels, and producers — part of the LabelTools suite.
Live app: epk-generator.labeltools.app
Powered by Tosky Records® · Developed by MediaMatter
EPK Generator turns raw release notes, metadata, and documents into a polished press kit in two controlled AI passes: first extract and confirm facts verbatim, then generate brand-voice prose only from confirmed data. Publish a shareable web EPK and export an A4 PDF one-sheet from the same content.
| Area | Capabilities |
|---|---|
| Generation | Two-pass pipeline (Pass 1 facts → Pass 2 prose), per-field regeneration, document import (PDF/DOCX/TXT/RTF) |
| Editing | Prose editor, structured facts form, tracklist with durations, collapsible sections |
| Publishing | Public web EPK at /[orgSlug]/[epkSlug], publish/unpublish, brand kit theming |
| Localization | Dashboard UI in IT/EN/ES/FR; EPK content language detected from source material; translations IT/EN/ES/FR |
| Assets | Cover art, artist photos, press folder; signed URLs for org-scoped storage |
| Export | A4 PDF one-sheet with QR code, artist bio, release section; watermark removed after first credit purchase |
| Billing | Pay-per-use credit packs (Stripe Checkout), live balance in header |
| Tenancy | Clerk Organizations, Supabase RLS, org-scoped dashboard |
- Framework: Next.js 16 (App Router), React 19, Tailwind CSS 4
- Auth: Clerk (organizations, production domain
labeltools.app) - Database: Supabase (Postgres + Row Level Security)
- AI: Anthropic Claude (
claude-sonnet-4-6Pass 1,claude-opus-4-8Pass 2) - Payments: Stripe Checkout (one-time credit packs)
- PDF:
@react-pdf/renderer, QR viaqrcode - Email: Brevo — transactional (welcome, purchase) + retargeting automation for non-paying signups
- Hosting: Vercel (Analytics + Speed Insights)
git clone https://github.com/gignus79/EPK-Generator.git
cd EPK-Generator
npm install
cp .env.example .env.local # fill in keys (see below)
npm run devOpen http://localhost:3000.
Copy .env.example to .env.local and set values. To sync from production:
vercel env pull .env.local --environment=production| Variable | Purpose |
|---|---|
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY |
Clerk client key |
CLERK_SECRET_KEY |
Clerk server key |
NEXT_PUBLIC_SUPABASE_URL |
Supabase project URL |
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY |
Supabase anon/publishable key |
SUPABASE_SECRET_KEY |
Supabase service role (server only) |
ANTHROPIC_API_KEY |
LLM generation |
NEXT_PUBLIC_APP_URL |
Public URL for PDF QR codes and redirects |
STRIPE_SECRET_KEY |
Stripe server key (Live for production) |
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY |
Stripe publishable key |
STRIPE_WEBHOOK_SECRET |
Stripe webhook signing secret |
GENERATION_STUB_CREDITS |
Set false in production when billing is live |
Optional: CLERK_WEBHOOK_SIGNING_SECRET, BREVO_API_KEY, BREVO_RETARGETING_LIST_ID (retargeting automation), Upstash/KV vars for PDF rate limiting.
Third-party auth links Clerk JWTs to Supabase RLS. Use your live Clerk Frontend API domain (e.g. clerk.labeltools.app).
- Clerk: Connect with Supabase
- Supabase: Third-party auth → Clerk
- Optional:
npm run setup:auth(requiressupabase login)
Webhook: POST /api/webhooks/clerk — events user.created, organization.created, organization.updated, organization.deleted.
Transactional messages (welcome on signup, receipt on purchase) plus a retargeting automation for non-paying signups:
- On
user.created,upsertRetargetingContactadds the user to the Brevo listBREVO_RETARGETING_LIST_IDwithSIGNUP_DATE/EPK_USER_ID/EPK_PAID=false. - A Brevo automation on that list waits 1 day and sends the branded email (
src/lib/email/templates/retargeting.ts, shared brand-kit layout) whenEPK_PAID != true. - On
checkout.session.completed,markContactPaidsetsEPK_PAID=trueand removes the contact from the list.
Contact sync is a safe no-op while BREVO_RETARGETING_LIST_ID is unset. The email body lives in Brevo; regenerate the importable HTML with node scripts/build-retargeting-email.mjs.
npm run dev # development server
npm run build # production build
npm run lint # ESLint
npm run setup:auth # Clerk + Supabase integration helpers
npm run setup:stripe # create/update Stripe credit pack catalog (reads .env.local)
# Lifecycle email helpers (see "Lifecycle email")
node scripts/build-retargeting-email.mjs # render importable retargeting HTML → previews/
node scripts/backfill-retargeting-contacts.mjs # sync existing non-paying signups to Brevo (--dry-run)Pay-per-use credit packs — no subscription. New workspaces get 10 free starter credits (watermark on PDF until the first purchase).
| Pack | Price | Credits | Stripe lookup key |
|---|---|---|---|
| Starter | €9.99 | 50 | epk_credits_50 |
| Standard | €14.99 | 100 | epk_credits_100 |
| Studio | €39.99 | 350 | epk_credits_350 |
Credit costs: Pass 1 = 1 · Pass 2 = 2 · field regen / translation = 1.
Public pricing: /pricing. Checkout requires a signed-in Clerk user with an active organization.
-
Add
STRIPE_SECRET_KEY,NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY, andSTRIPE_WEBHOOK_SECRETto.env.localand Vercel (Production). -
Create catalog (Live mode keys):
npm run setup:stripe
Creates one product (EPK Generator Credits) with three one-time EUR prices and the lookup keys above.
-
Webhook endpoint (Live):
POST https://epk-generator.labeltools.app/api/webhooks/stripe
Required event:checkout.session.completed(adds credits to the org in Supabase). -
Set
GENERATION_STUB_CREDITS=falseon Vercel Production and redeploy. -
Stripe Customer Portal (optional): configured in Dashboard for invoice history; API at
POST /api/stripe/portal(requires prior purchase / Stripe customer id).
Low-credit alerts (≤5) and out-of-credits dialogs appear in the dashboard.
Production: Vercel, domain epk-generator.labeltools.app. Apply Supabase migrations before first deploy:
supabase db pushOptional: Upstash Redis via Vercel integration (KV_REST_API_URL, KV_REST_API_TOKEN) for PDF rate limiting (12 req/min/IP).
src/
app/ # Routes, API, dashboard, public EPK
components/ # UI (editor, public EPK, chrome, billing)
lib/
generation/ # Pass 1/2, translations, credits
billing/ # Credit packs, Stripe sync
epk/ # Content schema, language detection
pdf/ # A4 one-sheet template + render
supabase/ # Clients, types
scripts/ # setup-stripe, setup-clerk-supabase, retargeting email helpers
supabase/migrations/
Proprietary — Tosky Records® / MediaMatter. All rights reserved.