{"id":22307744,"url":"https://github.com/albertllousas/team-management-microservice","last_synced_at":"2025-07-29T05:32:19.152Z","repository":{"id":45797306,"uuid":"410834284","full_name":"albertllousas/team-management-microservice","owner":"albertllousas","description":"Team management service is a production ready and fully tested service that can be used as a template for a microservices development.","archived":false,"fork":false,"pushed_at":"2024-06-17T06:30:58.000Z","size":3861,"stargazers_count":27,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-05T08:51:14.001Z","etag":null,"topics":["domain-driven-design","event-driven-architecture","functional-programming","hexagonal-architecture","hexagonal-architectures","kafka","microservices","spring-boot","transactional-outbox-pattern"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/albertllousas.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":"2021-09-27T10:10:39.000Z","updated_at":"2024-07-02T17:38:20.000Z","dependencies_parsed_at":"2024-12-03T20:11:38.220Z","dependency_job_id":"7d9b6be9-036f-4637-960b-9a061aeb9d0a","html_url":"https://github.com/albertllousas/team-management-microservice","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/albertllousas/team-management-microservice","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/albertllousas%2Fteam-management-microservice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/albertllousas%2Fteam-management-microservice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/albertllousas%2Fteam-management-microservice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/albertllousas%2Fteam-management-microservice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/albertllousas","download_url":"https://codeload.github.com/albertllousas/team-management-microservice/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/albertllousas%2Fteam-management-microservice/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267633670,"owners_count":24118777,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["domain-driven-design","event-driven-architecture","functional-programming","hexagonal-architecture","hexagonal-architectures","kafka","microservices","spring-boot","transactional-outbox-pattern"],"created_at":"2024-12-03T20:11:29.604Z","updated_at":"2025-07-29T05:32:17.375Z","avatar_url":"https://github.com/albertllousas.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# team-mgmt-service\n\n## Description\n\nTeam management service is a production ready and fully tested service that can be used as a template for a microservice \ndevelopment.\n\nKeywords: `microservices`, `Hexagonal-Architecture`, `SOLID`, `Domain-Driven Design`, `functional-programming`, \n`Testing`, `Event-Driven Architecture`, `Domain-Events`, `Transactional-outbox`\n\nTech-stack: `kotlin`, `Kafka`, `spring-boot`, `PostgreSQL`, `JUnit5`, `Arrow`\n\n## Overview\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"100%\" src=\"./team-mgmt-service.png\"\u003e\n\u003c/p\u003e\n\n## Use-cases\n\n- Create a team\n- Add person as a team member\n- Remove person as a team member\n\n### Use-case diagram\n\nExample of how a use-case looks like:\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"100%\" src=\"./use-case.png\"\u003e\n\u003c/p\u003e\n\n\n## Architectural Patterns\n\nThis project has been built using **[hexagonal architecture](https://alistair.cockburn.us/hexagonal-architecture/) (aka [ports \u0026 adapters](https://jmgarridopaz.github.io/content/hexagonalarchitecture.html))**, a domain-centric architectural pattern that use\n**[dependency inversion](https://blog.cleancoder.com/uncle-bob/2016/01/04/ALittleArchitecture.html)** as main principle behind. It also uses **tactical DDD patterns** in the domain layer.\n\n### Package structure\n\n- Application: Application Services (the use cases)\n- Domain: Domain model and ports.\n- Infrastructure: Adapters, configuration and infrastructure code.\n\n### Architectural shortcuts\n\nEven though the project follows hexagonal architecture, it also takes some shortcuts, breaking consciously\nsome architectural constraints:\n\n- **Skipping incoming ports**: Incoming adapters are accessing application services directly.\n\n## Messaging patterns\n\nIn order to avoid [dual writes](https://thorben-janssen.com/dual-writes/) the project uses a couple of patterns:\n- [transactional-outbox](https://microservices.io/patterns/data/transactional-outbox.html)\n- [polling-publisher](https://microservices.io/patterns/data/polling-publisher.html)\n\n## Events\n\n### Domain events\n\nA Domain-event is something that happened in the domain that is important to the business.\n\nThis service advocates for asynchronous communication instead of exposing endpoints to be consumed by clients. To do so \n, since the service uses also domain-driven design tactical patterns, all use-cases are producing domain-events:\n- [Team Created](/src/main/kotlin/com/teammgmt/domain/model/DomainEvents.kt)\n- [Team Member Joined](/src/main/kotlin/com/teammgmt/domain/model/DomainEvents.kt)\n- [Team Member Left](/src/main/kotlin/com/teammgmt/domain/model/DomainEvents.kt)\n\n### Integration events\n\nAn integration event is a committed event that ocurred in the past within a bounded context which may be interesting to other\ndomains, applications or third party services, so it is the sibling of a domain event but for the external world.\n\nWhy not to publish our domain events directly? We can not publish our domain events directly for several reasons:\n- Back-ward compatibility: We should provide a way to maintain backward compatibility, if we were publishing our domain events we would couple them to the external contracts.\n- Different schema for messages: In almost all the companies using event-driven these messages are defined in a different schema such as avro, protobuf or json schema.\n- We don't want to publish all domain-events: Sometimes we don't want to publish to our consumers all our internal domain events.\n\nHere the [contracts](/src/main/kotlin/com/teammgmt/infrastructure/adapters/outbound/event/IntegrationTeamEvents.kt)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falbertllousas%2Fteam-management-microservice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falbertllousas%2Fteam-management-microservice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falbertllousas%2Fteam-management-microservice/lists"}