A modern, minimal authentication starter for developers, built with Next.js, TypeScript, Prisma, and Tailwind CSS.
Howdy! This starter kit is designed for those who want a clean, extensible foundation for building modern, full-stack web applications with authentication using Next.js 15, TypeScript, Prisma, and Tailwind CSS.
- Next.js 15 with App Router
- TypeScript for type safety
- Prisma ORM with PostgreSQL
- Tailwind CSS for styling
- NextAuth.js for authentication (email & password)
- Heroicons for modern SVG icons
- bcrypt (via bcryptjs) for secure password hashing
- ESLint and Prettier for code quality
- Unit & Component Testing with Jest & Testing Library
- End-to-End (E2E) Testing with Playwright
- User registration and login flows
- Protected dashboard for authenticated users
Clone and set up the project in minutes:
- Node.js 18+
- PostgreSQL database
- Clone the repository:
git clone https://github.com/christopherrobin/Christophers-Next-Template cd Christophers-Next-Template - Install dependencies:
yarn install
- Configure environment variables:
- Copy
.env.local.exampleto.env.localand fill in your database and secret values.
- Copy
- Run Prisma migrations:
yarn prisma migrate deploy
- Start the development server:
yarn dev
Visit http://localhost:3000 to view the app.
src/app/— Next.js App Router pages (home, join, sign-in, dashboard)src/components/— Reusable UI components (Button, Spinner, Providers)src/lib/— Prisma and authentication logicprisma/— Prisma schema and migrationspublic/— Static assets and icons__tests__/— Unit and component testse2e/— End-to-end tests
Extend or modify any part to fit your project:
- Add new pages or API routes in
src/app/ - Create custom UI components in
src/components/ - Adjust authentication logic in
src/lib/auth.ts - Update styles via Tailwind config or CSS
yarn dev— Start development serveryarn build— Build for productionyarn start— Start production serveryarn prisma:migrate— Deploy database migrationsyarn lint/yarn lint:fix— Lint codeyarn format/yarn format:fix— Format codeyarn run nuke— Remove node_modules, reinstall dependencies, and rebuildyarn run clean— Lint, format, and prettify all code
DATABASE_PUBLIC_URL— PostgreSQL connection stringNEXTAUTH_SECRET— Secret for NextAuth.js
This project uses Heroicons for modern SVG icons in React components.
- The
@heroicons/reactpackage is installed as a dependency. - Import icons into your components. There are two main styles and sizes.
- Use icons as React components, e.g.
<RocketLaunchIcon className="w-5 h-5" />. - The custom
Buttoncomponent supports passing icons asstartIconorendIconprops.
For more icons and usage details, see the Heroicons documentation.
This project supports two main testing methods:
-
Unit & Component Testing (Jest + Testing Library):
- Run all tests:
yarn test - Run a specific test file:
yarn test __tests__/Button.test.tsx - Uses @testing-library/react and @testing-library/user-event for React component interaction and assertions.
- Run all tests:
-
End-to-End (E2E) Testing (Playwright):
- Run all E2E tests:
yarn test:e2e - Uses Playwright for browser-based end-to-end testing.
- Run all E2E tests:
See the test files in __tests__/ and e2e/ directories for examples.
This project is open source and available under the MIT License.
