{"id":24862354,"url":"https://github.com/prayag2003/buildflow","last_synced_at":"2026-03-13T23:01:48.300Z","repository":{"id":272794615,"uuid":"855701007","full_name":"Prayag2003/BuildFlow","owner":"Prayag2003","description":"Buildflow: Vercel Alternative Built on AWS","archived":false,"fork":false,"pushed_at":"2025-03-18T15:21:48.000Z","size":216,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T17:24:56.370Z","etag":null,"topics":["aws","deployment","reverse-proxy","s3-bucket","typescript","vercel"],"latest_commit_sha":null,"homepage":"","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/Prayag2003.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}},"created_at":"2024-09-11T10:16:01.000Z","updated_at":"2025-03-18T15:21:52.000Z","dependencies_parsed_at":"2025-01-16T17:54:33.040Z","dependency_job_id":"aecbaad1-c91d-4899-a9e7-83549f0c23a9","html_url":"https://github.com/Prayag2003/BuildFlow","commit_stats":null,"previous_names":["prayag2003/novadeploy"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prayag2003%2FBuildFlow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prayag2003%2FBuildFlow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prayag2003%2FBuildFlow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Prayag2003%2FBuildFlow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Prayag2003","download_url":"https://codeload.github.com/Prayag2003/BuildFlow/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248644460,"owners_count":21138588,"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":["aws","deployment","reverse-proxy","s3-bucket","typescript","vercel"],"created_at":"2025-01-31T22:52:59.131Z","updated_at":"2026-03-13T23:01:48.227Z","avatar_url":"https://github.com/Prayag2003.png","language":"TypeScript","readme":"# Microservices Build System\n\nA distributed build system that enables automated deployment of microservices using GitHub, AWS ECS, and S3 storage.\n\n## Theory and Concepts\n\n### Microservices Architecture\n\nThe system follows microservices principles, breaking down the build process into independent, loosely-coupled services. This architecture enables:\n\n- Independent scaling of build workers\n- Isolation of concerns\n- Improved fault tolerance\n- Easier maintenance and updates\n\n### Event-Driven Architecture\n\nThe system operates on an event-driven model where:\n\n1. GitHub webhooks trigger build events\n2. API server processes these events asynchronously\n3. Build servers react to build requests\n4. S3 storage captures build artifacts\n   This approach enables loose coupling and high scalability.\n\n## System Architecture\n\nThe system consists of three main components:\n\n### 1. API Server\n\nA Node.js/TypeScript server that handles incoming webhook events from GitHub and manages the build process. It coordinates with the build servers and provides status updates.\n\n### 2. Build Server\n\nContainerized build environments running in AWS ECS that execute the actual build processes. Multiple build servers can run in parallel to handle concurrent builds.\n\n### 3. S3 Reverse Proxy\n\nA service that manages secure access to build artifacts stored in AWS S3, providing controlled access to build outputs.\n\n## Project Structure\n\n```\n.\n├── api-server/               # Main API service\n│   ├── index.ts             # Server entry point\n│   ├── package.json         # Dependencies and scripts\n│   ├── pnpm-lock.yaml       # Lock file for dependencies\n│   └── tsconfig.json        # TypeScript configuration\n│\n├── assets/                  # Project assets\n│   └── HLD.png             # High-level design diagram\n│\n├── build-server/           # Build service\n│   ├── Dockerfile          # Container definition\n│   ├── main.sh            # Build orchestration script\n│   ├── package.json       # Dependencies and scripts\n│   ├── pnpm-lock.yaml     # Lock file for dependencies\n│   ├── script.ts          # Build logic\n│   └── tsconfig.json      # TypeScript configuration\n│\n└── s3-reverse-proxy/      # S3 proxy service\n    ├── index.ts           # Proxy entry point\n    ├── package.json       # Dependencies and scripts\n    ├── pnpm-lock.yaml     # Lock file for dependencies\n    └── tsconfig.json      # TypeScript configuration\n```\n\n## Prerequisites\n\n- Node.js 18 or higher\n- pnpm package manager\n- Docker\n- AWS Account with configured credentials\n- GitHub repository with appropriate webhook configuration\n\n## Setup Instructions\n\n1. **API Server Setup**\n\n```bash\ncd api-server\npnpm install\npnpm build\npnpm start\n```\n\n2. **Build Server Setup**\n\n```bash\ncd build-server\ndocker build -t build-server .\n# Configure AWS ECS task definition and service\n```\n\n3. **S3 Reverse Proxy Setup**\n\n```bash\ncd s3-reverse-proxy\npnpm install\npnpm build\npnpm start\n```\n\n## Configuration\n\n### API Server\n\nCreate a `.env` file in the `api-server` directory:\n\n```env\nPORT=3000\nGITHUB_WEBHOOK_SECRET=your_webhook_secret\nAWS_REGION=your_aws_region\n```\n\n### Build Server\n\nConfigure the following environment variables in your ECS task definition:\n\n```env\nAWS_ACCESS_KEY_ID=your_access_key\nAWS_SECRET_ACCESS_KEY=your_secret_key\nBUILD_TIMEOUT=3600\n```\n\n### S3 Reverse Proxy\n\nCreate a `.env` file in the `s3-reverse-proxy` directory:\n\n```env\nPORT=3001\nAWS_REGION=your_aws_region\nS3_BUCKET=your_bucket_name\n```\n\n## Usage\n\n1. Configure your GitHub repository to send webhook events to your API server endpoint.\n2. When a push event is received, the API server will:\n      - Validate the webhook signature\n      - Create a new build task in ECS\n      - Monitor build progress\n      - Store build artifacts in S3\n3. Access build artifacts through the S3 reverse proxy using appropriate authentication.\n\n## Development\n\n### Running Locally\n\nEach service can be run locally for development:\n\n```bash\n# API Server\ncd api-server\npnpm dev\n\n# Build Server\ncd build-server\npnpm dev\n\n# S3 Reverse Proxy\ncd s3-reverse-proxy\npnpm dev\n```\n\n### Testing\n\nEach service includes its own test suite:\n\n```bash\n# Run tests for any service\npnpm test\n```\n\n## Deployment\n\n### API Server\n\n1. Build the TypeScript code:\n\n```bash\ncd api-server\npnpm build\n```\n\n2. Deploy using your preferred hosting solution (e.g., AWS ECS, EC2)\n\n### Build Server\n\n1. Build and push the Docker image:\n\n```bash\ncd build-server\ndocker build -t build-server .\ndocker push your-registry/build-server\n```\n\n2. Update ECS task definition and service\n\n### S3 Reverse Proxy\n\n1. Build the TypeScript code:\n\n```bash\ncd s3-reverse-proxy\npnpm build\n```\n\n2. Deploy using your preferred hosting solution\n\n## Security\n\n- All services use HTTPS for communication\n- GitHub webhooks are validated using secrets\n- AWS resources are protected using IAM roles and policies\n- S3 access is controlled through the reverse proxy\n- Environment variables are used for sensitive configuration\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprayag2003%2Fbuildflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprayag2003%2Fbuildflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprayag2003%2Fbuildflow/lists"}