Skip to content

Repository files navigation

Playcall app screenshot

Most call scorers grade what you said. Playcall grades whether what you said was right for who you were talking to.

Demo · Setup · Deploy · Security

Stack

  • Framework: Next.js 16 (App Router) + React 19
  • Database / Auth: Supabase (Postgres, Auth, RLS, Edge Functions)
  • AI: Vercel AI SDK — OpenAI, Anthropic, and 15 other providers; BYOK per workspace
  • Document parsing: LlamaParse (PDF, DOCX, PPTX, images, 130+ formats)
  • Audio transcription: OpenAI Whisper
  • File uploads: Vercel Blob
  • Enrichment: Exa or TheHog (buyer/company context)
  • UI: Tailwind CSS + shadcn/ui

Prerequisites

  • Node.js 20+ and pnpm
  • Supabase account
  • Vercel account
  • OpenAI API key (scoring + audio transcription)
  • LlamaParse API key (free tier: 10k credits/month)
  • Enrichment key — Exa (EXA_API_KEY) or TheHog (THEHOG_ACCESS_KEY + THEHOG_SECRET_KEY)

Setup

1. Clone and install

git clone https://github.com/Dphenomenal101/playcall.git
cd playcall
pnpm install

2. Create a Supabase project

Go to supabase.com/dashboardNew project. Once provisioned:

  • Authentication → URL Configuration: set Site URL and add your domain to Redirect URLs (e.g. https://yourdomain.com/auth)
  • Authentication → Email Settings: enable a custom SMTP provider — Supabase's built-in sender is rate-limited on the free tier

3. Apply the database schema

# Install the Supabase CLI if you don't have it: https://supabase.com/docs/guides/cli
supabase login
supabase link --project-ref <your-project-ref>   # Project Settings → General
supabase db push

4. Deploy the Edge Function

supabase functions deploy process-job

Set the secrets the function needs. WORKSPACE_SECRETS_ENCRYPTION_KEY must be the same value you set in your app environment — the Edge Function uses it to decrypt BYOK credentials:

supabase secrets set WORKSPACE_SECRETS_ENCRYPTION_KEY=your_key
supabase secrets set OPENAI_API_KEY=your_key
# Optional
supabase secrets set ANTHROPIC_API_KEY=your_key
supabase secrets set EXA_API_KEY=your_key
# or TheHog:
supabase secrets set THEHOG_ACCESS_KEY=your_key
supabase secrets set THEHOG_SECRET_KEY=your_key

5. Set up Vercel Blob

  1. Create a Vercel project for this repo at vercel.com/new
  2. Storage → Create → Blob → connect to project
  3. Pull env vars locally — this writes BLOB_READ_WRITE_TOKEN to .env.local:
vercel link
vercel env pull .env.local

6. Configure environment variables

.env.local now has your Blob token. Add the remaining required values — use .env.example as the reference for what's needed and why:

Supabase — from Project Settings → API:

  • NEXT_PUBLIC_SUPABASE_URL
  • NEXT_PUBLIC_SUPABASE_ANON_KEY
  • SUPABASE_SERVICE_ROLE_KEY

LlamaParse — from cloud.llamaindex.ai:

  • LLAMA_CLOUD_API_KEY — your API key
  • LLAMA_CLOUD_WEBHOOK_SECRET — generate with openssl rand -hex 32
  • LLAMA_CLOUD_WEBHOOK_URL — set to https://yourdomain.com/api/webhooks/llamaparse (or your ngrok URL for local dev)

App URL:

  • NEXT_PUBLIC_APP_URL — your app's public base URL. Set to http://localhost:3000 for local dev, and your deployed domain (e.g. https://yourdomain.com) in production. Used for invite links and the LlamaParse webhook URL.

Other secrets — generate locally:

openssl rand -base64 32   # → WORKSPACE_SECRETS_ENCRYPTION_KEY (must match step 4)
openssl rand -hex 16      # → CRON_SECRET

7. Run locally

pnpm dev

Open localhost:3000 and complete the manager onboarding flow.

Deploying to production

Deploy with Vercel

  1. Click the button above (or import your repo at vercel.com/new)
  2. Storage → Create → Blob → connect to your project (BLOB_READ_WRITE_TOKEN is injected automatically)
  3. Project Settings → Environment Variables — add everything from .env.local, but set NEXT_PUBLIC_APP_URL to your deployed domain (not http://localhost:3000)
  4. Push to your default branch — Vercel deploys automatically and activates the daily keep-alive cron that prevents free-tier Supabase projects from pausing

Project structure

app/
  manager/        Manager dashboard, onboarding, playbooks, settings
  rep/            Rep dashboard, call upload, scorecard
  api/            Route handlers, webhooks, cron
lib/
  data/           Supabase read/write logic
  ai/             Provider registry, BYOK config resolution
  enrichment/     Exa and TheHog enrichment providers
  integrations/   LlamaParse and third-party API clients
  extraction/     Whisper audio transcription + plain-text file reading
  security/       Credential encryption at rest
  jobs/           Async job dispatch
components/       Shared UI components
supabase/
  migrations/     Database schema
  functions/      Edge Functions (process-job)

Contributing

Contributions are welcome.

  1. Fork the repo and create a feature branch.
  2. Run the app locally and verify your change in context.
  3. Keep changes focused and include any docs updates that make the behavior clearer.
  4. Open a pull request with a concise summary of what changed and why.

If your change affects setup, deployment, or security assumptions, update README.md and SECURITY.md in the same PR.

For security issues, do not open a public issue. Follow the reporting guidance in SECURITY.md.

License

MIT

About

Playcall is the open-source alternative to Gong, built for AI-native GTM teams. Score every call against your playbook and the buyer context your rep was talking to. No vendor lock-in, $30K/year contracts, or 10+ baked-in features your team never touches.

Topics

Resources

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages