A modern React 19 monorepo setup using TypeScript, Tailwind CSS 4, pnpm workspaces, and rsbuild.
my-react-project/
├── package.json
├── pnpm-workspace.yaml
├── packages/
│ ├── ui-lib/ # Shared component library
│ │ ├── src/
│ │ │ ├── components/
│ │ │ ├── utils.ts
│ │ │ └── index.ts
│ │ └── ...config files
│ └── app/ # Main application
│ ├── src/
│ │ ├── App.tsx
│ │ └── ...
│ └── ...config files
git clone https://github.com/yourusername/your-repo-name.git
cd your-repo-name
pnpm install
pnpm --filter @my-project/ui-lib build
pnpm dev
This will run the app in development mode. Open http://localhost:8080 to view it in the browser.
pnpm build
The UI library (@my-project/ui-lib
) contains reusable components that can be imported into the main app.
To add a new component to the UI library:
packages/ui-lib/src/components/
packages/ui-lib/src/index.ts
pnpm --filter @my-project/ui-lib build
import { MyComponent } from '@my-project/ui-lib'
pnpm dev
- Start the app development serverpnpm build
- Build the app for productionpnpm build:ui
- Build the UI librarypnpm build:all
- Build all packagesgit checkout -b feature/my-new-feature
git commit -am 'Add some feature'
git push origin feature/my-new-feature
This project is licensed under the MIT License - see the LICENSE file for details.