Production-oriented Next.js App Router project for NexoraNeo PD sessions, bookings, Stripe payments, attendance, certificates and public certificate verification.
- Next.js App Router, TypeScript, Tailwind CSS
- shadcn-style UI components
- Zod validation
- InsForge auth, Postgres, storage and CLI migrations
- Stripe Checkout and webhooks
- PDF certificate generation with QR verification
Copy .env.example to .env.local and fill:
NEXT_PUBLIC_APP_URL=http://localhost:3000
NEXT_PUBLIC_INSFORGE_URL=https://ji3ny662.us-east.insforge.app
NEXT_PUBLIC_INSFORGE_ANON_KEY=$(npx @insforge/cli secrets get ANON_KEY)
INSFORGE_ANON_KEY=same-anon-key
INSFORGE_API_KEY=server-only-admin-api-key-from-.insforge/project.json
STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...
NEXORA_EMAIL_REPLY_TO=hello@yourdomain.com
RESEND_API_KEY=re_...
RESEND_FROM_EMAIL=bookings@yourdomain.com
NEXORA_VERIFICATION_FROM_EMAIL="NexoraNeo <noreply@yourdomain.com>"
NEXORA_BOOKINGS_FROM_EMAIL="NexoraNeo Bookings <bookings@yourdomain.com>"
NEXORA_CONTACT_TO_EMAIL=info@yourdomain.comNever expose INSFORGE_API_KEY to the browser.
For the live production deployment, set:
NEXT_PUBLIC_APP_URL=https://nexoraneo.comVerify the linked project:
npx @insforge/cli whoami
npx @insforge/cli current
npx @insforge/cli metadata --jsonApply migrations:
npx @insforge/cli db migrations list
npx @insforge/cli db migrations up --allCreate storage buckets:
npx @insforge/cli storage create-bucket certificates --privateSeed NexoraNeo content:
npm install
npm run seedThis InsForge project currently reports managed InsForge Payments as unavailable, so the app uses server-side Stripe routes and stores payment state in app-owned InsForge Postgres tables.
Configure a Stripe webhook to:
https://nexoraneo.com/api/stripe/webhook
Listen for:
checkout.session.completedpayment_intent.succeededpayment_intent.payment_failedcharge.refunded
Booking confirmation happens only in the webhook. Success redirect pages never mark bookings paid.
- Sign up through
/signup. - In InsForge SQL, promote the profile to the single full-access admin account:
UPDATE public.profiles
SET role = 'admin'
WHERE email = 'you@example.com';Use migrations for schema changes. The one-off promotion can be run with:
npx @insforge/cli db query "UPDATE public.profiles SET role = 'admin' WHERE email = 'you@example.com';"npm install
npm run devOpen http://localhost:3000.
If InsForge deployment hosting is enabled for the project:
npx @insforge/cli deployments deploy .Production deployment env must include:
NEXT_PUBLIC_APP_URL=https://nexoraneo.comOtherwise deploy to any Next.js-compatible host and keep InsForge as the backend.
- Sign up and login create a
profilesrow. - Browse
/sessions, open a session detail page, book and reach Stripe Checkout. - Stripe webhook marks booking
confirmedand writespayments.raw_event. - Booking confirmation emails send from
NEXORA_BOOKINGS_FROM_EMAILwith a PDF receipt attachment. - Account email changes stay pending until the user clicks the verification link sent from
NEXORA_VERIFICATION_FROM_EMAIL. /contactsends enquiries toNEXORA_CONTACT_TO_EMAIL.- Admin/facilitator marks attendance through
/api/admin/attendance. - Admin completes a session instance and calls
/api/certificates/issue. - Certificate PDF uploads to InsForge storage.
- User sees certificate in dashboard.
/certificates/verify/[code]shows only safe public certificate data.- Admin/facilitator routes redirect unauthenticated users and reject insufficient roles server-side.