/new-web-app¶
Scaffold a new React + Vite + TypeScript web app with standard tooling. This is the web-app counterpart to New Project, which is Python-only.
What It Does¶
- Asks for the project name, description, and whether a backend/API is needed.
- Checks the target directory is safe to scaffold into (empty, not already a git repo).
- Scaffolds with
npm create vite@latest -- --template react-ts. - Adds Prettier, Vitest, and
@testing-library/reacton top of the Vite defaults. - Verifies
tsconfig.jsonhas"strict": true. - Wires up pre-commit enforcement with Husky + lint-staged, running
eslint --fixandprettier --writeon staged files. - Creates
.env.example,.gitignore,README.md, andCLAUDE.md. - Initializes git and makes the first commit (the Husky hook runs on it too).
- Optionally creates the GitHub repo and pushes.
- Optionally applies branch protection via Protect Main.
Example¶
Project name: order-tracker
Description: Internal dashboard for tracking order status
Needs a backend/API? No — calls an existing API
$ npm create vite@latest order-tracker -- --template react-ts
$ cd order-tracker && npm install
$ npm install -D prettier eslint-config-prettier vitest @testing-library/react jsdom
Created: .env.example, .gitignore, README.md, CLAUDE.md
$ git init && git add -A && git commit -m "feat: initial project scaffold"
Notes¶
- Never put secrets in a
VITE_-prefixed env var — those ship to the browser bundle. - A backend, if needed, lives in a sibling
server/directory with its ownpackage.json. - Follow up with Deploy Web App to ship it, and UI Components for component conventions.