Skip to content

ellisgeeker/nextjs-tp

Repository files navigation

Next-TP

A modern monorepo template built with Next.js, Turborepo, and pnpm.

English | 简体中文

Tech Stack

Project Structure

next-tp/
├── apps/
│   ├── web/          # Next.js web application
│   └── storybook/    # Storybook for component documentation
├── packages/
│   ├── ui/           # Shared UI components
│   └── tsconfig/     # Shared TypeScript configurations
└── package.json

Prerequisites

  • Node.js >= 22.x (recommended to use Volta for version management)
  • pnpm >= 10.x

Getting Started

1. Install dependencies

pnpm install

2. Configure environment variables

cp apps/web/.env.example apps/web/.env.local

Edit apps/web/.env.local and configure the required environment variables.

3. Start development server

# Start all apps
pnpm dev

# Start only web app
pnpm --filter=web dev

# Start only storybook
pnpm --filter=storybook dev

4. Build for production

pnpm build

Available Scripts

Command Description
pnpm dev Start all apps in development mode
pnpm build Build all apps for production
pnpm lint Run Biome linter
pnpm format Format code with Biome
pnpm typecheck Run TypeScript type checking
pnpm clean Clean all node_modules

Important Notes

  1. Environment Variables: Always copy .env.example to .env.local before starting the web app. Never commit .env.local to version control.

  2. Playwright Browsers: If running Storybook tests for the first time, you need to install Playwright browsers:

    pnpm exec playwright install
  3. Node Version: This project uses Node.js 22.x. If you're using Volta, it will automatically switch to the correct version.

License

MIT

About

nextjs for frontend template

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages