A focused foundation for building web apps with AI-assisted development.
Next.js App Router · React · TypeScript · shadcn/ui · Tailwind CSS · next-intl · Zustand · Serwist
Recommended environment: Node.js 24.22.0 LTS and npm 12.2.0 or later. The repository uses npm and commits package-lock.json. No project-level packageManager or engines restriction is configured; .nvmrc provides the recommended Node.js version.
nvm install
nvm use
npm install --global npm@12.2.0
npm ci
cp .env.example .env.local
npm run devOpen localhost:3000. Routes use /en and /zh-CN; the root detects your preferred language.
Set NEXT_PUBLIC_APP_URL to your public origin before a production build. It controls canonical links, sitemap URLs, and language alternates. Restart or rebuild after changing it.
| Command | Purpose |
|---|---|
npm run dev |
Start the development server |
npm run build |
Build the app and service worker with Turbopack |
npm start |
Serve the production build |
npm run lint |
Check source code with ESLint |
npm run format |
Format source and documentation |
npm run format:check |
Check formatting |
npm run typecheck |
Generate route types and check TypeScript |
npm run check:i18n |
Check translation keys, ICU syntax, and arguments |
npm run test:e2e |
Run browser tests against the production build |
npm run verify |
Run formatting, lint, translations, types, build, and browser tests |
npm run ui:add -- button |
Add a component using the pinned shadcn CLI |
To prepare browser tests:
npx playwright install chromium
npm run verifyIf Chrome is already installed, you can use PLAYWRIGHT_CHANNEL=chrome npm run verify instead. UI tests capture desktop and mobile screenshots for both languages in docs/evidence/.
- Server Components by default and React Compiler enabled.
- English and Simplified Chinese routes, typed translation keys, localized metadata and error pages.
- Current shadcn/ui components using Radix primitives and Tailwind CSS 4 theme tokens.
- Light, dark, and system themes with next-themes.
- A request-isolated Zustand store with SSR-safe preference persistence.
- Production-only service worker registration, bilingual offline pages, and an explicit update prompt.
- A localized web app manifest with a stable app identity.
- Independent local quality checks, without Git hooks or enforced commit message tooling.
The starter does not require a model provider account. Add AI product features when your app needs them.
app/ Routes, metadata, and service worker
[locale]/ Localized pages, errors, and manifests
components/
ui/ shadcn/ui primitives
layout/ Shared page layout
providers/ Theme, preferences, and PWA boundaries
lib/
i18n/ Locale routing, request config, and types
stores/ Client state factories
locales/ English and Chinese messages
scripts/ Local checks
tests/e2e/ Browser integration tests
docs/en/ Engineering guide and upgrade notes
docs/zh-CN/ Matching Chinese documentation
Service workers are disabled during development. Test offline behavior using npm run build && npm start on localhost, or deploy with HTTPS.
Visit the app online once and wait for installation before testing offline navigation. Both offline pages are precached. Static assets may be cached; user pages, API responses, and write requests are not runtime-cached. A newly installed worker waits until you choose Refresh or all old tabs close.
Install availability depends on the browser and platform. On supported browsers, use their install control; on iOS, use Add to Home Screen.
Direct dependencies are pinned, and the lockfile is versioned. Refresh versions deliberately and run npm run verify. npm 12's allowScripts policy permits reviewed native build dependencies only.
TypeScript remains on 6.0.3 because the current typescript-eslint release does not support TypeScript 7. Next.js, React, UI, and other direct dependencies use the stable versions verified during this upgrade. See the upgrade notes for upstream limitations.