Skip to content

boddhi9/next-template

Repository files navigation

next-template

CodeQL Advanced

A modern and minimal Next.js 15 starter template, built to accelerate your development with an opinionated setup of tools and components.

Features

  • Next.js 15: The latest Next.js version with App Router.
  • Tailwind CSS: Utility-first styling framework for rapid UI development.
  • shadcn/ui Components: Prebuilt accessible UI components.
  • Storybook: Component development and testing made easy.
  • TypeScript: Strongly typed JavaScript for maintainable code.
  • ESLint & Prettier: Code quality and formatting out of the box.
  • Dark Mode: Seamless theme switching with next-themes.
  • Framer Motion: Add animations with ease.
  • Toast Notifications: Prebuilt toast component for user feedback.
  • Absolute Imports: Use @ as the root for imports.

Getting Started

Quick Start

npx next-boil my-next-app
cd my-next-app
npm install
npm run dev

Visit http://localhost:3000 to see the template in action.

Project Structure

next-template/
├── app/                # Next.js App Router files
├── components/         # Reusable components
│   ├── ui/             # shadcn/ui components
├── hooks/              # Custom React hooks
├── lib/                # Utilities and configurations
├── pages/              # Legacy Pages Router (not included, not recommended)
├── public/             # Static assets
├── stories/            # Storybook files for UI components
├── styles/             # Global and component-specific styles
├── types/              # TypeScript type definitions
├── utils/              # Utility functions and helpers
├── .eslintrc.json      # ESLint configuration
├── prettier.config.js  # Prettier configuration
├── tailwind.config.js  # Tailwind CSS configuration
├── tsconfig.json       # TypeScript configuration

Scripts

Development

Start the development server with live reload:

npm run dev

Build for Production

Generate a production-ready build:

npm run build

Start Production Server

Serve the production build:

npm run start

Lint Code

Check for linting issues:

npm run lint

Fix linting issues automatically:

npm run lint:fix

Format Code

Automatically format code with Prettier:

npm run format

Check for formatting issues:

npm run format:check

TypeScript

Check for type errors without emitting files:

npm run check-types

Run Storybook

Start the Storybook development server:

npm run storybook

Build a static Storybook site:

npm run build-storybook

Serve the built Storybook files:

npm run storybook:serve

Testing

Run tests in watch mode:

npm run test

Run tests in CI mode:

npm run test:ci

Run Storybook tests in CI mode:

npm run test-storybook:ci

Documentation

Explore the frameworks and tools included in the template:

License

This project is licensed under the MIT License.