Skip to content

vvitovec/landing-gen

Repository files navigation

Landing Gen

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.

Stack

  • 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

Setup

Install dependencies:

npm install

Create a local environment file:

cp .env.example .env.local

Fill in the required Supabase, Stripe, Resend, OpenAI, and Vercel values.

Run the development server:

npm run dev

Open http://localhost:3000.

Scripts

  • 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.

Architecture

  • src/app contains App Router pages and API routes.
  • src/components contains reusable UI, navigation, landing-page rendering, and editor components.
  • src/lib contains Supabase clients, billing logic, page models, routing helpers, storage helpers, and service integrations.
  • supabase/migrations contains database schema, RPC, and RLS migrations.
  • docs contains focused setup notes for Stripe and custom domains.

Environment

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.

Deployment Checks

After deploying, verify:

  1. /api/health returns 200.
  2. /, /pricing, and /login return 200.
  3. /app redirects anonymous users to login.
  4. Stripe checkout and webhook updates create or update subscriptions.
  5. Published pages load from /p/[slug].
  6. Custom domains resolve and verify in the editor.

The routing smoke test can be run with:

npm run check:routing

Optional host overrides:

CUSTOM_DOMAIN_URL=https://landing.vvitovec.com \
VERCEL_APP_URL=https://landing-gen-umber.vercel.app \
npm run check:routing

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors