{"id":13561175,"url":"https://github.com/andreapavoni/disco","last_synced_at":"2025-04-16T06:19:45.115Z","repository":{"id":57490280,"uuid":"161094840","full_name":"andreapavoni/disco","owner":"andreapavoni","description":"Simple, opinionated yet flexible library to build CQRS/ES driven systems 🕺","archived":false,"fork":false,"pushed_at":"2019-06-03T18:36:33.000Z","size":84,"stargazers_count":34,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-13T00:21:10.214Z","etag":null,"topics":["cqrs-es","ecto","elixir"],"latest_commit_sha":null,"homepage":"","language":"Elixir","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/andreapavoni.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}},"created_at":"2018-12-10T00:26:34.000Z","updated_at":"2023-07-14T17:33:40.000Z","dependencies_parsed_at":"2022-09-02T12:01:41.998Z","dependency_job_id":null,"html_url":"https://github.com/andreapavoni/disco","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreapavoni%2Fdisco","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreapavoni%2Fdisco/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreapavoni%2Fdisco/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreapavoni%2Fdisco/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andreapavoni","download_url":"https://codeload.github.com/andreapavoni/disco/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249207245,"owners_count":21230029,"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":["cqrs-es","ecto","elixir"],"created_at":"2024-08-01T13:00:53.283Z","updated_at":"2025-04-16T06:19:45.082Z","avatar_url":"https://github.com/andreapavoni.png","language":"Elixir","funding_links":[],"categories":["Elixir","Libraries","Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# Disco\n\nMinimal, opinionated yet flexible library to build software based on commands,\nqueries and events. Not a stricly a CQRS/ES in the known terms, because it's\nnot always possible to follow 100% CQRS/ES pattern neither anywhere in your\napps. Disco tries to solve this gap.\n\n### Production ready?\n\nNot yet. Well, this approach and part of its code has been used to build several apps in production\nwithout problems, however before being really usable, it might need some polishing. Expect\npotential breaking changes until explicitly stated.\n\n## Installation and setup\n\nThe package is available in [Hex](https://hex.pm/packages/disco), follow these steps to install:\n\n1.  Add `disco` to your list of dependencies in `mix.exs` in your app (if it's part\n    of an umbrella project, add it where needed):\n\n```elixir\ndef deps do\n  # Get from hex\n  [{:disco, \"~\u003e 0.1.0\"}]\n  # Or use the latest from master\n  [{:disco, github: \"andreapavoni/disco\"}]\nend\n```\n\n2.  Configure the event store **only on the app where you want to run it**. That means that\n    if you're working on an umbrella project, you have to choose an app in particular. The\n    best way is to have an app dedicated to work as event_store.\n\n    * Generate migrations for the database\n\n    ```sh\n    mix do deps.get, compile, disco.generate_event_store_migrations\n    ```\n\n    * Configure event store repo\n\n    ```elixir\n    # config/config.exs\n\n    config :disco, otp_app: :my_app\n    config :my_app, ecto_repos: [Disco.Repo]\n\n    config :core, Disco.Repo,\n      dadatabase: \"my_app_database\",\n      username: System.get_env(\"POSTGRES_USER\"),\n      password: System.get_env(\"POSTGRES_PASSWORD\"),\n      hostname: System.get_env(\"POSTGRES_HOSTNAME\")\n    ```\n\n3.  Configure the event store client to the app(s) that need to interact with the event store\n\n    * Configure the event store client\n\n    ```elixir\n    # config/config.exs\n\n    config :my_app, :event_store_client, MyApp.EventStoreClient\n    ```\n\n    * Create a wrapper for the event store client (so that it stays isolated)\n\n    ```elixir\n    defmodule MyApp.EventStoreClient do\n      use Disco.EventStore.Client\n    end\n    ```\n\n## Documentation\n\nThe documentation is available at [https://hexdocs.pm/disco](https://hexdocs.pm/disco), it\ncontains almost all the information needed to get started with Disco.\n\n## Usage\n\nQuick and dirty console example, to show how it's supposed to work.\n\n## TODO / Short term roadmap\n\n* [x] improve overall documentation\n* [ ] consolidate Event to be a struct and/or protocol\n* [ ] adopt an adapter-based approach for event store database\n\n## Contributing\n\nEveryone is welcome to contribute to Disco and help tackling existing issues!\n\nUse the [issue tracker](https://github.com/andreapavoni/disco/issues) for bug reports or feature requests.\n\nPlease, do your best to follow the [Elixir's Code of Conduct](https://github.com/elixir-lang/elixir/blob/master/CODE_OF_CONDUCT.md).\n\n## License\n\nThis source code is released under MIT License. Check [LICENSE](https://github.com/andreapavoni/disco/blob/master/LICENSE) file for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreapavoni%2Fdisco","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreapavoni%2Fdisco","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreapavoni%2Fdisco/lists"}