{"id":25120202,"url":"https://github.com/allansomensi/printer-supplies-api","last_synced_at":"2025-10-11T04:44:34.576Z","repository":{"id":256245424,"uuid":"854623232","full_name":"allansomensi/printer-supplies-api","owner":"allansomensi","description":"A simple REST API using Axum for managing printer supplies, such as toners and drums.","archived":false,"fork":false,"pushed_at":"2025-07-06T21:10:22.000Z","size":235,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-06T22:20:30.688Z","etag":null,"topics":["api","axum","crud","docker","openapi","postgresql","printer","rust","sqlx","stock-management","swagger-ui"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/allansomensi.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-09T13:55:19.000Z","updated_at":"2025-07-06T21:07:30.000Z","dependencies_parsed_at":"2024-09-14T06:08:21.959Z","dependency_job_id":"3aa5d136-465c-4ff9-b38c-0e32caad91fb","html_url":"https://github.com/allansomensi/printer-supplies-api","commit_stats":null,"previous_names":["allansomensi/printer-suplies-api","allansomensi/printer-supplies-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/allansomensi/printer-supplies-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allansomensi%2Fprinter-supplies-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allansomensi%2Fprinter-supplies-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allansomensi%2Fprinter-supplies-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allansomensi%2Fprinter-supplies-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/allansomensi","download_url":"https://codeload.github.com/allansomensi/printer-supplies-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allansomensi%2Fprinter-supplies-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006213,"owners_count":26084062,"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","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"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":["api","axum","crud","docker","openapi","postgresql","printer","rust","sqlx","stock-management","swagger-ui"],"created_at":"2025-02-08T05:19:58.889Z","updated_at":"2025-10-11T04:44:34.539Z","avatar_url":"https://github.com/allansomensi.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Printer Supplies API 🖨️\n\nA **REST API** using **Axum** for managing **printer supplies**, such as toners and drums. The project includes CRUD functionalities for various resources and inventory movement tracking.\n\n## Technologies Used\n\n- **Axum:** Asynchronous web framework for Rust.\n- **SQLx:** For interaction with the database and migrations.\n- **Just:** For utility scripts.\n- **Docker:** For database container.\n- **Swagger:** API documentation.\n\n## Features\n\n- CRUD operations for movements, printers, brands, drums, and toners.\n- Inventory management for toners and drums.\n- Docker Compose setup for easy deployment.\n- Database migrations included, executable via CLI or endpoint.\n- Error handling with thiserror for descriptive error responses.\n- Includes development, production, and test environments.\n- Includes unit and integration tests.\n- API documentation available with Swagger UI.\n\n---\n\n# Getting Started 🎯\n## Prerequisites:\n\n- **Rust** *(latest stable version)*\n- **Docker** and **Docker Compose**\n- **Just** for scripts\n\n## 1. Installation\n\n``` bash\ngit clone https://github.com/allansomensi/printer-supplies-api.git\ncd printer-supplies-api\n```\nFor the scripts:\n\n``` elixir\ncargo install just\n```\n\n## 2. Load environment variables\n\nBy default, the selected file is `.env.development`, so there's no need to run this command in a development environment.\nIf you're running in a **production** environment, execute the command below to ensure the correct environment variables are loaded.\n\n``` bash\nsource scripts/set_env.sh\n```\n\n## 3. Build and run the Docker container:\n\n``` elixir\njust services-up\n```\n\n## 4. Run migrations:\n\n``` elixir\njust migrate-run\n```\n\n## 5. Start server 🚀 🚀 \n\n``` elixir\njust serve\n```\n\n# Running Tests 👨‍🔬\n\nFor once:\n``` elixir\njust test\n```\n\nFor watching mode:\n``` elixir\njust test-watch\n```\n\n## Endpoint tests 🧪\n\n\u003e Endpoint tests are located at `/tests` folder\n\n![Test Status](https://github.com/user-attachments/assets/9f6627c5-ae2d-42d5-8362-676330031027)\n\n## API Documentation 📚\n\nAPI endpoints and usage details are documented using `Swagger UI` and `OpenAPI` with `Utoipa`.\n\nThe full documentation is available in the `openapi.json` file, which can be accessed and imported as needed. Run the application and navigate to `/swagger-ui` to view the interactive Swagger documentation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallansomensi%2Fprinter-supplies-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fallansomensi%2Fprinter-supplies-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallansomensi%2Fprinter-supplies-api/lists"}