{"id":19133652,"url":"https://github.com/hienduyph/rust-webapi","last_synced_at":"2025-05-06T19:21:29.895Z","repository":{"id":45278170,"uuid":"245653156","full_name":"hienduyph/rust-webapi","owner":"hienduyph","description":"Clean Architecture Implementation, async-io high performance Rest API in Rust","archived":false,"fork":false,"pushed_at":"2024-12-22T04:07:28.000Z","size":271,"stargazers_count":32,"open_issues_count":2,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-31T02:04:47.358Z","etag":null,"topics":["actix","axum-server","restapi","rust","tokio","tokio-rs","warp"],"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/hienduyph.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":"2020-03-07T15:03:04.000Z","updated_at":"2025-02-15T09:07:03.000Z","dependencies_parsed_at":"2024-11-09T06:36:51.060Z","dependency_job_id":null,"html_url":"https://github.com/hienduyph/rust-webapi","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/hienduyph%2Frust-webapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hienduyph%2Frust-webapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hienduyph%2Frust-webapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hienduyph%2Frust-webapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hienduyph","download_url":"https://codeload.github.com/hienduyph/rust-webapi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249638250,"owners_count":21304305,"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":["actix","axum-server","restapi","rust","tokio","tokio-rs","warp"],"created_at":"2024-11-09T06:23:20.992Z","updated_at":"2025-04-19T07:33:15.099Z","avatar_url":"https://github.com/hienduyph.png","language":"Rust","readme":"# Backend Implementation in Rust with Clean Architect\n\n- Clean Architect\n- Independent framework: I've tried actix-web, warp, ...\n- Independent database: Support MySQL, PostgresSQL ...\n\n## Run the services\n```bash\ndocker compose up -d\n```\n\nSetup Migrations\n\n```bash\nexport DATABASE_URL=postgres://postgres:password@127.0.0.1:5432/mydb\n\ncargo install diesel_cli --no-default-features --features \"postgres sqlite mysql\"\ndiesel setup\ndiesel migration run\n\n# Insert sample users\ncargo run --bin insert_users\n```\n\n**Check the server's running**\n\n```bash\ncurl http://127.0.0.1:8000/\ncurl http://127.0.0.1:8000/health\n```\n\n**Login**\n\n```bash\n# required jq installed.\nexport TOKEN=$(curl -s -H \"Content-Type: application/json\" -X POST -d '{\"email\": \"hienduyph@gmail.com\", \"password\": \"admin\"}' http://127.0.0.1:8000/auth/login | jq -r '.token')\n```\n\n**Users**\n\n```bash\ncurl -s -H \"Authorization: bearer $TOKEN\" http://127.0.0.1:8000/users\ncurl -s -H \"Authorization: bearer $TOKEN\" http://127.0.0.1:8000/users/1802d2f8-1a18-43c1-9c58-1c3f7100c842\n```\n\n## Dev Started\n**Run the server**\n\n- [axum](./src/apps/axum): `cargo run --bin axum`\n- [warp](./src/apps/warp): `cargo run --bin warp`\n- [actix-web](./src/apps/actix): `cargo run --bin actix`\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhienduyph%2Frust-webapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhienduyph%2Frust-webapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhienduyph%2Frust-webapi/lists"}