{"id":49544140,"url":"https://github.com/xibn/magnesium","last_synced_at":"2026-05-02T17:06:17.000Z","repository":{"id":223929368,"uuid":"759871463","full_name":"xibn/magnesium","owner":"xibn","description":"Image processing and hosting microservice.","archived":false,"fork":false,"pushed_at":"2024-10-01T23:47:25.000Z","size":172,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-06T17:09:05.034Z","etag":null,"topics":["actix-web","api","image-hosting","image-processing","image-upload","microservice","mongodb","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/xibn.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}},"created_at":"2024-02-19T13:52:10.000Z","updated_at":"2026-01-02T01:28:59.000Z","dependencies_parsed_at":"2025-01-28T17:11:21.180Z","dependency_job_id":"cf391ba5-368c-4810-8d8e-5f2722db2e9c","html_url":"https://github.com/xibn/magnesium","commit_stats":null,"previous_names":["maximierung/magnesium","maximatically/magnesium","maxibue/magnesium","xibn/magnesium"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/xibn/magnesium","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xibn%2Fmagnesium","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xibn%2Fmagnesium/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xibn%2Fmagnesium/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xibn%2Fmagnesium/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xibn","download_url":"https://codeload.github.com/xibn/magnesium/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xibn%2Fmagnesium/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32542230,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T12:25:33.646Z","status":"ssl_error","status_checked_at":"2026-05-02T12:24:51.733Z","response_time":132,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["actix-web","api","image-hosting","image-processing","image-upload","microservice","mongodb","rust"],"created_at":"2026-05-02T17:06:16.390Z","updated_at":"2026-05-02T17:06:16.992Z","avatar_url":"https://github.com/xibn.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Magnesium\n\nMagnesium is a pluggable image processing and hosting microservice with many quality-of-life features.\n\nIt was built in Rust using [Actix-Web](https://actix.rs/) \u0026 [MongoDB](https://www.mongodb.com/).\n\n#### Features:\n- Bucket support.\n- Image resizing.\n- Pictures served as 'webp' and/or only in original format.\n- Images saved locally.\n\n## Setup\n*You need to have Rust/Cargo installed before obviously.*\n- Download or clone the magnesium repository.\n- Fill out the config.toml file.\n\n**Here is a small list of all the settings in config.toml \u0026 their functions:**\n| Setting's Name   | Standard Value                     | Explanation                                                                                                                                |\n|------------------|------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| parent_directory | \"test_setup\"                       | It is the name of the directory where all the images \u0026 buckets are stored. It's located at './' of the executable.                         |\n| buckets          | [\"test_bucket_1\", \"test_bucket_2\"] | These are the names of the buckets where images can be uploaded, stored \u0026 served. They are directories stored in the parent directory      |\n| serve_as_webp    | true                               | This makes every image that is served in a link without an explicit file ending a webp image.                                              |\n| allow_resizing   | true                               | This allows resizing of images when being uploaded.                                                                                        |\n| allow_admin      | true                               | This allows the admin API endpoints that allow to add \u0026 remove API keys.                                                                   |\n| db_name          | \"magnesium_db\"                     | This is the name of the MongoDB database that will be created/written to upon launch.                                                      |\n| collection_name  | \"keys\"                             | This is the name of the MongoDB collection where the API keys will be stored.                                                              |\n\n*(Keep in mind that the \"test_setup\" directory and its content are only there to give you an example of how the working Magnesium instance could look.)*\n\n- Fill out all environment variables that are listed in the '.env.example' file.\n- You can either add them directly into the environment or just remove the .example ending from the file.\n- Run the `cargo build` command in the terminal. *(Go to the directory first.)*\n- Use the outputted executable or run by using the `cargo run` command.\n\n## Routes\n- `/upload/{bucket}` - The route to upload to a specific bucket. (`API_KEY` header needed.)\n- `/{bucket}/{filename}` - The route to serve a file from a specific bucket. (No API key required.)\n\nAdmin (disableable):\n\n- `/keys/add` - The route to add an API key. (`ADMIN_KEY` header needed.)\n- `/keys/remove` - The route to add an API key. (`ADMIN_KEY` header needed.)\n\nTesting:\n\n*If you have kept the test settings of `parent_directory` and `buckets` and you have kept the test_setup directory and its content you can test out Magnesium by going to the following routes:*\n\n- `/test_bucket_1/test1` - The test image is served as a webp file.\n- `/test_bucket_1/test1.png` - The test image is served as a png file.\n- `/upload/test_bucket_1` - Upload an image and play around with Magnesium for yourself. (`API_KEY` header needed.)\n\n*(Alternatively use `test_bucket_2` for a different bucket.*\n\n## Resizing\nIf resizing is allowed you can optionally add a `width` and `height` header to the HTTP request to resize the image.\n\n## Contributing\nFeel free to create issues or pull requests if you want.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxibn%2Fmagnesium","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxibn%2Fmagnesium","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxibn%2Fmagnesium/lists"}