{"id":21289204,"url":"https://github.com/hexagontk/hexagonal_starter","last_synced_at":"2025-07-11T14:31:55.277Z","repository":{"id":149996476,"uuid":"617945398","full_name":"hexagontk/hexagonal_starter","owner":"hexagontk","description":"Starter project structured using the Hexagonal Architecture.","archived":false,"fork":false,"pushed_at":"2025-06-28T15:21:51.000Z","size":231,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-28T16:40:15.237Z","etag":null,"topics":["gradle","hacktoberfest","hexagonal-architecture","jvm","kotlin","template"],"latest_commit_sha":null,"homepage":"https://hexagontk.com","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/hexagontk.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},"funding":{"github":["hexagontk"]}},"created_at":"2023-03-23T12:47:57.000Z","updated_at":"2024-12-23T02:24:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"99c8a840-7a69-48f2-bd7e-4d70a5ab86da","html_url":"https://github.com/hexagontk/hexagonal_starter","commit_stats":null,"previous_names":["hexagontk/hexagonal_starter"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/hexagontk/hexagonal_starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexagontk%2Fhexagonal_starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexagontk%2Fhexagonal_starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexagontk%2Fhexagonal_starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexagontk%2Fhexagonal_starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hexagontk","download_url":"https://codeload.github.com/hexagontk/hexagonal_starter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexagontk%2Fhexagonal_starter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264833277,"owners_count":23670617,"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":["gradle","hacktoberfest","hexagonal-architecture","jvm","kotlin","template"],"created_at":"2024-11-21T12:35:51.545Z","updated_at":"2025-07-11T14:31:54.922Z","avatar_url":"https://github.com/hexagontk.png","language":"Kotlin","readme":"\n# Hexagonal Starter Application\nThis is a Hexagon service created from a template.\n\n## Architecture\nThis starter project is a sample application structured using the [Hexagonal Architecture].\n\n[Hexagonal Architecture]: https://fideloper.com/hexagonal-architecture\n\n### Packages\nThis is the package structure and access rules for each package:\n\n* *org.example.domain.model* : your application model, would be ok to access the *domain* package\n* *org.example.domain* : application logic (use cases), holds the *driven* ports, outside access\n  forbidden\n* *org.example.adapters* : implementation of the domain (driven) ports\n* *org.example.rest* : REST API implementation, this is an input (or driver) adapter\n* *org.example* : application main class, which builds the input drivers injecting the proper\n  adapters\n\nThere is only a big and only rule you must comply with, and that is:\n\n\u003e Don't use anything outside the standard library on the domain package (and its subpackages)\n\nThe rest are just details and can be bent to your needs on a great degree.\n\nYou don't even have to name ports as `*Port`, `AppointmentNotifier` or `AppointmentStore` would be\nfine names without the `Port` suffix. Just discuss with your team, and pick whatever fits you all\nthe best.\n\nThis structure is not set on stone and will probably change when your application grows. I.e.:\nsplitting packages by concern (`domain.appointments`, `domain.users`, `adapters.store`,\n`adapters.notifier`, etc.).\n\nAs an alternative, a more orthodox package structure could be:\n\n* *org.example.domain.model*\n* *org.example.domain*\n* *org.example.(output|driven).adapters*\n* *org.example.(input|driver).rest*\n* *org.example.(input|driver).cli* (hypothetical extra input/driver adapter)\n* *org.example*\n\nOr a more flat structure could be:\n\n* *org.example.domain.model*\n* *org.example.domain*\n* *org.example.store*\n* *org.example.notifier*\n* *org.example.rest*\n* *org.example.cli* (hypothetical extra input/driver adapter)\n* *org.example*\n\nI would say it is ok to structure the adapter packages the way it makes more sense to you. And also,\nthere is not a lot of value on creating input ports (just the adapters would be fine).\n\n### Architecture Diagram\n![Architecture Diagram](https://hexagontk.com/img/architecture.svg)\n\n## Software Requirements\nTo build the application you will need:\n* JDK 11+ for compiling the sources.\n* An Internet connection to download the dependencies.\n\nTo run the application:\n* For the Gradle distribution: JRE 11+ is required (JDK is not required at runtime).\n* For the jpackage bundle: any major OS will run it (Alpine Linux causes problems).\n* To run the native executable there is no specific requirements.\n\n## Development\n* Build: `./gradlew build`\n* Rebuild: `./gradlew clean build`\n* Run: `./gradlew run`\n* Test (*\\*Test*): `./gradlew test`\n* Integration Test (*\\*IT*): `./gradlew verify`\n* Test Coverage: `./gradlew jacocoTestReport`\n\nThe reports are located in the `build/reports` directory after building the project.\n\n## Gradle Wrapper Setup\nYou can change the Gradle version in `gradle/wrapper/gradle-wrapper.properties`.\n\n## Usage\nAfter building the project (`./gradlew build`), archives with the application's distributions are\nstored in `build/distributions`.\n\nTo install the application you just need to unpack one distribution file.\n\nAfter installing the application, you can run the application executing the `bin/hexagonal_starter`\nscript.\n\nOnce the application is running, you can send a request using [httpie] executing:\n`http :9090/api/appointments id='a' userIds:='[\"mike\", \"jena\"]' start=$(isodate) end=$(isodate)`\nassuming: `alias isodate='date +\"%Y-%m-%dT%H:%M:%S\"'`\n\n[httpie]: https://httpie.io\n\n## Native Image\n```bash\n./gradlew -P agent test\n./gradlew metadataCopy\n./gradlew nativeCompile\n\n# Executable\nbuild/native/nativeCompile/gradle_starter\n\n# Memory\nps -o rss -C gradle_starter\n```\n","funding_links":["https://github.com/sponsors/hexagontk"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhexagontk%2Fhexagonal_starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhexagontk%2Fhexagonal_starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhexagontk%2Fhexagonal_starter/lists"}