{"id":50922977,"url":"https://github.com/nikero41/microservices-rust","last_synced_at":"2026-06-16T20:31:07.863Z","repository":{"id":359901314,"uuid":"1245422644","full_name":"nikero41/microservices-rust","owner":"nikero41","description":"A Rust microservices project built as part of a course, then heavily modified and expanded beyond the original implementation. The project demonstrates a small gRPC-based authentication system.","archived":false,"fork":false,"pushed_at":"2026-05-24T01:37:43.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-24T03:24:23.075Z","etag":null,"topics":["grpc","learning-project","microservices","protobuf","rust","tokio","tonic"],"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/nikero41.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-21T07:53:24.000Z","updated_at":"2026-05-24T01:38:24.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/nikero41/microservices-rust","commit_stats":null,"previous_names":["nikero41/microservices-rust"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/nikero41/microservices-rust","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikero41%2Fmicroservices-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikero41%2Fmicroservices-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikero41%2Fmicroservices-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikero41%2Fmicroservices-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nikero41","download_url":"https://codeload.github.com/nikero41/microservices-rust/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikero41%2Fmicroservices-rust/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34423213,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-16T02:00:06.860Z","response_time":126,"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":["grpc","learning-project","microservices","protobuf","rust","tokio","tonic"],"created_at":"2026-06-16T20:31:06.989Z","updated_at":"2026-06-16T20:31:07.664Z","avatar_url":"https://github.com/nikero41.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rust Microservices Authentication Demo\n\nA Rust microservices project built as part of a course, then heavily modified and expanded beyond the original implementation. The project demonstrates a small gRPC-based authentication system using `tonic`, `tokio`, Protocol Buffers, password hashing, and separate service/client binaries.\n\n## Overview\n\nThis workspace contains three Rust binaries:\n\n- `auth`: a gRPC authentication service.\n- `client`: a CLI client for calling the authentication service.\n- `health-check`: a small worker that repeatedly exercises the auth flow.\n\nThe service supports:\n\n- User sign-up\n- User sign-in\n- User sign-out\n- Password hashing with PBKDF2\n- UUID-based user IDs\n- UUID-based session tokens\n- gRPC API generation from Protocol Buffers\n\nAll state is currently stored in memory, so users and sessions are reset when the auth service restarts.\n\n## Workspace Structure\n\n```text\n.\n├── auth/              # gRPC authentication service\n├── client/            # CLI client for auth operations\n├── health-check/      # Repeating auth flow checker\n├── proto/             # Protocol Buffer definitions\n├── Cargo.toml         # Rust workspace manifest\n└── Cargo.lock\n```\n\n## gRPC API\n\nThe API is defined in `proto/authentication.proto`.\n\n```proto\nservice Auth {\n  rpc SignUp(SignUpRequest) returns (SignUpResponse);\n  rpc SignIn(SignInRequest) returns (SignInResponse);\n  rpc SignOut(SignOutRequest) returns (SignOutResponse);\n}\n```\n\n## Requirements\n\n- Rust, using the 2024 edition\n- Cargo\n- Protocol Buffers tooling compatible with `tonic-prost-build`\n\n## Running The Project\n\nStart the authentication service:\n\n```bash\ncargo run -p auth\n```\n\nBy default, the service listens on:\n\n```text\n[::0]:50051\n```\n\nRun the CLI client in another terminal.\n\nSign up:\n\n```bash\ncargo run -p client -- sign-up --username alice --password secret\n```\n\nSign in:\n\n```bash\ncargo run -p client -- sign-in --username alice --password secret\n```\n\nSign out:\n\n```bash\ncargo run -p client -- sign-out --session-token \u003cSESSION_TOKEN\u003e\n```\n\nThe client connects to `[::0]:50051` by default. To target a different host, set:\n\n```bash\nAUTH_SERVICE_IP=\u003chost\u003e\n```\n\nRun the health-check worker:\n\n```bash\ncargo run -p health-check\n```\n\nThe health-check process repeatedly creates a random user, signs in, signs out, and prints the response statuses every few seconds.\n\nTo target a different auth host for the health-check worker, set:\n\n```bash\nAUTH_SERVICE_HOST_NAME=\u003chost\u003e\n```\n\n## Testing\n\nRun the test suite:\n\n```bash\ncargo test\n```\n\nThe tests cover user creation, duplicate usernames, password verification, session creation/deletion, and the main auth service flows.\n\n## Implementation Notes\n\n- The project uses `tonic` for gRPC transport.\n- Protobuf code is generated at build time from `proto/authentication.proto`.\n- Passwords are hashed with PBKDF2 before being stored.\n- Users and sessions are stored in in-memory `HashMap`s.\n- The project is intentionally small and educational, but structured as a multi-binary workspace to explore service boundaries.\n\n## Course Context\n\nThis repository started as part of a course project, but has been substantially changed and extended. It should be treated as a personal learning project and exploration of Rust microservice patterns rather than a direct copy of the original course material.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikero41%2Fmicroservices-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikero41%2Fmicroservices-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikero41%2Fmicroservices-rust/lists"}