Skip to content

A simple next.js starter project including better-auth, shadcn/ui and data persistence via sqlite and drizzle-orm.

Notifications You must be signed in to change notification settings

glenntws/nextjs-betterauth-boilerplate

Repository files navigation

Simple full-stack starter

Used deps:

  • Main framework: Next.js
  • DB: SQLite
  • ORM: Drizzle
  • Styling: Tailwind v4
  • Auth: better-auth
  • Components: shadcn/ui (radix-ui based)

Getting Started

(0. Install pnpm)

See pnpm Installation Guide.

1. Install all dependencies

pnpm i

You do this whenever new dependencies should get installed

2. Initialize the database

pnpm db:push

This command creates a (.gitignore'd) SQLite DB file in src/db/localdb.sqlite.

You also use this command later to push the changes to the schema into the database!

3. Running the development server

pnpm dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying src/app/page.tsx. The page auto-updates as you edit the file.

This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.

Dev agent compatibility

This project defines a AGENTS.md file for context and rules for coding agents. Feel free to use it as additional info when asking other external chat tools as well!

Recommended dependencies

  • If you build tables, it's highly recommended to store pagination, sorting and filtering state in search params. Use nuqs for that. Use TanStack Table for base table components.
  • If you really need client-side data fetching, use SWR or TanStack Query instead of fetch calls in "useEffect" hooks.
  • If the manual validation and middleware boilerplate in your server actions get's too much, build your server actions with next-safe-action

Recommended MCPs

If you use tooling that allows integration of MCP servers, I recommend the following ones:

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

About

A simple next.js starter project including better-auth, shadcn/ui and data persistence via sqlite and drizzle-orm.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published