Skip to content

PaulRBerg/next-template

Repository files navigation

Next.js Template NextJS Node.js Version TypeScript Version License: MIT

A modern Next.js template for building production-ready web applications.

Artwork

What's Inside

This template provides:

  • AGENTS.md — Context instructions for AI agents like Claude Code
  • MCP.mcp.json file with MCP server configuration
  • Next.js v16 - with App Router and React v19
  • Effect-ts — type-safe functional programming and async effects
  • next-intl — internationalization (i18n) library for Next.js
  • Vercel - for hosting and CI deployments
  • TypeScript v5 — type safety and enhanced developer experience
  • Tailwind CSS v4 — utility-first CSS framework for rapid styling
  • Bun — fast package manager and JavaScript runtime
  • BiomeJS — lightning-fast linting and formatting for TypeScript and JSON
  • Prettier — code formatting for Markdown and YAML files
  • Just — command runner for streamlined task automation
  • Husky - automated Git hooks for code quality
  • Knip — unused code and dependency detection

Optimized for developer productivity and application performance.

Note

Some of the configuration files depend upon the Sablier DevKit

Getting Started

Click the Use this template button to create a new repository.

Or clone manually:

git clone https://github.com/PaulRBerg/next-template.git my-app
cd my-app

And then run:

bun install
bun husky
just --list

New to Next.js? Check out these resources:

Prerequisites

Usage

Start the development server:

just dev

The dev server starts on a random available port. Check the terminal output for the URL.

Vercel Deployment

To make the CI deployment workflow work, you have to configure these environment variables in your GitHub Actions secrets:

  • VERCEL_ORG_ID
  • VERCEL_PROJECT_ID
  • VERCEL_TOKEN

Tip

If you use the gh CLI, you can put your environment variables in a .env file and then run this command: gh secret set -f .env.

Commands

This template uses Just for task automation.

Development

Make sure to run bun install first!

Command Description
just dev Start development server
just build Build for production
just start Start production server
just clean Clean build artifacts
just deploy Deploy to Vercel

Code Linting

Command Description
just biome-check Check code with Biome
just biome-format Format code with Biome
just full-check Run all quality checks
just full-write Fix all quality issues

Other Commands

Run just to see all available commands.

Project Structure

├── .github/workflows/     # GitHub Actions (CI/CD)
├── .husky/                # Git hooks configuration
├── app/                   # Next.js App Router
│   ├── api/health/        # Health check API route
│   ├── favicon.ico        # Favicon
│   ├── globals.css        # Global styles
│   ├── layout.tsx         # Root layout
│   └── page.tsx           # Home page
├── i18n/                  # Internationalization
│   ├── request.ts         # i18n request configuration
│   └── translations/      # Translation files (JSON)
├── lib/                   # Shared utilities
│   ├── cn.ts              # Tailwind class merge utility
│   └── effect/            # Effect-ts utilities
├── public/                # Static files
├── ui/                    # UI components
├── CLAUDE.md              # AI agent instructions
├── biome.jsonc            # Biome configuration
├── justfile               # Just command definitions
├── knip.jsonc             # Knip configuration
├── next.config.ts         # Next.js configuration
├── package.json           # Package configuration
├── postcss.config.mjs     # PostCSS configuration
└── tsconfig.json          # TypeScript configuration

Customization

Styling

Customize the design system by editing:

  • app/globals.css — global styles and Tailwind directives
  • postcss.config.mjs — PostCSS configuration

Linting and Formatting

Code quality is enforced with Biome. See biome.jsonc for configuration.

Dead Code Detection

Knip detects unused dependencies and exports. See knip.jsonc for configuration.

Deployment

Deploy easily with Vercel, the platform from Next.js creators.

See the Next.js deployment documentation for other options.

License

This project is licensed under MIT.

About

A modern Next.js template for building production-ready web applications.

Topics

Resources

License

Stars

Watchers

Forks