{"id":28504927,"url":"https://github.com/mona-chen/microbun","last_synced_at":"2025-07-06T12:32:17.033Z","repository":{"id":291798794,"uuid":"978810260","full_name":"mona-chen/microbun","owner":"mona-chen","description":"A flexible, extensible microservice boilerplate built with Bun/Node.js, Express, and TypeScript. MicroBun provides a solid foundation for building scalable, event-driven microservices without the constraints of heavy frameworks.","archived":false,"fork":false,"pushed_at":"2025-05-06T15:06:02.000Z","size":412,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-08T18:48:12.060Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/mona-chen.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-05-06T14:41:06.000Z","updated_at":"2025-05-06T15:06:05.000Z","dependencies_parsed_at":"2025-05-06T16:49:25.748Z","dependency_job_id":null,"html_url":"https://github.com/mona-chen/microbun","commit_stats":null,"previous_names":["mona-chen/microbun"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mona-chen/microbun","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mona-chen%2Fmicrobun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mona-chen%2Fmicrobun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mona-chen%2Fmicrobun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mona-chen%2Fmicrobun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mona-chen","download_url":"https://codeload.github.com/mona-chen/microbun/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mona-chen%2Fmicrobun/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263900823,"owners_count":23527323,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2025-06-08T18:32:03.668Z","updated_at":"2025-07-06T12:32:17.027Z","avatar_url":"https://github.com/mona-chen.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MicroBun\n\nA flexible, extensible microservice boilerplate built with Bun/Node.js, Express, and TypeScript. MicroBun provides a solid foundation for building scalable, event-driven microservices without the constraints of heavy frameworks.\n\n## Features\n\n- **Modular Architecture**: Clean separation of concerns with a well-organized directory structure\n- **Event-Driven Communication**: Built-in RabbitMQ integration for reliable service communication\n- **Notification Service**: Ready-to-use email and SMS notification capabilities\n- **TypeScript**: Full TypeScript support for better developer experience and type safety\n- **Docker Ready**: Docker and docker-compose configurations for easy deployment\n- **Environment Management**: Robust configuration system for different environments\n- **Extensible**: Easily add new microservices to the ecosystem\n- **Runtime Flexibility**: Works with both Bun and Node.js runtimes\n\n## Project Structure\n\n```\n├── apps/                      # Microservice applications\n│   ├── api/                   # API Gateway service\n│   ├── notifications/         # Notification service\n│   └── service-registry/      # Service discovery and registry\n├── shared/                    # Shared code and utilities\n│   ├── config/                # Configuration management\n│   ├── constants/             # Shared constants\n│   ├── events/                # Event management (RabbitMQ)\n│   ├── utils/                 # Utility functions\n│   └── views/                 # Email templates\n├── docs/                      # Documentation\n└── docker-compose.yml         # Docker compose configuration\n```\n\n## Getting Started\n\n### Prerequisites\n\n- Bun (recommended) or Node.js v16+\n- Docker and docker-compose (for containerized deployment)\n- RabbitMQ (included in docker-compose)\n\n### Installation\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/mona-chen/microbun.git\n   cd microbun\n   ```\n\n2. Install dependencies:\n   ```bash\n   # With Bun (recommended)\n   bun install\n\n   # With npm\n   npm install\n   ```\n\n3. Set up environment variables:\n   ```bash\n   cp .env.example .env\n   # Edit .env with your configuration\n   ```\n\n4. Start the services:\n   ```bash\n   # Development mode with Bun\n   bun run dev\n\n   # With Docker\n   docker-compose up\n   ```\n\n## Available Services\n\n### Notification Service\n\nThe notification service handles sending various types of notifications through different channels:\n\n- Email notifications (using configurable providers)\n- SMS notifications\n- Support for templated messages\n- Queue-based processing for reliability\n\n### API Gateway\n\nA lightweight API gateway that routes requests to appropriate microservices:\n\n- Request routing\n- Authentication middleware\n- Rate limiting\n- Proxy capabilities\n\n### Service Registry\n\nSimple service discovery and health monitoring:\n\n- Service registration\n- Health checks\n- Service metadata\n\n## Adding New Services\n\nTo create a new microservice:\n\n1. Create a new directory in the `apps/` folder\n2. Copy the basic structure from an existing service\n3. Update the service-specific code\n4. Register the service in docker-compose.yml\n5. Add any necessary queues or exchanges in shared/events\n\n## Configuration\n\nConfiguration is managed through environment variables and the shared configuration system:\n\n- `.env` - Environment-specific variables\n- `shared/config/` - Configuration management\n- Service-specific configurations in each service directory\n\n## Development\n\n```bash\n# Start all services in development mode\nbun run dev\n\n# Start a specific service\nbun run dev:notifications\n\n# Run tests\nbun test\n\n# Build for production\nbun run build\n```\n\n## Deployment\n\nMicroBun includes Docker configurations for easy deployment:\n\n```bash\n# Development environment\ndocker-compose up\n\n# Production environment\ndocker-compose -f docker-compose.prod.yml up\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmona-chen%2Fmicrobun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmona-chen%2Fmicrobun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmona-chen%2Fmicrobun/lists"}