Start with these two checks
Before you debug further, run:Common issues
Auth pages or the dashboard do not work
Auth pages or the dashboard do not work
Check
NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY.If auth is intentionally not part of the product yet, set:Billing or admin always shows a fallback state
Billing or admin always shows a fallback state
This usually means
SUPABASE_SERVICE_ROLE_KEY is missing. Billing, webhooks, signed avatar URLs, audit logs, admin reporting, and persistent rate limits all depend on it.Checkout fails while creating a payment
Checkout fails while creating a payment
Check:
NEXT_PUBLIC_ENABLE_PAYMENTSPAYMENT_PROVIDER- your Midtrans or Doku credentials
- the
paymentsandsubscriptionsmigrations
The payment succeeds at the gateway but the subscription never activates
The payment succeeds at the gateway but the subscription never activates
This usually means the webhook never arrived, the webhook URL is wrong, or signature verification failed. Check the correct webhook route and confirm the production domain is set correctly.
The contact form does not send email
The contact form does not send email
Check
RESEND_API_KEY, EMAIL_FROM, and optionally CONTACT_EMAIL. Make sure the sender domain is verified in Resend.AI routes return 503 or 429
AI routes return 503 or 429
503 usually means the provider is not configured. 429 usually means a usage limit or request rate limit has been reached.Admin access does not appear
Admin access does not appear
Make sure the user exists in
user_roles with the admin role. ADMIN_EMAILS only helps with the initial bootstrap.Playwright fails the first time you run it
Playwright fails the first time you run it
Install the browser first:
AI prompt you can use right away
Fast diagnosis checklist
| Symptom | First thing to check |
|---|---|
| Many features show disabled or fallback states | .env.local and npm run env:check |
| Login redirects behave strangely | Supabase redirect URLs and auth callback configuration |
| Admin data is empty | Service role env and admin role assignment |
| Payments never finalize | Webhook URL and signature verification |
| Avatar uploads fail | Storage migration and service role env |
| Contact form fails | Resend key and verified sender domain |
When to check the database directly
Look at the database directly if the issue involves:- user roles,
- subscription status,
- payment records,
- audit trail,
- webhook event logs.
user_roles, subscriptions, payments, audit_logs, and webhook_events.
When to inspect code
Go into the code if:- env values look correct but the behavior is still wrong,
- you recently changed
config/*, - you edited a route handler or dashboard component,
- you added a new integration on top of the existing patterns.
If you are doing a large rebrand, some issues that look like bugs are really just copy, navigation, or feature-toggle mismatches that have not been aligned yet.