{"id":41162817,"url":"https://github.com/samber/do-template-worker","last_synced_at":"2026-01-22T19:25:37.444Z","repository":{"id":316590272,"uuid":"1064020194","full_name":"samber/do-template-worker","owner":"samber","description":"🛠️ Worker boilerplate showcasing github.com/samber/do","archived":false,"fork":false,"pushed_at":"2025-09-25T13:06:52.000Z","size":23,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-11T02:38:26.410Z","etag":null,"topics":["boilerplate","container","dependency-injection","di","dig","do","fix","go","graceful-shutdown","injector","invoke","ioc","provide","template","wire","worker"],"latest_commit_sha":null,"homepage":"https://github.com/samber/do","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samber.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-25T12:36:17.000Z","updated_at":"2025-09-27T13:59:02.000Z","dependencies_parsed_at":"2025-09-25T14:41:44.198Z","dependency_job_id":null,"html_url":"https://github.com/samber/do-template-worker","commit_stats":null,"previous_names":["samber/do-template-worker"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/samber/do-template-worker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samber%2Fdo-template-worker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samber%2Fdo-template-worker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samber%2Fdo-template-worker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samber%2Fdo-template-worker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samber","download_url":"https://codeload.github.com/samber/do-template-worker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samber%2Fdo-template-worker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28669092,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T17:07:18.858Z","status":"ssl_error","status_checked_at":"2026-01-22T17:05:02.040Z","response_time":144,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["boilerplate","container","dependency-injection","di","dig","do","fix","go","graceful-shutdown","injector","invoke","ioc","provide","template","wire","worker"],"created_at":"2026-01-22T19:25:36.680Z","updated_at":"2026-01-22T19:25:37.428Z","avatar_url":"https://github.com/samber.png","language":"Go","readme":"\n# Worker boilerplate showcasing github.com/samber/do\n\n![Go Version](https://img.shields.io/badge/Go-%3E%3D%201.23-%23007d9c)\n![Build Status](https://github.com/samber/do-template-worker/actions/workflows/test.yml/badge.svg)\n[![Go report](https://goreportcard.com/badge/github.com/samber/do-template-worker)](https://goreportcard.com/report/github.com/samber/do)\n[![License](https://img.shields.io/github/license/samber/do-template-worker)](./LICENSE)\n\n**⚙️ A comprehensive worker template demonstrating the `github.com/samber/do` dependency injection library.**\n\nThis project showcases the full power of the `samber/do` dependency injection library in the context of a message-driven worker application. It implements a complete pub/sub worker with PostgreSQL integration and RabbitMQ messaging, demonstrating how `do` enables clean, modular, and testable worker architectures.\n\nPerfect as a starting point for message-driven Go projects or as a learning resource for understanding dependency injection in worker applications.\n\n**See also:**\n\n- [do-template-api](https://github.com/samber/do-template-api)\n- [do-template-cli](https://github.com/samber/do-template-cli)\n\n## 🚀 Install\n\nClone the repo and install dependencies:\n\n```bash\ngit clone --depth 1 --branch main https://github.com/samber/do-template-worker.git your-project-name\ncd your-project-name\n\ndocker compose up -d\nmake deps\nmake deps-tools\n```\n\n## 💡 Features\n\n- **Type-safe dependency injection** - Service registration and resolution using `samber/do`\n- **Message-driven architecture** - Complete pub/sub worker with RabbitMQ consumer and producer\n- **Database integration** - PostgreSQL with connection pooling and repository pattern\n- **Modular architecture** - Clean separation of concerns with dependency tree visualization\n- **Configuration management** - Environment-based configuration with dependency injection\n- **Service lifecycle management** - Health checks and graceful shutdown handling\n- **Repository pattern** - Data access layer with injected dependencies\n- **Worker patterns** - Business logic with proper dependency management\n- **Application lifecycle** - Health checks and graceful shutdown handling\n- **Comprehensive error handling** - Structured logging and error management\n- **Production-ready** - Ready to fork and customize for your next worker project\n- **Extensive documentation** - Inline comments explaining every `do` library feature\n\n## 🚀 Contributing\n\n```sh\n# install deps\nmake deps\nmake deps-tools\n\n# compile\nmake build\n\n# build with hot-reload\nmake watch-run\n\n# test with hot-reload\nmake watch-test\n```\n\n## 🤠 `do` documentation\n\n- [GoDoc: https://godoc.org/github.com/samber/do/v2](https://godoc.org/github.com/samber/do/v2)\n- [Documentation](https://do.samber.dev/docs/getting-started)\n\n## 💫 Show your support\n\nGive a ⭐️ if this project helped you!\n\n[![GitHub Sponsors](https://img.shields.io/github/sponsors/samber?style=for-the-badge)](https://github.com/sponsors/samber)\n\n## 📝 License\n\nCopyright © 2025 [Samuel Berthe](https://github.com/samber).\n\nThis project is [MIT](./LICENSE) licensed.\n","funding_links":["https://github.com/sponsors/samber"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamber%2Fdo-template-worker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamber%2Fdo-template-worker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamber%2Fdo-template-worker/lists"}