Laydebug

Install the API

Run the Laydebug Hono API with PGlite locally or Postgres in production.

Local

pnpm install
cp apps/api/.env.example apps/api/.env
# set LAYDEBUG_PROJECT_API_KEY, BETTER_AUTH_SECRET, ALLOW_INSECURE_LOCAL_ADAPTERS=true
pnpm --filter @laydebug/api dev

PGlite is used when DATABASE_URL is unset and ALLOW_INSECURE_LOCAL_ADAPTERS=true.

Production

  1. Apply supabase/migrations/0001_init.sql.
  2. Keep bucket laydebug-state private.
  3. Set DATABASE_URL, SUPABASE_URL, SUPABASE_SECRET_KEY, BETTER_AUTH_SECRET, BETTER_AUTH_URL.
  4. Set GITHUB_ISSUE_TOKEN and GITHUB_REPO so reports open issues.
  5. Set LAYDEBUG_PROJECT_API_KEY once; the API stores only the SHA-256 hash.

v1 report auth is the hashed project API key (x-laydebug-key). Better Auth with GitHub OAuth is mounted at /api/auth so a later console can mint keys without a schema break.

Frozen procedures: health.check, reports.prepareStateUpload, reports.bug.

On this page