This is a template for a monorepo that uses best practices for TypeScript, Web Services and React.
It is what @bhouston considers best practice in February 2025.
This app is maintained in part by https://mycoder.ai
- Mono-repository using pnpm workspaces
- TypeScript for type safety
- ES Modules for fast builds
- NodeNext node resolution
- React for UI
- Tailwindcss for styling
- Both react and vanilla JS libraries
- Command line, React app, and web server
- Vite for Bundling, CSS Handling, Live Reloading
- CLI via @yargs + file commands
- @TanStack/start for router, SSR, server API
- Fastify for server with file-based router
- Hot reload of React
- Auto service restart for the web server
- Prettier for code formatting
- ESLint for linting
- VSCode will auto-format on save and paste
- Vitest for testing with coverage support
- Github action CI
- Clone this repository
- Run
pnpm install
- Run
pnpm testto run all tests - Run
pnpm test:watchfor watch mode during development - Run
pnpm test:coverageto generate test coverage report
- Run
pnpm devto start the hot reload development server & build watchers
- Run
pnpm buildto build the source
- Run
pnpm clito run the CLI example