{"id":17781641,"url":"https://github.com/ayeujjawalsingh/user-management-system","last_synced_at":"2025-09-04T19:12:53.629Z","repository":{"id":257945283,"uuid":"871694036","full_name":"ayeujjawalsingh/User-Management-System","owner":"ayeujjawalsingh","description":"Developed microservices including user-service, auth-service, notification-service, OTP-service, password-service, and API Gateway. Managed user registration, JWT-based authentication, OTP verification, notifications, and password handling.","archived":false,"fork":false,"pushed_at":"2024-12-21T15:53:00.000Z","size":200,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-07T13:15:22.305Z","etag":null,"topics":["api-gateway","auth-service","grpc","java","microservices","notification-service","otp-service","password-service","postgresql","rest-api","spring-boot","spring-security","user-management-system","user-service"],"latest_commit_sha":null,"homepage":"https://www.linkedin.com/in/ayeujjawalsingh/","language":"Java","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/ayeujjawalsingh.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-10-12T17:16:28.000Z","updated_at":"2025-01-28T20:15:33.000Z","dependencies_parsed_at":"2024-12-21T16:37:14.595Z","dependency_job_id":"346fc716-92cf-4172-a333-fabee377828d","html_url":"https://github.com/ayeujjawalsingh/User-Management-System","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"841eaca517da501b75fe7dadb3310b975b855d7d"},"previous_names":["ayeujjawalsingh/user-management-system"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayeujjawalsingh%2FUser-Management-System","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayeujjawalsingh%2FUser-Management-System/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayeujjawalsingh%2FUser-Management-System/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayeujjawalsingh%2FUser-Management-System/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ayeujjawalsingh","download_url":"https://codeload.github.com/ayeujjawalsingh/User-Management-System/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246706016,"owners_count":20820783,"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":["api-gateway","auth-service","grpc","java","microservices","notification-service","otp-service","password-service","postgresql","rest-api","spring-boot","spring-security","user-management-system","user-service"],"created_at":"2024-10-27T04:03:51.658Z","updated_at":"2025-04-01T19:49:08.084Z","avatar_url":"https://github.com/ayeujjawalsingh.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# User Management System\n\nThis project demonstrates a microservice architecture designed to manage user registration, authentication, password management, and communication through a notification service that includes email and SMS features for sending OTPs and other information to users. The system uses an API Gateway for routing client requests to the respective services.\n\n## Architecture Overview\n\n![Project Architecture](./files/FlowDiagram.png)\n\nThe system is structured into multiple microservices, each handling specific functionalities. The core components of the architecture are:\n\n### 1. API Gateway\nThe **API Gateway** acts as the entry point for all requests. It routes client requests to the appropriate microservice based on the request type:\n- Routes requests to other services.\n- Validates tokens via the **Authentication Service** (Private API).\n\n### 2. User Service\nThe **User Service** manages user-related operations:\n- `Register`: Allows new user registration.\n- `Update Profile`: Enables users to update their profile information.\n- `Get User Info`: Retrieves user information for authenticated users.\n\n### 3. Authentication Service\nThe **Authentication Service** is responsible for handling:\n- `Login`: Authenticates a user with credentials.\n- `Refresh Token`: Provides a new JWT token to extend the session.\n- `Validate Token`: Verifies token authenticity for secure endpoints.\n\n### 4. Password Service\nThe **Password Service** provides functionality for password recovery and reset:\n- `Forgot Password`: Initiates password recovery through email/SMS.\n- `Reset Password`: Allows the user to set a new password.\n\n### 5. OTP Service\nThe **OTP Service** generates and validates one-time passwords (OTPs) for secure transactions:\n- `Generate OTP`: Issues a new OTP for verification.\n- `Validate OTP`: Confirms the OTP provided by the user.\n\n### 6. Notification Service\nThe **Notification Service** handles notifications and alerts:\n- `Send Email`: Sends emails to the user for account-related notifications.\n- `Send Mobile SMS`: Sends SMS messages to the user's phone for critical alerts like OTPs.\n\n### 7. Token Validation\nA **Private API** is used to validate tokens securely. This ensures that only authenticated users can access specific services.\n\n---\n\n## Communication Flow\n\n### 1. Client-Server Communication (REST API)\n- **Clients** (web or mobile apps) communicate with the system through the **API Gateway** via RESTful APIs.\n- The API Gateway acts as the main entry point, ensuring all requests are authenticated and routed to the relevant microservices.\n\n### 2. Service-to-Service Communication (gRPC)\n- Once a request reaches the **API Gateway**, it is forwarded to the corresponding microservices via **gRPC**. This high-performance communication protocol allows the services to efficiently handle interactions between themselves.\n  \nEach microservice communicates with others using gRPC for internal service communication:\n- The **User Service**, **Authentication Service**, **Password Service**, **OTP Service**, and **Notification Service** interact with each other for tasks such as user existence checks, sending OTPs, and validating tokens.\n\n---\n\n## Interaction Flow\n\n1. The **Client** sends requests to the **API Gateway**.\n2. Based on the request type (e.g., registration, login, profile update, password reset), the **API Gateway** forwards the request to the appropriate microservice.\n3. For operations requiring authentication, the **API Gateway** validates the token via the **Authentication Service**.\n4. Services communicate with each other using gRPC for secure and fast interaction.\n\n---\n\n## Key Features\n\n- **JWT-based Authentication**: Secure login and token-based session management.\n- **gRPC Communication**: High-performance inter-service communication.\n- **REST API**: Client-server communication using REST APIs.\n- **OTP-based Security**: Secure sensitive operations with one-time passwords.\n- **Notification Service**: Email and SMS integration for user notifications.\n\n## Technologies Used\n\n- **Spring Boot**: To build each microservice.\n- **gRPC**: For internal service-to-service communication.\n- **JWT**: For authentication and session management.\n- **REST APIs**: For client-server communication.\n- **SMTP and SMS Gateway**: To send email and SMS notifications.\n- **Docker/Kubernetes**: (Optional) For containerization and orchestration.\n\n## Getting Started\n\n1. Clone the repository:\n    ```bash\n    git clone https://github.com/ayeujjawalsingh/User-Management-System.git\n    ```\n\n2. Build and run the services:\n    ```bash\n    cd user-management-system\n    mvn clean install\n    docker-compose up -d\n    ```\n\n3. Access the services via the API Gateway:\n    - Register: `POST /user/register`\n    - Update Profile: `PUT /user/update-profile`\n    - Get  User Info: `GET /user/get-user-info`\n    - Login: `POST /auth/login`\n    - Validate Token: `POST /auth/validate-token`\n    - Refresh Token: `POST /auth/refresh-token`\n    - Forgot Password: `POST /password/forgot-password`\n    - Reset Password: `POST /password/reset-password`\n    - Generate OTP: `POST /otp/generate-otp`\n    - Validate OTP: `POST /otp/validate-otp`\n    - Send Email: `POST /notif/send-email`\n    - Send SMS: `POST /notif/send-sms`\n\u003c!-- \n## License\n\nThis project is licensed under the MIT License.\n --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayeujjawalsingh%2Fuser-management-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fayeujjawalsingh%2Fuser-management-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayeujjawalsingh%2Fuser-management-system/lists"}