Scaffolding CLI for CodeBuddy React + Vite starterkit (auth or no-auth variants).
npm install create-react-dotnet-starterkitTwo Vite + React + MUI starter templates plus a tiny npm create-style CLI that lets you pick whether to scaffold with auth.
``bashPrompted for auth vs no-auth
npm create react-dotnet-starterkit@latest my-app
After generation:
`bash
cd my-app
npm install
npm run dev
`What’s in each template
- auth (
templates/auth): zustand AuthStore, ProtectedRoute, token refresh helpers, and auth-enabled ApiClient. Env sample: .env.example includes API URL, auth flags, and develop flag.
- no-auth (templates/no-auth): public-only routing, simplified ApiClient without tokens, no auth deps. Env sample trimmed to just API URL and develop flag.Common stack:
- React 18 + TypeScript + Vite 5 + MUI 5
- Path aliases (
@/), eslint/prettier configs, vitest setup hooks (tests not included by default)
- Dynamic site.webmanifest via Vite pluginDo we need to publish?
Yes, to use
npm create react-dotnet-starterkit@latest from anywhere, you publish this package to npm (or your private registry).Typical flow to publish to npm:
1) Set the package name (already
create-react-dotnet-starterkit) and version in root package.json.
2) npm login
3) npm publish --access public (or --access restricted if using a private scope/registry)If you don’t want to publish, you can still scaffold locally by running the CLI directly:
`bash
node scripts/init.js my-app --auth
`or by using
npm pack` and installing from the generated tarball.