{"id":13550295,"url":"https://github.com/erdnaxeli/matrix-architect","last_synced_at":"2025-05-07T12:02:30.980Z","repository":{"id":56530822,"uuid":"267888654","full_name":"erdnaxeli/matrix-architect","owner":"erdnaxeli","description":"Admin bot for Matrix.","archived":false,"fork":false,"pushed_at":"2020-11-02T13:06:47.000Z","size":101,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-06T20:49:37.921Z","etag":null,"topics":["bot","matrix-org"],"latest_commit_sha":null,"homepage":null,"language":"Crystal","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/erdnaxeli.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":"2020-05-29T15:14:41.000Z","updated_at":"2025-02-07T11:52:13.000Z","dependencies_parsed_at":"2022-08-15T20:30:43.199Z","dependency_job_id":null,"html_url":"https://github.com/erdnaxeli/matrix-architect","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erdnaxeli%2Fmatrix-architect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erdnaxeli%2Fmatrix-architect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erdnaxeli%2Fmatrix-architect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erdnaxeli%2Fmatrix-architect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erdnaxeli","download_url":"https://codeload.github.com/erdnaxeli/matrix-architect/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252873952,"owners_count":21817712,"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":["bot","matrix-org"],"created_at":"2024-08-01T12:01:31.242Z","updated_at":"2025-05-07T12:02:30.875Z","avatar_url":"https://github.com/erdnaxeli.png","language":"Crystal","funding_links":[],"categories":["Crystal","bot"],"sub_categories":[],"readme":"# matrix-architect\n\nA bot to manage your Synapse home server.\nIt uses Synapse's [admin API](https://github.com/matrix-org/synapse/tree/master/docs/admin_api)\nto provides management commands.\n\nCurrent state of API implementation:\n* [ ] account_validity\n* [ ] delete_group\n* [ ] media_admin_api\n* [ ] purge_history_api\n* [ ] purge_remote_media\n* [x] purge_room\n  * `!room purge \u003croom id\u003e`\n  * `!room garbage-collect`\n* [ ] register_api\n* [ ] room_membership\n* [x] rooms\n  * `!room count`\n  * `!room delete \u003croom id\u003e`\n  * `!room details \u003croom id\u003e`\n  * `!room list`\n  * `!room top-complexity`\n  * `!room top-members`\n* [ ] server_notices\n* [x] shutdown_room\n  * `!room shutdown \u003croom id\u003e`\n* [x] user_admin_api\n  * `!user list`\n  * `!user query \u003cuser id\u003e`\n  * `!user deactivate \u003cuser id\u003e`\n  * `!user reset-password \u003cuser id\u003e`\n* [x] version_api\n  * `!version`\n\nSee `!help` for more details about the bot's commands.\n\nYou can join the discussion at [#matrix-architect:cervoi.se](https://matrix.to/#/!jLGHUlotkWeYLUTQEQ:cervoi.se?via=cervoi.se).\n\n## Installation\n\n### Static build\n\n~You can download a static build from the [releases](https://github.com/erdnaxeli/matrix-architect/releases) page.~ well actually this is not live yet\n\n### Docker\n\nYou can use the provided `Dockerfile` to build a docker image, or use the already built one (see the usage section for more details):\n```\ndocker run --init -v $PWD/config.yml:/app/config.yml erdnaxeli/matrix-architect\n```\n\n### From source\n\nIf you want to build it yourself you need to [install Crystal](https://crystal-lang.org/install/) 0.35, then clone the code, go to the new folder and:\n\n```\nmake\n```\n\nYou can also build a static binary with\n```\nmake static\n```\n\nNote that the static build (manually or from the releases) is not actually totally\nstatic (see the [Cristal wiki](https://github.com/crystal-lang/crystal/wiki/Static-Linking)).\nIf you have trouble you want prefer to build yourself a not static binary.\n\n## Usage\n\nSet the configuration:\n\n1. Create a new account for the bot on your HS, with your favorite client\n2. Log out (to discard any e2e key that would have been created)\n4. Set the new created account as\n[admin](https://github.com/matrix-org/synapse/tree/master/docs/admin_api).\n3. Run `./matrix-architect gen-config`\n\nRun the bot with `./matrix-architect`. If you let the log level to \"info\" you should\nsee some messages.\n\nYou can now talk to the bot on Matrix!\n\n### With docker\n\nThe commands are a little bit different:\n```\n# create an empty config file so we can mount it in the docker container\ntouch config.yml\n# generate the config\ndocker run -it --rm --init -v $PWD/config.yml:/app/config.yml erdnaxeli/matrix-architect gen-config\n# run the bot\ndocker run --init -v $PWD/config.yml:/app/config.yml erdnaxeli/matrix-architect\n```\n\nThe bot does not register any signal handlers, so the `--init` parameter is mandatory\nif you want it to respond correctly to `^C` or `docker stop`.\n\n## Security consideration\n\nThis bot use the Synapse's admin API (everything under `/_synapse/admin`).\nAlthough only admin users can use this API, make it available to the whole Internet\nis not recommanded. You probably want to run the bot on the same host as your\nSynapse instance and communicate through localhost (or you can use a private network).\n\nNote that the domain used to talk to Synapse is your (public) homeserver domain,\nso it means that (for example) if you want to access to the admin API on localhost\nonly you need to have your homeserver domain resolves to `localhost` (by adding an\nentry to `/etc/hosts`). The public API (everything under `/_matrix`) must also be\naccessible on the same domain and IP.\n\n## Contributing\n\n1. Fork it (\u003chttps://github.com/erdnaxeli/matrix-architect/fork\u003e)\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\nDon't forget to run `crystal tool format` on any code you commit.\n\nYour are advised to open an issue before opening a pull request.\nIn that issue you can describe the context and discuss your proposal.\n\n## TODO\n\nNon ordered list of things I would like to do:\n\n* Implement more API commands:\nI am not sure we need all the admin API available though the bot, but it's sure we need more.\n* Implement new commands:\nthere is probably space to implement new commands that combine different APIs,\nlike the garbage-collect one.\n* Provide administration for bridges? That could be something useful.\n* Test the code\n\n## Contributors\n\n- [erdnaxeli](https://github.com/erdnaxeli) - creator and maintainer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferdnaxeli%2Fmatrix-architect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferdnaxeli%2Fmatrix-architect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferdnaxeli%2Fmatrix-architect/lists"}