{"id":18485438,"url":"https://github.com/system76/assembly","last_synced_at":"2025-04-08T19:32:42.227Z","repository":{"id":44651807,"uuid":"311488151","full_name":"system76/assembly","owner":"system76","description":"An assembly management microservice","archived":false,"fork":false,"pushed_at":"2023-10-25T23:25:17.000Z","size":138,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":7,"default_branch":"master","last_synced_at":"2023-10-26T20:43:14.405Z","etag":null,"topics":["broadway","elixir-lang","events","microservice"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/system76.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":".github/CODEOWNERS","security":null,"support":null,"governance":null}},"created_at":"2020-11-09T23:10:04.000Z","updated_at":"2023-04-21T16:42:18.000Z","dependencies_parsed_at":"2023-01-30T01:45:28.219Z","dependency_job_id":"842940ab-7c11-49a5-bd77-392f21032086","html_url":"https://github.com/system76/assembly","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/system76%2Fassembly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/system76%2Fassembly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/system76%2Fassembly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/system76%2Fassembly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/system76","download_url":"https://codeload.github.com/system76/assembly/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223342888,"owners_count":17129942,"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":["broadway","elixir-lang","events","microservice"],"created_at":"2024-11-06T12:45:13.888Z","updated_at":"2024-11-06T12:45:14.569Z","avatar_url":"https://github.com/system76.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003eAssembly\u003c/h1\u003e\n  \u003ch3\u003eAn assembly management microservice\u003c/h3\u003e\n  \u003cbr\u003e\n  \u003cbr\u003e\n\u003c/div\u003e\n\n---\n\nThis repository contains the code that controls our assembly fulfillment. This\nincludes:\n\n- Calculating how many components we need for building all orders\n- Persisting build information into the database\n- Calculating if a build can be built by component quantity in real time\n\n## Communication\n\nThis micro service works very closely with (and is dependent on)\n[the Warehouse service](https://github.com/system76/warehouse). The warehouse\nservice is responsible for tracking the amount of available components in our\nwarehouse. They have a relationship like so:\n\n```\nAssembly ------------------------------------------------------------\u003e Warehouse\n\nThis is a gRPC request from Assembly to Warehouse to determine the\n`Warehouse.Schema.Component` quantity available. This is used to determine if a\n`Assembly.Schemas.Build` has all of the needed parts in stock to build. A\nsimilar RabbitMQ message is broadcasted when that quantity changes.\n\nAssembly \u003c------------------------------------------------------------ Warehouse\n\nThis is a gRPC request from Warehouse to Assembly to determine the demand of\n`Warehouse.Schema.Component`. This allows Warehouse to determine the back order\nstatus of a `Warehouse.Schema.Sku` and the quantity we need to order. A similar\nRabbitMQ message is broadcasted when this quantity changes.\n```\n\nLike wise, this micro service is connected into our order system to create and\nupdate builds when changes on an order occur.\n\n## Schemas\n\nThis micro service has a small subset of data it works with.\n\n`Assembly.Schemas.Build` represents the smallest building item on an order. For\ninstance, this could be a single keyboard what we could potentially ship out\nseparately, or a whole desktop. If you order multiple quantities, multiple\nbuilds will be created.\n\n`Assembly.Schemas.Option` is a selected option for that build. Some products\nhave no options, while others have many. A Thelio desktop for instance has many\noptions to select, like the GPU, CPU, etc.\n\n## Development Setup\n\nFirst, make sure you are running the dependency services with `docker-compose`:\n\n```shell\ndocker-compose up\n```\n\nTools and language versions required for development can be installed with [asdf](https://github.com/asdf-vm/asdf):\n\n```shell\n# Install asdf plugins\nasdf plugin-add grpcurl https://github.com/asdf-community/asdf-grpcurl.git\nasdf plugin add erlang https://github.com/asdf-vm/asdf-erlang.git\nasdf plugin-add elixir https://github.com/asdf-vm/asdf-elixir.git\n# Install required tool versions on this project directory\n# Only needed once, getting into this directory will make asdf automatically\n# activate the versions from .tool-versions.\nasdf install\n```\n\nRead more on [http://asdf-vm.com/](http://asdf-vm.com/) for usage information.\n\nDependencies are managed via `mix`. In the repo, run:\n\n```shell\nmix deps.get\n```\n\nThen run this to test the project:\n\n```shell\nmix test\n```\n\n### Contributing\n\nThis project makes use of [https://pre-commit.com/](https://pre-commit.com/) to ensure code quality before pushing it to Git. While this is not a requirement, it's encouraged to have `pre-commit` installed with `pip install pre-commit`, and the in this project root, run:\n\n```shell\npre-commit install\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsystem76%2Fassembly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsystem76%2Fassembly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsystem76%2Fassembly/lists"}