2 env variables are missing from .env.example: NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY_LIVE, STRIPE_SECRET_KEY_LIVE.
Show evidence (2)
↳ NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY_LIVE → missing from committed env template
↳ STRIPE_SECRET_KEY_LIVE → missing from committed env template
Suggested fix: Document NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY_LIVE= + STRIPE_SECRET_KEY_LIVE= in .env.example and verify the values in Vercel. Repository files cannot prove whether hosting variables are set.
5 tables have no Data API grants in the migrations and will answer 42501 once the automatic grants are gone.
Why it works locally: Locally you only test as yourself. In production every visitor holds the public anon key, and server code shares one process across all of them, so only server-only keys and row level security protect your data.
Show evidence (5)
↳ supabase/migrations/20230530034630_init.sql:5 → public.users is created without a GRANT to anon, authenticated or service_role; Supabase is removing the automatic grants on new tables, and where that default applies the Data API answers 42501 permission denied
↳ supabase/migrations/20230530034630_init.sql:38 → public.customers is created without a GRANT to anon, authenticated or service_role; Supabase is removing the automatic grants on new tables, and where that default applies the Data API answers 42501 permission denied
↳ supabase/migrations/20230530034630_init.sql:51 → public.products is created without a GRANT to anon, authenticated or service_role; Supabase is removing the automatic grants on new tables, and where that default applies the Data API answers 42501 permission denied
↳ supabase/migrations/20230530034630_init.sql:74 → public.prices is created without a GRANT to anon, authenticated or service_role; Supabase is removing the automatic grants on new tables, and where that default applies the Data API answers 42501 permission denied
↳ supabase/migrations/20230530034630_init.sql:106 → public.subscriptions is created without a GRANT to anon, authenticated or service_role; Supabase is removing the automatic grants on new tables, and where that default applies the Data API answers 42501 permission denied
Suggested fix: Add a migration that grants only what each role needs, for example:
grant select on table public.users to anon;
grant select, insert, update, delete on table public.users to authenticated;
grant select, insert, update, delete on table public.users to service_role;
Keep row level security on: grants decide which roles reach the table, policies decide which rows.
32 steps from this repo to your first paying customer
Built from your code: the exact environment variables, payments, data, sign-in, legal pages, monitoring and launch day. In order, ready to follow.
1. Make the deploy pass
Nothing else matters until Vercel builds it.
Payment and production safety
Review runtime behavior, payment fulfillment and production configuration independently.
Environment variables
Document NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY_LIVE= + STRIPE_SECRET_KEY_LIVE= in .env.example and verify the values in Vercel. Repository files cannot prove whether hosting variables are set.
Supabase server/client boundaries
Add a migration that grants only what each role needs, for example:
grant select on table public.users to anon;
grant select, insert, update, delete on table public.users to authenticated;
grant select, insert, update, delete on table public.users to service_role;
Keep row level security on: grants decide which roles reach the table, policies decide which rows.
🔒
2. Set 10 environment variables in Vercel
Your code reads these. If one is missing in production, that feature breaks only after you launch. 4 steps
🔒
3. Take real payments with Stripe
Test-mode payments never reach your bank. Switching to live is the step most first launches get wrong. 4 steps
🔒
4. Protect your data
Leaked tables from missing RLS are the most common way vibe-coded apps end up in the news. 4 steps
🔒
5. Make sign-in work in production (Supabase Auth)
Sign-in that works on localhost often fails on the real domain because of callback URLs. 3 steps
🔒
6. Legal and trust
Missing pages cost sales and can get a payment account paused. 3 steps
🔒
7. Know when it breaks
On launch day you are the only support team. 3 steps
🔒
8. Polish before you share it
First impressions come from the link preview, the 404 page and how errors look. 5 steps
🔒
9. Launch day
Where and how to post so people actually try it. 3 steps
Unlock the whole plan, the AI prompt and the checklist
Included in the 24-hour pass: unlimited scans, private repos and the launch plan for every repo you scan. One-time payment, nothing renews. Reload this page after paying.
One link follows the latest public scan of the default branch, with its date and commit. Views never start scans.
Open repo status →[](https://deploydoctor.nyttolabs.com/score/vercel/nextjs-subscription-payments)
Scan button for your README
For templates and starters. The link points at this repository, so someone who forks it changes the owner/repo in the link to scan their own copy before the first deploy.
[](https://deploydoctor.nyttolabs.com/vercel/nextjs-subscription-payments)