
A minimal template for building full-stack React applications using Next.js, Vercel, and Neon.
Click the "Deploy" button to clone this repo, create a new Vercel project, setup the Neon integration, and provision a new Neon database:
Once the process is complete, you can clone the newly created GitHub repository and start making changes locally.
View live demo: vercel-marketplace-neon.vercel.app
Install the dependencies:
npm install
You can use the package manager of your choice. For example, Vercel also supports bun install out of the box.
Get your database URLcp .env.example .env
Run vercel env pull to fetch the environment variables from your Vercel project.
Alternatively, obtain the database connection string from the Connection Details widget on the Neon Dashboard and add it to the .env file:
Start the development serverDATABASE_URL=<postgres://user:pass@host/db>
npm run dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
This project includes the Neon MCP server and neon-postgres agent skill for AI-assisted development with Neon Postgres. Both are configured for Cursor, Claude Code and VS Code.
This project uses shadcn/ui for building accessible and customizable UI components.
Shadcn/ui is configured in components.json. The project uses:
To add new shadcn/ui components:
npx shadcn@latest add [component-name]
For example:
npx shadcn@latest add cardnpx shadcn@latest add dialog
The project includes a theme provider and selector:
src/components/themes/provider.tsxsrc/components/themes/selector.tsxThemes are managed using next-themes and support light, dark, and system preferences.
Button - src/components/ui/button.tsxDropdownMenu - src/components/ui/dropdown-menu.tsxThis project uses Drizzle ORM for type-safe database operations with PostgreSQL.
Drizzle is configured in drizzle.config.ts. The database client is set up in src/lib/db/client.ts.
Database schemas are defined in src/lib/db/schema.ts. Currently includes an example users table that can be customized or removed based on your needs.
npm run db:generate - Generate migration files from your schemanpm run db:migrate - Apply migrations to your databasenpm run db:studio - Open Drizzle Studio (visual database browser)import { db } from "@/lib/db/client";import { users } from "@/lib/db/schema";import { eq } from "drizzle-orm";// Select all usersconst allUsers = await db.select().from(users);// Insert a userawait db.insert(users).values({id: "123",name: "John Doe",email: "john@example.com",});// Update a userawait db.update(users).set({ name: "Jane Doe" }).where(eq(users.id, "123"));
src/lib/db/schema.tsnpm run db:generatedrizzle/ foldernpm run db:migrateTo learn more about Neon, check out the Neon documentation:
To learn more about Next.js, take a look at the following resources:
Commit and push your code changes to your GitHub repository to automatically trigger a new deployment.