{"id":19506996,"url":"https://github.com/zalbia/zio-structure","last_synced_at":"2026-07-07T06:31:15.562Z","repository":{"id":200932395,"uuid":"208187681","full_name":"zalbia/zio-structure","owner":"zalbia","description":"Just learning how to structure ZIO programs","archived":false,"fork":false,"pushed_at":"2020-02-23T15:26:27.000Z","size":92,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-25T23:37:31.092Z","etag":null,"topics":["functional-programming","scala","zio"],"latest_commit_sha":null,"homepage":"","language":"Scala","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/zalbia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-09-13T03:18:48.000Z","updated_at":"2020-02-23T15:26:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"733d9aca-11dd-479b-8dcd-c394c065136a","html_url":"https://github.com/zalbia/zio-structure","commit_stats":null,"previous_names":["zalbia/zio-structure"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/zalbia/zio-structure","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zalbia%2Fzio-structure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zalbia%2Fzio-structure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zalbia%2Fzio-structure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zalbia%2Fzio-structure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zalbia","download_url":"https://codeload.github.com/zalbia/zio-structure/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zalbia%2Fzio-structure/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35218117,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-07T02:00:07.222Z","response_time":90,"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":["functional-programming","scala","zio"],"created_at":"2024-11-10T22:39:06.433Z","updated_at":"2026-07-07T06:31:15.547Z","avatar_url":"https://github.com/zalbia.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zio-structure\nJust another ZIO demo, with an emphasis on service-level transactions using\n[zio-saga](https://github.com/VladKopanev/zio-saga). I have explored three\nways of doing this, namely:\n  - tagless-final encoding: which I found to be annoying, and realized later on\n    to have unprincipled, leaky abstractions because I was depending on the\n    repository implementation to do the transactions;\n  - plain old programming to an interface: didn't quite work out for me because\n    I've had to duplicate FooService code (not to mention leaky abstractions); and,\n  - zio-saga: which I just recently realized is the implementation with _actual_\n    service-level transactions and is purely encoded in the domain layer. This\n    is the domain-driven way to go!\n\n## How to run\n`sbt run`\n\nThere are three mains to choose from:\n  - `InMemoryMain` - Runs `Program` with an in-memory standard lib `Map` repository\n  - `SlickMain` - Runs `Program` with an in-memory Slick h2 repository\n  - `ParMain` - `ZStream`'s high-level concurrency demo, adding streams of `Long`s in single vs multi-threaded mode\n\n## Service-level transactions\nSee [`mergeFoos`](https://github.com/zach-albia/zio-structure/blob/master/src/main/scala/domain/FooService.scala#L55) for an example.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzalbia%2Fzio-structure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzalbia%2Fzio-structure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzalbia%2Fzio-structure/lists"}