Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

All-in-one Next.js project with App Router.

License

NotificationsYou must be signed in to change notification settings

chongruei/next-app-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to my all-in-one Next.js project with app router!

Features

  • Next.js with App Router support
  • 🔥 Type checkingTypeScript
  • 💎 Integrate withTailwind CSS
  • 🖼️ Navigate animation withnext-view-transitions
  • 🧰 Statem management withValtio andReact Query
  • ✅ Strict Mode for TypeScript and React 18
  • 📏 Linter withESLint (default NextJS, NextJS Core Web Vitals, Tailwind CSS
  • 💖 Code Formatter withPrettier
  • 🦊 Husky for Git Hooks
  • 🚫 Lint-staged for running linters on Git staged files
  • 🚓 Lint git commit with Commitlint
  • 🧪 E2E Testing withPlaywright
  • 💡 Absolute Imports using@ prefix
  • 🗂 VSCode configuration: Debug, Settings, Tasks and extension for PostCSS, ESLint, Prettier, TypeScript, Jest
  • 🤖 SEO metadata with Next generateMetadata
  • ⚙️Bundler Analyzer
  • 💯 Maximize lighthouse score

Use the template with create-next-app

To create a new project based on this template using create-next-app, run the following command:

npx create-next-app -e https://github.com/chongruei/nextjs-app-boilerplate

Requirements

  • Node.js >=20.0.0 and pnpm

Getting started

To install the dependencies, run the following command:

pnpm install

Local Configuration

Before starting the development server, make sure to add the local configuration file.env.local with the following content:

# GENERATE_SOURCEMAP=falseNEXT_PUBLIC_VERSION=$npm_package_versionNEXT_PUBLIC_ENV=productionNEXT_PUBLIC_ENV_NAME=local

Start Development Server

To start the development server, use the following command:

pnpm dev

Openhttp://localhost:3000 in your browser to see the application. You can edit the pages by modifying the corresponding files in thesrc/app directory. The changes will be automatically updated in the browser.

Start Production Server

To start the production server, follow these steps:

pnpm buildpnpm start

Run Playwright testings

To install the Playwright, run the following command:

pnpmexec playwright install

and

pnpmtest

Bundle Analyzer

To analyze the bundle size, run the following command:

ANALYZE=true pnpm build

Docker Commands

To build and run the application using Docker, you can use the following commands:

docker-compose -f docker-compose.yml builddocker-compose -f docker-compose.yml up

VSCode Developer Setup

To get started with development in Visual Studio Code, open the workspace file namednextjs-app-router-boilerplate.code-workspace.

I18n with next-intl

For internationalization (i18n), we use thenext-intl package. It provides comprehensive support for localization in Next.js applications.

We recommend installing the following extensions for a better development experience:


[8]ページ先頭

©2009-2025 Movatter.jp