Nextbase Docs
Nextbase Docs
HomeBlogWelcome to Nextbase v5!Choose your starterGetting startedLocal Supabase per agent
Next.js + NeonInstallationEnvironment variablesAuthenticationAgent connectionsProject structureDeployment
AuthenticationWorkspaces and the admin area
Building with agentsEmails with Resend
TroubleshootingNextbase v5
The 8 starter kitsNext.js + Neon

Next.js + Neon

Overview of the Next.js + Neon starter: stack, what ships out of the box, prerequisites and where to go next.

This kit uses Next.js App Router, Neon Postgres, Drizzle and Better Auth. You get the account, workspace and project foundation, a separately deployed admin app, and separate agent connections for users and application administrators.

Open the live demo · Repository

The repository name still says PlanetScale

The repository is nextjs-planetscale-starter because the kit started on PlanetScale. The current main branch is a Neon Postgres implementation: Drizzle with node-postgres, a Postgres 17 container for local work, and Postgres migrations in apps/database/drizzle-postgres/. The old MySQL migrations in apps/database/drizzle/ are kept for reference only and are never applied. You don't need a PlanetScale account.

The stack

LayerWhat the kit uses
FrontendNext.js 16 App Router with React 19, Tailwind CSS 4 and shadcn/ui
Appsapps/web for customers on port 3000 and apps/admin for administrators on port 3001, sharing one database and the web app's server modules
DatabaseNeon Postgres in production, Postgres 17 in Docker locally, Drizzle ORM with node-postgres
AuthenticationBetter Auth with the admin, organization, magic link, API key, one-time token and Stripe plugins
StorageAny S3-compatible bucket; MinIO locally
RealtimeCentrifugo fed by a transactional outbox and a dispatcher process
EmailReact Email templates sent through SMTP (Mailpit locally) or Resend
Hosting used by the demoVercel for the website and the admin app (two projects), Neon for the database

What you get out of the box

  • Accounts with email and password, email verification, password reset, magic links, email change and account deletion.
  • Workspaces built on Better Auth organizations, with owner, admin, member and readonly roles, invitations and member management.
  • Projects inside a workspace, with comments and notifications.
  • An onboarding flow at /onboarding and a user area at /user/settings, including security settings and API keys under /user/settings/developer.
  • A separate admin app in apps/admin with its own sign-in page, an admin panel at /app-admin (users, workspaces, a marketing CMS for blog, authors, tags and changelog, payment gateway views and settings) and moderation views for feedback and the roadmap. Admins can ban users, change application roles, create users, send login links and impersonate customers through an audited handoff to the web app.
  • A public feedback board and roadmap, plus marketing pages, blog and changelog in the web app.
  • A User MCP at /mcp/user on the web app and an Admin MCP at /mcp/admin on the admin app, both read-only, with OAuth consent built in. See agent connections.
  • Optional integrations that render a disabled state until configured: Stripe billing, OpenAI chat and image generation, PostHog, Google Analytics, Sentry and Vercel Analytics.
  • Audit logs and outbox events written in the same transaction as every mutation.
  • Shared instructions and skills for AI coding tools (Claude Code, Codex, Cursor and others), generated from AGENTS.md and .agents/.

Authorization lives in server code. There is no row-level security for application data in this kit; every query and action checks the signed-in actor and their workspace membership.

Prerequisites

  • Node.js 24 or newer. The web and admin apps declare "node": ">=24.0.0" and CI runs on Node 24.
  • pnpm 10.33.0, declared in the root package.json packageManager field. Run corepack enable and let Corepack pick it.
  • Docker with Compose. The local stack starts Postgres, MinIO, Mailpit, Valkey and Centrifugo from apps/database/docker-compose.yml.
  • Access to the GitHub repository with the account that has your license.
  • For production: a Neon account, a Vercel account (two projects, one per app), an S3-compatible bucket and a Resend account (or another SMTP sender). Stripe is optional.

Next steps

  1. Installation: clone, start the local stack and the two apps, and sign in with a seeded account.
  2. Environment variables: every variable in .env.example and apps/admin/.env.local.example and what it does.
  3. Authentication: how Better Auth is configured and how admin access works across the two apps.
  4. Agent connections: the User and Admin MCP servers in this kit.
  5. Project structure: the monorepo and where to make changes.
  6. Deployment: Neon, migrations and the two Vercel projects.

For the shared concepts, read getting started and workspaces and the admin area.

Deployment

Deploy the TanStack + Convex starter: a Convex production deployment for the backend and two Vercel projects for the web app and the admin app.

Installation

Clone the Next.js + Neon starter, start the local Postgres stack with Docker, run the web and admin apps, seed and sign in.

On this page

The stackWhat you get out of the boxPrerequisitesNext steps