Next.jsReactStarter

Christophers-Next-Template — Next.js Starter Template

By christopherrobin

A Next.js starter with email/password authentication, a Postgres data layer, and a full test pyramid, released under the MIT license and suitable as an initial skeleton for full-stack applications.

Explore the design

Compare the page layouts and mobile experience. Open any screenshot for a closer look.

2 previews
Desktop homepage1 / 2
Desktop captureTop of page

Actual screenshot captured by the server browser.

All pages & views 2

Screenshots show visual appearance; interactive behavior may differ.

Recorded 2026-10-06View source

What stands out

A quick read of the recorded project description.

01

Integrates NextAuth.js email/password authentication with JWT sessions, including registration, login, and a protected dashboard page

02

Uses Prisma to connect to PostgreSQL, including schema and migration files

03

Shares form validation rules between client and server via Zod and react-hook-form

04

Includes Jest + Testing Library unit/component tests and Playwright end-to-end tests

05

Configures ESLint, Prettier, and Next 16's proxy middleware for route protection

06

Released under the MIT license; the code may be used, modified, and distributed for free

Template Details

Christophers-Next-Template is a Next.js starter for full-stack web applications, with a focus on authentication and engineering configuration. It uses the App Router, integrates NextAuth.js email/password login with JWT sessions, connects to PostgreSQL via Prisma to store user data, and shares form validation rules between client and server using Zod and react-hook-form. The project includes registration, login, a protected dashboard, and a 404 page. Route protection is implemented via Next 16's proxy middleware: unauthenticated access to /dashboard redirects to the login page, while authenticated access to the login or registration pages redirects back to the dashboard.

On the engineering side, the repository includes ESLint, Prettier, Jest and Testing Library unit/component tests, and Playwright end-to-end tests, with test files placed alongside the source code. The README states that Node.js 24+ and PostgreSQL are required, and lists three environment variables: DATABASE_PUBLIC_URL, NEXTAUTH_SECRET, and NEXTAUTH_URL. The project is released under the MIT license, and the code may be used, modified, and distributed for free, but third-party assets such as demo images, fonts, and icons, as well as external services like databases and hosting, require separate verification of licensing and costs.

Next.jsReactStarter

Is it right for your project?

Use Cases

  • Rapidly prototyping a full-stack Next.js application with email/password authentication
  • Projects that want to start with Prisma + PostgreSQL as the data layer
  • Initial projects that need both unit test and end-to-end test configurations
  • Those who want to reference how middleware route protection and form validation are organized under the Next.js App Router

Suitable For

  • Developers familiar with Next.js, TypeScript, and Prisma
  • Full-stack projects that need an extensible authentication skeleton
  • Teams that want built-in test layering and code style configuration
  • Users who can prepare their own PostgreSQL database and hosting environment

Getting started & customization

Use these recorded setup notes alongside the repository instructions for your chosen version.

  1. 1

    Requires Node.js 24+; the repository provides .nvmrc so you can run nvm use

  2. 2

    Requires a PostgreSQL database connection

  3. 3

    Copy .env.local.example to .env.local and fill in DATABASE_PUBLIC_URL, NEXTAUTH_SECRET, and NEXTAUTH_URL

  4. 4

    Install dependencies with yarn install, run migrations with yarn prisma migrate deploy, and start the development server with yarn dev

  5. 5

    Third-party assets such as demo images, fonts, and icons must be checked against their respective licenses; external services such as databases and hosting may incur additional charges

Read repository instructions

License & source material

Usage conditions & limitations

Free to use · keep license notice

This entry covers the free version under the MIT license in the public repository; the free scope is the code of that version and does not mean external services or third-party assets are free.

Must comply with when using

  • You may use, modify, use commercially, and distribute the code of this version for free.
  • When distributing copies or substantial portions of the code, retain the original author's copyright notice and the full MIT license notice.
  • The code is provided as is; warranties and limitations of liability are governed by the original license and applicable law.

Additional costs & items to verify

  • Demo images, fonts, icons, and other third-party assets must be checked against their respective licenses and cannot be judged solely by the code's MIT license.
  • External services such as domains, hosting, databases, payments, or AI may incur additional charges.
  • Using this template requires Node.js 24 or higher and a self-prepared PostgreSQL database, which are runtime environment requirements.
  • The three environment variables DATABASE_PUBLIC_URL, NEXTAUTH_SECRET, and NEXTAUTH_URL must be configured; otherwise, the database and authentication services cannot connect properly.
  • You must copy .env.local.example to .env.local and fill in the database and secret values, which is a necessary configuration step before deployment.
View Original Text Basis

Permission is hereby granted, free of charge

Original License Text

- Node.js 24+ (a `.nvmrc` is provided — run `nvm use`) - PostgreSQL database

Original README

- `DATABASE_PUBLIC_URL` — PostgreSQL connection string - `NEXTAUTH_SECRET` — Secret for NextAuth.js (generate with `openssl rand -base64 32`) - `NEXTAUTH_URL` — Canonical site URL (e.g. `http://localhost:3000`)

Original README

3. Configure environment variables: - Copy `.env.local.example` to `.env.local` and fill in your database and secret values.

Original README
https://github.com/christopherrobin/Christophers-Next-Template/blob/main/LICENSEhttps://github.com/christopherrobin/Christophers-Next-Template/blob/main/README.md

Compiled by DeepSeek based on repository license and README ·2026-10-06. Results only cover the materials read; dependencies, images, fonts, and subsequent term changes are subject to their respective original texts.

Project checks & description sources

Template Information

Source platforms
GitHub
Documentation and maintenance reference score
More documented · 85 / 100
Technologies
Next.js · React
Website type
Starter
How this score is calculated

Our heuristic uses license records (up to 30), a demo link (12), a preview (10), stars (15), recorded maintenance (15), description completeness (8), feature records (5) and classification data (5). It is not a code, security or performance test, or a Google score. A link does not establish tested functionality.

What to verify for this project

Repository update recorded
2026-10-05
Screenshot last checked
2026-10-06

A demo link is listed. Check it with your own content and viewport sizes; its presence does not confirm that forms, authentication or payments work.

The catalog identifies Next.js as the primary stack. Check the actual dependency manifest and lockfile for versions and hosting requirements. These notes use recorded metadata, not a code audit or a deployment test.

Use a selection guide →

How this description was prepared

AI-assisted description based on catalog records and repository material. Repository authors are not automatically the reviewers of this description.

Review declaration: [email protected] · 2026-10-06

Inspect the recorded source material

SHA-256: 76973fe6af69b21412117f4531f77fb6fe798e00a4682e1a920962079a97b786

2026-10-06T00:08:13.834Z

Source file / repository
# Christophers-Next-Template

[![CI](https://github.com/christopherrobin/Christophers-Next-Template/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/christopherrobin/Christophers-Next-Template/actions/workflows/ci.yml)
[![Tested with Jest](https://img.shields.io/badge/tested_with-jest-99425B?style=flat-square&logo=jest&logoColor=white)](https://jestjs.io/)
[![E2E with Playwright](https://img.shields.io/badge/e2e_with-playwright-2E7D32?style=flat-square&logo=playwright&logoColor=white)](https://playwright.dev/)
[![Coverage](https://img.shields.io/badge/coverage-90%25_threshold-informational?style=flat-square)](https://github.com/christopherrobin/Christophers-Next-Template/blob/main/jest.config.ts)
[![ESLint](https://img.shields.io/badge/eslint-flat_config-4B32C3?style=flat-square&logo=eslint&logoColor=white)](https://github.com/christopherrobin/Christophers-Next-Template/blob/main/eslint.config.mjs)
[![Prettier](https://img.shields.io/badge/code_style-prettier-F7B93E?style=flat-square&logo=prettier&logoColor=black)](https://github.com/christopherrobin/Christophers-Next-Template/blob/main/.prettierrc)

[![Next.js](https://img.shields.io/badge/Next.js-16-000000?style=for-the-badge&logo=nextdotjs&logoColor=white)](https://nextjs.org/)
[![React](https://img.shields.io/badge/React-19-61DAFB?style=for-the-badge&logo=react&logoColor=black)](https://react.dev/)
[![TypeScript](https://img.shields.io/badge/TypeScript-strict-3178C6?style=for-the-badge&logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
[![Tailwind CSS](https://img.shields.io/badge/Tailwind_CSS-4-06B6D4?style=for-the-badge&logo=tailwindcss&logoColor=white)](https://tailwindcss.com/)
[![Prisma](https://img.shields.io/badge/Prisma-7-2D3748?style=for-the-badge&logo=prisma&logoColor=white)](https://www.prisma.io/)
[![PostgreSQL](https://img.shields.io/badge/PostgreSQL-4169E1?style=for-the-badge&logo=postgresql&logoColor=white)](https://www.postgresql.org/)
[![NextAuth.js](https://img.shields.io/badge/NextAuth.js-4-000000?style=for-the-badge&logo=auth0&logoColor=white)](https://next-auth.js.org/)

![Welcome Preview](public/welcome.png)

## 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 16, TypeScript, Prisma, and Tailwind CSS.

## Stack

- **Next.js 16** with App Router (Turbopack default)
- **React 19**, **TypeScript 6** (strict)
- **Prisma 7** with PostgreSQL
- **Tailwind CSS 4** for styling
- **NextAuth.js 4** for authentication (email & password, JWT sessions)
- **Zod + react-hook-form** for form validation (shared client/server schemas)
- **Heroicons** for modern SVG icons
- **bcrypt** (via bcryptjs) for secure password hashing

## Tooling & Features

- **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

## Getting Started

Clone and set up the project in minutes:

### Prerequisites

- Node.js 24+ (a `.nvmrc` is provided — run `nvm use`)
- PostgreSQL database

### Installation

1. Clone the repository:
   ```bash
   git clone https://github.com/christopherrobin/Christophers-Next-Template
   cd Christophers-Next-Template
   ```
2. Install dependencies:
   ```bash
   yarn install
   ```
3. Configure environment variables:
   - Copy `.env.local.example` to `.env.local` and fill in your database and secret values.
4. Run Prisma migrations:
   ```bash
   yarn prisma migrate deploy
   ```
5. Start the development server:
   ```bash
   yarn dev
   ```

Visit [http://localhost:3000](http://localhost:3000) to view the app.

## Project Structure

- `src/app/` — Next.js App Router pages (home, sign-up, sign-in, dashboard, `not-found.tsx`)
- `src/components/` — Reusable UI components (Button, Input, Spinner, GitHubIcon, Providers)
- `src/lib/` — Prisma client, NextAuth config, env validation (`env.ts`), API helpers (`api-utils.ts`), shared Zod schemas (`schemas.ts`)
- `src/proxy.ts` — Next 16 middleware (route protection and auth redirects)
- `prisma/` — Prisma schema and migrations
- `public/` — Static assets and icons
- `e2e/` — End-to-end tests

Unit/component tests are co-located next to source files (e.g. `Button.tsx` + `Button.test.tsx`).

## Customization

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

## Scripts

- `yarn dev` — Start development server
- `yarn build` — Build for production
- `yarn start` — Start production server
- `yarn prisma:migrate` — Deploy database migrations
- `yarn lint` / `yarn lint:fix` — Lint code
- `yarn format` / `yarn format:fix` — Format code
- `yarn run nuke` — Remove node_modules, reinstall dependencies, and rebuild
- `yarn run clean` — Lint, format, and prettify all code

## Environment Variables

- `DATABASE_PUBLIC_URL` — PostgreSQL connection string
- `NEXTAUTH_SECRET` — Secret for NextAuth.js (generate with `openssl rand -base64 32`)
- `NEXTAUTH_URL` — Canonical site URL (e.g. `http://localhost:3000`)

## Authentication & Routing

The included `src/proxy.ts` (Next 16's renamed middleware) enforces:

- `/dashboard/*` requires authentication (unauth users are redirected to `/sign-in?callbackUrl=...`)
- `/sign-in` and `/sign-up` redirect authenticated users to `/dashboard`
- `/` is public for everyone

## Forms & Validation

Sign-in and sign-up forms use **react-hook-form + Zod** via `zodResolver`. Schemas live in `src/lib/schemas.ts` and are used by both the client form and the server-side `safeParse` in `/api/sign-up/route.ts` — one source of truth, type-inferred via `z.infer`. Forms set `noValidate` so RHF owns validation (not native HTML5).

## Using Heroicons

This project uses [Heroicons](https://heroicons.com/) for modern SVG icons in React components.

### How to Use Heroicons

- The `@heroicons/react` package 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 `Button` component supports passing icons as `startIcon` or `endIcon` props.

For more icons and usage details, see the [Heroicons documentation](https://heroicons.com/).

## Testing

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 src/components/Button.test.tsx`
  - Tests are co-located next to the components they cover (e.g. `Button.tsx` + `Button.test.tsx`).
  - Uses [@testing-library/react](https://testing-library.com/docs/react-testing-library/intro/) and [@testing-library/user-event](https://testing-library.com/docs/ecosystem-user-event/) for React component interaction and assertions.

- **End-to-End (E2E) Testing** (Playwright):
  - Run all E2E tests: `yarn test:e2e`
  - Specs live in the `e2e/` directory.
  - Uses [Playwright](https://playwright.dev/) for browser-based end-to-end testing.

## License

This project is open source and available under the [MIT License](LICENSE).
Report a correction

Explore similar templates

Compare previews and descriptions within the same stack and category.