Skip to content

TL-M0-08 · Scaffold apps/web

Why: create-next-app makes the Next.js 16 app. The rest of the step turns it into a member of the workspace instead of a standalone project, and removes the starter's demo page. From the next commit on, apps/web is the Frontend Engineer's.

ID TL-M0-08 · Level L0 · Run order row 8

apps/web is a Next.js 16 workspace member named web, on TypeScript 7.0.2, that typechecks and runs.

  • TL-M0-07 is Done.
  • The root package.json lists typescript 7.0.2: grep '"typescript"' package.json. If it shows another version, use that version here and in TL-M0-10.

1 · Create the app: TypeScript, App Router, no Tailwind, no linter (Biome at the root covers it), no src/ folder

Section titled “1 · Create the app: TypeScript, App Router, no Tailwind, no linter (Biome at the root covers it), no src/ folder”
Terminal window
pnpm create next-app@latest apps/web --ts --app --no-src-dir --import-alias "@/*" --no-tailwind --no-linter --no-react-compiler --use-pnpm --disable-git --skip-install --yes

2 · Make it a workspace member: remove the files that made it standalone

Section titled “2 · Make it a workspace member: remove the files that made it standalone”
Terminal window
rm -f apps/web/pnpm-workspace.yaml apps/web/pnpm-lock.yaml
pnpm --dir apps/web pkg delete packageManager

3 · Replace the starter's demo page and remove its images

Section titled “3 · Replace the starter's demo page and remove its images”
Terminal window
rm -f apps/web/public/*.svg apps/web/app/page.module.css
cat > apps/web/app/page.tsx <<'EOF'
export default function Home() {
return (
<main>
<h1>Opleet v2</h1>
</main>
);
}
EOF

4 · The repository's TypeScript version, Node 24 types, and a typecheck script

Section titled “4 · The repository's TypeScript version, Node 24 types, and a typecheck script”
Terminal window
pnpm --filter web add -D -E typescript@7.0.2
pnpm --filter web add -D @types/node@24
pnpm --dir apps/web pkg set scripts.typecheck="next typegen && tsc --noEmit"
Terminal window
pnpm --filter web typecheck
pnpm --filter web dev
Terminal window
git add -A
git commit -m "build(web): scaffold the Next.js app"
  • Block 1: “Success! Created web at …/apps/web”.
  • Block 5: “✓ Types generated successfully” with no errors; the browser shows a page that says “Opleet v2”.
  • Block 6: ✔️ biome and ✔️ commitlint, then the commit line.
Terminal window
cat apps/web/package.json
ls -A apps/web

package.json is named web, has next 16.x, typescript 7.0.2 and a typecheck script, and no packageManager line. apps/web has no pnpm-workspace.yaml or pnpm-lock.yaml of its own.

  • “zsh: no matches found: @/*”: the quotes around "@/*" were lost; retype them.
  • ERR_PNPM_IGNORED_BUILDS: paste it. A build script is approved only after we decide; none was needed when this step was tested.
Terminal window
rm -rf apps/web
git checkout -- .
pnpm install

Done 2026-10-05 (zuki)