Landing Gen is a Next.js application for creating, publishing, and managing AI-generated landing pages. It includes authenticated workspaces, Stripe subscriptions, lead capture, image uploads, and optional custom-domain publishing.
- Next.js App Router
- React
- Supabase Auth, Database, and Storage
- Stripe Checkout, Customer Portal, and webhooks
- Resend email delivery
- OpenAI copy generation
- Vercel deployment and project-domain management
Install dependencies:
npm installCreate a local environment file:
cp .env.example .env.localFill in the required Supabase, Stripe, Resend, OpenAI, and Vercel values.
Run the development server:
npm run devOpen http://localhost:3000.
npm run dev- start the local dev server.npm run build- create a production build.npm run start- run the production build.npm run lint- run ESLint.npm run typecheck- run TypeScript checks.npm run test:ci- run the Vitest suite once.npm run check:routing- smoke-test production host routing.
src/appcontains App Router pages and API routes.src/componentscontains reusable UI, navigation, landing-page rendering, and editor components.src/libcontains Supabase clients, billing logic, page models, routing helpers, storage helpers, and service integrations.supabase/migrationscontains database schema, RPC, and RLS migrations.docscontains focused setup notes for Stripe and custom domains.
Use .env.example as the source of truth for required variables. Production deployments must provide:
- Supabase URL, anon key, and service role key
- Stripe secret key, webhook secret, and price IDs
- Resend API key and sender address
- OpenAI API key
- Vercel token and project identifiers for custom-domain management
APP_DOMAIN_ALIASES is optional. Use it for first-party hostnames that should serve the app homepage instead of being resolved as customer landing-page domains.
After deploying, verify:
/api/healthreturns200./,/pricing, and/loginreturn200./appredirects anonymous users to login.- Stripe checkout and webhook updates create or update
subscriptions. - Published pages load from
/p/[slug]. - Custom domains resolve and verify in the editor.
The routing smoke test can be run with:
npm run check:routingOptional host overrides:
CUSTOM_DOMAIN_URL=https://landing.vvitovec.com \
VERCEL_APP_URL=https://landing-gen-umber.vercel.app \
npm run check:routing