This monorepo provides a robust foundation for building React applications with Vite, optimized for BunJS runtime and ESM modules. It features a modular architecture with shared packages and a streamlined development experience.
- Monorepo Structure: Organized with
apps
for applications andpackages
for shared libraries - BunJS Optimization: Leverages Bun's native speed and ESM support
- TypeScript First: Full type safety across the entire codebase
- Vite Powered: Fast development server and optimized production builds
- Component Library: Shared UI components via
@packages/ui
- Flow Builder: Extensible flow builder system via
@packages/flow
- ESM Ready: Fully optimized for modern JavaScript modules
.
├── apps/
│ └── app/ # Main application
├── packages/
│ ├── flow/ # Flow builder components and logic
│ ├── typescript-config/ # Shared TypeScript configurations
│ └── ui/ # Shared UI components
-
Install Bun (if not already installed):
curl -fsSL https://bun.sh/install | bash
-
Install dependencies:
bun install
-
Run the development server:
bun run dev
- Start the main app:
cd apps/app bun run dev
- Build individual packages:
cd packages/flow bun run build
The project uses shared TypeScript configurations:
@packages/typescript-config/base.json
- Base configuration@packages/typescript-config/react-library.json
- React-specific settings@packages/typescript-config/vite.json
- Vite-specific settings
Shared UI components library featuring:
- Button
- Card
- Input
- Textarea
- Theme toggle
Extensible flow builder system with:
- Drag-and-drop components
- Node-based architecture
- Registry system for component management
- Canvas implementation
Shared TypeScript configurations for:
- Base projects
- React libraries
- Vite applications
- Bun Runtime: Leverage Bun's native speed for development and testing
- ESM Modules: Use
"type": "module"
in package.json for modern module support - Tree Shaking: Ensure proper ESM exports for optimal bundle sizes
- Shared Configs: Utilize
@packages/typescript-config
for consistent TS settings
dev
: Start development serverbuild
: Build production bundlepreview
: Preview production buildclean
: Remove node_modules
The project uses official Vite plugins:
- @vitejs/plugin-react for Babel-based Fast Refresh
- @vitejs/plugin-react-swc for SWC-based Fast Refresh
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
MIT