{"id":27233110,"url":"https://github.com/yukigeshiki/coding-challenge-rust","last_synced_at":"2025-04-10T14:11:40.823Z","repository":{"id":190166378,"uuid":"680712958","full_name":"Yukigeshiki/coding-challenge-rust","owner":"Yukigeshiki","description":"Testing out the Axum web framework with a small backend coding challenge. ","archived":false,"fork":false,"pushed_at":"2024-04-08T08:43:12.000Z","size":65,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-18T04:59:56.234Z","etag":null,"topics":["axum-framework","backend-api","coding-challenge","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/Yukigeshiki.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}},"created_at":"2023-08-20T06:36:01.000Z","updated_at":"2024-03-21T10:39:37.000Z","dependencies_parsed_at":"2024-01-18T12:56:57.492Z","dependency_job_id":"1d3d5396-ad36-41c1-be39-d56aa3efd39f","html_url":"https://github.com/Yukigeshiki/coding-challenge-rust","commit_stats":null,"previous_names":["yukigeshiki/coding-challenge-rust"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yukigeshiki%2Fcoding-challenge-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yukigeshiki%2Fcoding-challenge-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yukigeshiki%2Fcoding-challenge-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yukigeshiki%2Fcoding-challenge-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yukigeshiki","download_url":"https://codeload.github.com/Yukigeshiki/coding-challenge-rust/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248232472,"owners_count":21069487,"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":["axum-framework","backend-api","coding-challenge","rust"],"created_at":"2025-04-10T14:11:39.804Z","updated_at":"2025-04-10T14:11:40.792Z","avatar_url":"https://github.com/Yukigeshiki.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# coding-challenge-rust\n\n[![build](https://github.com/Yukigeshiki/coding-challenge-rust/actions/workflows/ci.yml/badge.svg)](https://github.com/Yukigeshiki/coding-challenge-rust/actions/workflows/ci.yml) [![build](https://github.com/Yukigeshiki/coding-challenge-rust/actions/workflows/build.yml/badge.svg)](https://github.com/Yukigeshiki/coding-challenge-rust/actions/workflows/build.yml)\n\nCreate an API server using Axum which will return random animal facts. The service should have the following:\n\n- Receive the following inputs as arguments, environment variables, configuration, etc.\n\n  - Port to start on\n\n  - Type of fact to return with valid options\n\n    - cat\n\n    - dog\n\n    - any (randomize the type on each request)\n\n    - … assume more animals will be added in the future\n\n  - Anything else you feel is needed\n\n- Have the endpoint `/fact` return a random fact\n\n  - Use the following APIs to retrieve a random cat or dog fact\n\n    - Cat → https://alexwohlbruck.github.io/cat-facts/docs/endpoints/facts.html\n\n    - Dog → https://kinduff.github.io/dog-api/\n\n  - Return a response in this JSON format\n\n```json\n{\n    \"fact\": \"Three of the 12 dogs on the Titanic survived.\",\n    \"animal\": \"dog\"\n}\n```\n- Assume this is a production-grade application. So create:\n\n  - Tests\n\n  - Logs\n\n  - Handle errors\n\n  - etc.\n\n\n### To run the application:\n\n```\ncargo run\n```\n\n### To test the application:\n\n```\ncargo test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyukigeshiki%2Fcoding-challenge-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyukigeshiki%2Fcoding-challenge-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyukigeshiki%2Fcoding-challenge-rust/lists"}