- Next.js application with TypeScript
- User authentication powered by Neon Auth
- Database migrations with Drizzle ORM
- Ready-to-deploy configuration for Vercel, Netlify, and Render
- Neon account
- Node.js 18+ installed locally
Clone this demonstration application and install the dependencies:
git clone https://github.com/neondatabase-labs/neon-auth-demo-app.git
cd neon-auth-demo-app
npm install
- Create or open a Neon project
- Go to Neon Auth → Setup instructions
- Click Set up Auth to generate your configuration
- Copy these environment variables to
.env.local
:NEXT_PUBLIC_STACK_PROJECT_ID
NEXT_PUBLIC_STACK_PUBLISHABLE_CLIENT_KEY
STACK_SECRET_SERVER_KEY
DATABASE_URL
-
Set up the database:
npm run drizzle:generate # Generates migrations npm run drizzle:migrate # Applies migrations
-
Start the development server:
npm run dev
-
Visit
http://localhost:3000
to see the application running (check your console for the actual port if 3000 is in use).
Configure production settings in the Neon Console's Auth Configuration tab, such as domain restrictions.
Contributions are welcome! Please feel free to submit a Pull Request.