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 January 2025.
![Screenshot 2024-01-09 at 4 53 45 PM](https://private-user-images.githubusercontent.com/588541/295352304-3a7e6b62-ff16-492d-9f20-b409ab84f104.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNDkyNTgsIm5iZiI6MTczOTE0ODk1OCwicGF0aCI6Ii81ODg1NDEvMjk1MzUyMzA0LTNhN2U2YjYyLWZmMTYtNDkyZC05ZjIwLWI0MDlhYjg0ZjEwNC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQwMDU1NThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT02ZWI3Njk5NzRjZDYwM2Y1ZTU0Yjg0ZTJjYzRkNjAzYzIxZTBhMDhhODgwYjgwZGViYTIzMDQ2NWFkMDJiOTE4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.xlhO2ilhk1yERgo2H_YX5FINOiVe4eBzXe41fmgJHb0)
- Mono-repository using NPM 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
- NX for managing the monorepo dependencies in parallel builds
- Prettier for code formatting
- ESLint for linting
- Incremental and caching builds via NX.
- VSCode will auto-format on save and paste.
- Node:test testing
- Github action CI
- Clone this repository
- Run
npm install
- Run
npm run test
to run all tests
- Run
npm run dev
to start the hot reload development server & build watchers
- Run
npm run build
to build the source
- Run
npx cli
to run the CLI example