Saved report · free to view

← Scan another repository

DEPLOYMENT REPORT

vercel/nextjs-subscription-payments

OVERALL RESULT2 items to review1 checks could not be fully verified
YOUR NEXT MOVE · NEEDS REVIEW1 / 6

Environment variables

.env.example

A complete file is suggested. Review the finding before changing anything.

Why this first?

Confirmed source findings come before review items, using this scan only. No code is changed automatically. Rescan after making changes.

What was checked? · 4 categories

Scanned: Next.js, Deployment, Env, Supabase

Ignored: Prisma/DB

Since the previous scan

Nothing changed since then.

ENV

Review
CHECK 07Worth a look

Environment variables

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.
Review suggested .env.example
Complete .env.example
SUPABASE_AUTH_EXTERNAL_GITHUB_REDIRECT_URI="http://127.0.0.1:54321/auth/v1/callback"
SUPABASE_AUTH_EXTERNAL_GITHUB_CLIENT_ID=
SUPABASE_AUTH_EXTERNAL_GITHUB_SECRET=
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY_LIVE=
STRIPE_SECRET_KEY_LIVE=

SUPABASE

Review
CHECK 09Worth a look

Supabase server/client boundaries

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.

Scan your private code for $2.

A 24-hour pass for public and private repository scans. Private code requires your GitHub authorization. One-time payment, no subscription, nothing renews.

BEYOND THE ERRORS

7 improvements for this repo

Not errors: things the scan can see are missing that make this app better on Vercel. Free in every report.

  1. Add an error page

    Without one, a runtime error shows visitors the default Next.js crash screen.

    Create app/error.tsx with a short message and a retry button.

    Documentation ↗
  2. Catch this on every pull request

    The same checks can fail a pull request before Vercel builds it, free on public repositories.

    Add .github/workflows/deploydoctor.yml with the DeployDoctor Action, three lines of YAML.

    Add the Action →
  3. Add a custom 404 page

    A custom 404 keeps your navigation and sends visitors on instead of a blank default page.

    Create app/not-found.tsx with a link back home.

    Documentation ↗
  4. Send security headers

    No headers such as X-Frame-Options, HSTS or a Content-Security-Policy are set in next.config, vercel.json or proxy/middleware.

    Add async headers() to next.config.ts, starting with X-Frame-Options, Referrer-Policy and Strict-Transport-Security.

    Documentation ↗
Show 3 more
  1. Add a sitemap

    A sitemap helps Google find and index every page sooner.

    Create app/sitemap.ts that lists your public pages.

    Documentation ↗
  2. Pin your Node version

    Without engines.node, Vercel builds with the project's default version, which can differ from your machine.

    Add "engines": { "node": "22.x" } to package.json, matching the version you run locally.

    Documentation ↗
  3. Show the status in your README

    A badge tells visitors and contributors your deploy is checked, and links to the latest report.

    Copy the badge further down into README.md.

    Copy the badge →
Passed checks and scan coverage (7)
Launch checklist and scan limitations

Review the findings and coverage before launch. Runtime behavior and checkout were not tested.

Return to findings and available fixes ↑

Manual verification · not completed

Not verified

Checks performed

Did DeployDoctor solve it?

Come back after your next deploy and tell us. One click, no account.

Your next step

Exact files and steps are free. Copy them and apply the changes in your repository.

Get notified about new findings

Know when your next deploy is at risk

DeployDoctor rescans vercel/nextjs-subscription-payments once a day and emails you when something new breaks. Free, no account.

One email only when a scan finds something new, and every email has an unsubscribe link.

Share report or add to README

README badge

Shows this report's result in your README. It updates when you scan again and paste the new link.

DeployDoctor: 2 items to review[![DeployDoctor](https://deploydoctor.nyttolabs.com/r/838c8363-7089-40b3-949e-7f1dcdd22f20/badge)](https://deploydoctor.nyttolabs.com/r/838c8363-7089-40b3-949e-7f1dcdd22f20)

Latest repo status in your README

One link follows the latest public scan of the default branch, with its date and commit. Views never start scans.

Open repo status →[![DeployDoctor repo status](https://deploydoctor.nyttolabs.com/badge/vercel/nextjs-subscription-payments.svg)](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.

Scan with DeployDoctor[![Scan with DeployDoctor](https://deploydoctor.nyttolabs.com/badge.svg)](https://deploydoctor.nyttolabs.com/vercel/nextjs-subscription-payments)