{"id":30137864,"url":"https://github.com/develop-programs/monorepo-bun","last_synced_at":"2026-05-03T23:33:51.476Z","repository":{"id":308890545,"uuid":"1034471895","full_name":"develop-programs/monorepo-bun","owner":"develop-programs","description":"A monorepo using bun.js to speedtrack your project","archived":false,"fork":false,"pushed_at":"2025-08-08T12:58:48.000Z","size":48,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-08T14:43:10.738Z","etag":null,"topics":["bunjs","react","typescript-react"],"latest_commit_sha":null,"homepage":"","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/develop-programs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-08T12:51:44.000Z","updated_at":"2025-08-08T13:00:47.000Z","dependencies_parsed_at":"2025-08-08T14:53:19.601Z","dependency_job_id":null,"html_url":"https://github.com/develop-programs/monorepo-bun","commit_stats":null,"previous_names":["develop-programs/monorepo-bun"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/develop-programs/monorepo-bun","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/develop-programs%2Fmonorepo-bun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/develop-programs%2Fmonorepo-bun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/develop-programs%2Fmonorepo-bun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/develop-programs%2Fmonorepo-bun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/develop-programs","download_url":"https://codeload.github.com/develop-programs/monorepo-bun/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/develop-programs%2Fmonorepo-bun/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32589256,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"ssl_error","status_checked_at":"2026-05-03T22:09:10.534Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bunjs","react","typescript-react"],"created_at":"2025-08-11T01:01:22.310Z","updated_at":"2026-05-03T23:33:51.460Z","avatar_url":"https://github.com/develop-programs.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bun Structured Monorepo\n\nA powerful and scalable **full-stack monorepo starter** built using [Bun](https://bun.sh), designed for modern web development. This project uses **Bun Workspaces** to manage multiple applications—web frontend, admin dashboard, and backend server—under a single, efficient monorepo setup.\n\n---\n\n## 🧠 Why Use a Monorepo?\n\nMonorepos bring together multiple related projects in a single codebase, enabling:\n\n- 🔁 **Code Reusability** – Share utilities, configurations, and components across apps\n- 🚀 **Faster Development** – Use one install command (`bun install`) for all projects\n- 🧪 **Unified Testing \u0026 Linting** – Maintain consistent code quality across the stack\n- 🧹 **Simplified Refactoring** – Update shared logic across apps with a single PR\n- 🚰 **Effortless DevOps** – Centralized dependency management and build tools\n\nThis template is perfect for teams or individuals looking to build scalable multi-app systems like SaaS, CMS, marketplaces, or admin panels.\n\n---\n\n## 🛠 How to Use This Monorepo Template\n\n1. **Clone the repository:**\n\n   ```bash\n   git clone https://github.com/develop-programs/monorepo-bun.git\n   cd bun-structured-monorepo\n   ```\n\n2. **Install all dependencies:**\n\n   ```bash\n   bun install\n   ```\n\n3. **Start all apps in dev mode:**\n\n   ```bash\n   bun run dev\n   ```\n\nThis will simultaneously run:\n\n- **Web frontend** (`apps/web`)\n- **Admin dashboard** (`apps/admin`)\n- **Backend API server** (`apps/server`)\n\n---\n\n## 🔧 What Can You Modify?\n\nYou can fully customize each application independently or extend the monorepo with new apps and packages.\n\n### ✨ Add Features or Apps\n\n- Add a **mobile app**, **shared UI component library**, or **design system**\n- Integrate a **new backend service** (e.g., microservices)\n- Create a **shared utils package** under a `/packages/` folder\n\n### 🌟 Customize Tech Stack\n\n- Replace Express.js with **Fastify**, **NestJS**, or other backend frameworks\n- Use different front-end stacks (e.g., **Next.js** or **Vue**) in new apps\n- Swap out database drivers, authentication methods, or email services\n\n### 🧪 Enhance CI/CD\n\n- Integrate with GitHub Actions, GitLab CI, or any pipeline system\n- Use versioning tools like Changesets for managing monorepo releases\n\n### 🛡 Improve Security\n\n- Configure stricter CORS policies\n- Add authentication middleware (JWT, OAuth, etc.)\n- Use custom helmet rules or rate-limiting\n\n---\n\n## 🎯 Who is this for?\n\n- **Junior developers** learning monorepo architecture\n- **Students** exploring full-stack development\n- **Developers** wanting a modern Bun-based setup\n- **Teams** needing a structured project foundation\n\n## ✨ What you get\n\n- 🚀 Modern React 19 + TypeScript setup\n- 📆 Bun workspaces for efficient monorepo management\n- 🎨 Pre-configured Vite for lightning-fast development\n- 🔧 ESLint configuration for code quality\n- 🏗️ Three ready-to-customize applications\n- 📱 Responsive design foundation\n- 🛠️ Development and production scripts\n- ⚡ Ultra-fast package management with Bun\n\n## 🏗️ Project Structure\n\n```\nbun-structured-monorepo/\n├── apps/\n│   ├── web/          # Main frontend application (React + Vite)\n│   ├── admin/        # Admin dashboard (React + Vite)\n│   └── server/       # Backend API (Express.js)\n├── package.json      # Root workspace configuration\n└── tsconfig.json     # Shared TypeScript configuration\n```\n\n## 🚀 Quick Start\n\n### Prerequisites\n\n- [Bun](https://bun.sh) (required for this template)\n- Git\n- Basic knowledge of React and TypeScript\n\n### Installation\n\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/develop-programs/monorepo-bun.git\ncd bun-structured-monorepo\n```\n\n2. Install dependencies for all workspaces:\n\n```bash\nbun install\n```\n\n3. Start all applications:\n\n```bash\nbun run dev\n```\n\n## 🔧 Development\n\n### Run all applications simultaneously\n\n```bash\nbun run dev\n```\n\nThis starts:\n\n- **Web** (port 5173): Main frontend application\n- **Admin** (port 8080): Admin dashboard\n- **Server** (port 3000): Backend API\n\n### Run individual applications\n\n```bash\n# Web frontend only\nbun run dev:web\n\n# Admin dashboard only\nbun run dev:admin\n\n# Backend server only\nbun run dev:server\n```\n\n## 📦 Applications\n\n### Web App (`apps/web/`)\n\n- **Tech Stack**: React 19, TypeScript, Vite\n- **Port**: 5173 (development)\n- **Purpose**: Main frontend application\n\n**Key files:**\n\n- `src/App.tsx` - Main application component\n- `vite.config.ts` - Vite configuration\n- `package.json` - Web app dependencies\n\n### Admin App (`apps/admin/`)\n\n- **Tech Stack**: React 19, TypeScript, Vite\n- **Port**: 8080 (development)\n- **Purpose**: Admin dashboard interface\n\n**Key files:**\n\n- `src/App.tsx` - Admin dashboard component\n- `vite.config.ts` - Vite configuration with custom port\n- `package.json` - Admin app dependencies\n\n### Server App (`apps/server/`)\n\n- **Tech Stack**: Express.js, Node.js\n- **Port**: 3000 (default)\n- **Purpose**: Backend API and services\n\n**Key dependencies:**\n\n- Express.js for API routing\n- Mongoose for MongoDB integration\n- Nodemailer for email services\n- CORS, Helmet, Morgan for middleware\n\n## 🛠️ Available Scripts\n\n### Root Level Scripts\n\n```bash\n# Development\nbun run dev          # Start all apps in development mode\nbun run dev:web      # Start only web app\nbun run dev:admin    # Start only admin app\nbun run dev:server   # Start only server app\n\n# Production\nbun run start        # Start all apps in production mode\nbun run start:web    # Start only web app (production)\nbun run start:admin  # Start only admin app (production)\nbun run start:server # Start only server app (production)\n\n# Build\nbun run build        # Build web and admin apps\nbun run build:web    # Build only web app\nbun run build:admin  # Build only admin app\n```\n\n### Individual App Scripts\n\nEach app has its own scripts in their respective `package.json`:\n\n**Web \u0026 Admin:**\n\n- `bun run dev` - Development server\n- `bun run build` - Production build\n- `bun run preview` - Preview production build\n- `bun run lint` - ESLint checking\n\n**Server:**\n\n- `bun run dev` - Development with nodemon\n\n## 🔄 Making Changes\n\n### Adding a New Feature to Web App\n\n1. Navigate to `apps/web/`\n2. Create components in `src/components/`\n3. Update `src/App.tsx` or create new routes\n4. Run `bun run dev:web` to test\n\n### Adding a New Feature to Admin App\n\n1. Navigate to `apps/admin/`\n2. Create admin components in `src/components/`\n3. Update `src/App.tsx`\n4. Run `bun run dev:admin` to test\n\n### Adding API Endpoints\n\n1. Navigate to `apps/server/src/`\n2. Create route files (e.g., `routes/api.js`)\n3. Update `index.js` to include new routes\n4. Run `bun run dev:server` to test\n\n### Adding Dependencies\n\n**For a specific app:**\n\n```bash\n# Web app\ncd apps/web \u0026\u0026 bun add \u003cpackage-name\u003e\n\n# Admin app\ncd apps/admin \u0026\u0026 bun add \u003cpackage-name\u003e\n\n# Server app\ncd apps/server \u0026\u0026 bun add \u003cpackage-name\u003e\n```\n\n**For the entire workspace:**\n\n```bash\n# From root directory\nbun add \u003cpackage-name\u003e -w\n```\n\n## 🔧 Configuration\n\n### TypeScript\n\nShared TypeScript configuration is in the root `tsconfig.json`. Individual apps extend this configuration.\n\n### Environment Variables\n\nCreate `.env` files in each app directory as needed:\n\n- `apps/web/.env`\n- `apps/admin/.env`\n- `apps/server/.env`\n\n### Ports\n\nDefault development ports:\n\n- Web: 5173\n- Admin: 8080\n- Server: 3000\n\nModify ports in respective `vite.config.ts` files or server configuration.\n\n## 🚀 Deployment\n\n### Building for Production\n\n```bash\nbun run build\n```\n\nThis builds both the web and admin applications. For the server, no build step is required as it runs directly.\n\n### Individual Builds\n\n```bash\nbun run build:web    # Build web app only\nbun run build:admin  # Build admin app only\n```\n\n## 🎓 Why Bun Workspaces?\n\n- ⚡ Lightning fast - Bun's package manager is significantly faster than npm/yarn\n- 🔧 Zero configuration - Works out of the box with sensible defaults\n- 📦 Efficient dependency management - Shared dependencies across workspaces\n- 🏗️ Modern tooling - Built for modern JavaScript/TypeScript projects\n- 🔄 Hot reloading - Fast development feedback loop\n\n## 📝 Notes\n\n- This project uses **Bun workspaces** for monorepo management\n- The server app uses CommonJS modules while web/admin use ES modules\n- All React apps use React 19 with TypeScript\n- ESLint is configured for code quality in React apps\n- Optimized for Bun's fast package installation and execution\n\n## 🤝 Contributing\n\n1. Fork the repository\n2. Create a feature branch: `git checkout -b feature/new-feature`\n3. Make changes in the appropriate app directory\n4. Test your changes: `bun run dev`\n5. Commit your changes: `git commit -m 'Add new feature'`\n6. Push to the branch: `git push origin feature/new-feature`\n7. Submit a pull request\n\n## 📚 Repositories\n\n- **GitHub**: [https://github.com/develop-programs/monorepo-bun](https://github.com/develop-programs/monorepo-bun)\n- **NPM**: [https://www.npmjs.com/package/bun-monorepo-template](https://www.npmjs.com/package/bun-monorepo-template)\n\n## 🏃‍♂️ Getting Started Examples\n\n### Build a Multi-tenant SaaS\n\n- Use **web** for landing page\n- Use **admin** for user dashboard\n- Use **server** for API and auth\n\n### Create an E-commerce Platform\n\n- Use **web** for storefront\n- Use **admin** for inventory management\n- Use **server** for orders and payments\n\n### Develop a Content Management System\n\n- Use **web** for public website\n- Use **admin** for content editing\n- Use **server** for content API\n\n## 📧 Contact\n\n**Author**: Shreyansh Awadhiya\n\nFor questions or support, please open an issue in the repository.\n\n---\n\n**Built with ⚡ Bun for the modern web**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevelop-programs%2Fmonorepo-bun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevelop-programs%2Fmonorepo-bun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevelop-programs%2Fmonorepo-bun/lists"}