# chhumsomary11/cloud-native_microservice architecture

> Architecture diagram of the GitHub repository chhumsomary11/cloud-native_microservice, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/chhumsomary11/cloud-native_microservice
- Repository: https://github.com/chhumsomary11/cloud-native_microservice

## Overview

This repository is a collection of separate Node.js service demonstrations rather than one integrated application. The clearest end-to-end workflow is identity registration, login, and profile management, with a separate admin service for user lookup and deletion. Other folders demonstrate JWT authentication, API gateways, student/teacher services, and load-balancing servers. The source excerpts establish identity-service calls to their local database connectors and models; gateway and load-balancer implementations are represented, but their routing relationships cannot be verified from the available evidence.

Main entry points: [`4.Identity_management_system/registration-service/registration.js`](https://github.com/chhumsomary11/cloud-native_microservice/blob/main/4.Identity_management_system/registration-service/registration.js) (Registration service), [`4.Identity_management_system/login-service/login.js`](https://github.com/chhumsomary11/cloud-native_microservice/blob/main/4.Identity_management_system/login-service/login.js) (Login service), [`4.Identity_management_system/user-service/user.js`](https://github.com/chhumsomary11/cloud-native_microservice/blob/main/4.Identity_management_system/user-service/user.js) (Profile service), [`4.Identity_management_system/admin-service/admin.js`](https://github.com/chhumsomary11/cloud-native_microservice/blob/main/4.Identity_management_system/admin-service/admin.js) (Admin service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Identity management"]
  node_registration["Registration service<br/>[registration.js]"]
  node_reg_model["Registration user model<br/>[userModel.js]"]
  node_reg_db["Registration DB connector<br/>[dbconnect.js]"]
  node_login["Login service<br/>[login.js]"]
  node_login_model["Login user model<br/>[userModel.js]"]
  node_login_db["Login DB connector<br/>[dbconnect.js]"]
  node_user_service["Profile service<br/>[user.js]"]
  node_user_model["Profile user model<br/>[userModel.js]"]
  node_user_db["Profile DB connector<br/>[dbconnect.js]"]
  node_admin["Admin service<br/>[admin.js]"]
  node_admin_model["Admin user model<br/>[userModel.js]"]
  node_admin_db["Admin DB connector<br/>[dbconnect.js]"]
  node_identity_gateway["Identity API gateway<br/>[gateway.js]"]
  node_compose_registration["Compose registration service<br/>[registration.js]"]
  node_compose_reg_model["Compose registration model<br/>[userModel.js]"]
  node_compose_reg_db["Compose registration DB connector<br/>[dbconnect.js]"]
  node_compose_login["Compose login service<br/>[login.js]"]
  node_compose_login_model["Compose login model<br/>[userModel.js]"]
  node_compose_login_db["Compose login DB connector<br/>[dbconnect.js]"]
end

subgraph group_jwt["JWT login demo"]
  node_jwt_auth["JWT authentication service"]
  node_jwt_person["Person model<br/>[person_schema.js]"]
  node_jwt_db["JWT demo DB connector<br/>[dbconnect.js]"]
end

subgraph group_gateway["Gateway demos"]
  node_university_gateway["University API gateway<br/>[api-gateway.js]"]
  node_student_service["Student service<br/>[index.js]"]
  node_teacher_service["Teacher service<br/>[index.js]"]
end

subgraph group_balance["Load balancing"]
  node_balance_08["Load-balancing server<br/>[server.js]"]
  node_balance_7["Load-balancing server<br/>[server.js]"]
  node_balance_test["Load-balancing test server<br/>[server.js]"]
end

node_user(("User"))
node_database[("MongoDB")]
node_jwt_client(("Login client"))
node_gateway_client(("API client"))
node_balance_client(("Web client"))

node_user -->|"registers"| node_registration
node_registration -->|"reads and creates"| node_reg_model
node_registration -->|"connects through"| node_reg_db
node_reg_db -->|"connects"| node_database
node_user -->|"authenticates"| node_login
node_login -->|"looks up user"| node_login_model
node_login -->|"connects through"| node_login_db
node_login_db -->|"connects"| node_database
node_user -->|"views or updates"| node_user_service
node_user_service -->|"queries and updates"| node_user_model
node_user_service -->|"connects through"| node_user_db
node_user_db -->|"connects"| node_database
node_user -->|"requests user administration"| node_admin
node_admin -->|"searches and deletes"| node_admin_model
node_admin -->|"connects through"| node_admin_db
node_admin_db -->|"connects"| node_database
node_jwt_client -->|"submits login"| node_jwt_auth
node_jwt_auth -->|"looks up person"| node_jwt_person
node_jwt_auth -->|"loads connector"| node_jwt_db
node_jwt_db -.->|"connects"| node_database

click node_registration "https://github.com/chhumsomary11/cloud-native_microservice/blob/main/4.Identity_management_system/registration-service/registration.js"
click node_reg_model "https://github.com/chhumsomary11/cloud-native_microservice/blob/main/4.Identity_management_system/registration-service/userModel.js"
click node_reg_db "https://github.com/chhumsomary11/cloud-native_microservice/blob/main/4.Identity_management_system/registration-service/dbconnect.js"
click node_login "https://github.com/chhumsomary11/cloud-native_microservice/blob/main/4.Identity_management_system/login-service/login.js"
click node_login_model "https://github.com/chhumsomary11/cloud-native_microservice/blob/main/4.Identity_management_system/login-service/userModel.js"
click node_login_db "https://github.com/chhumsomary11/cloud-native_microservice/blob/main/4.Identity_management_system/login-service/dbconnect.js"
click node_user_service "https://github.com/chhumsomary11/cloud-native_microservice/blob/main/4.Identity_management_system/user-service/user.js"
click node_user_model "https://github.com/chhumsomary11/cloud-native_microservice/blob/main/4.Identity_management_system/user-service/userModel.js"
click node_user_db "https://github.com/chhumsomary11/cloud-native_microservice/blob/main/4.Identity_management_system/user-service/dbconnect.js"
click node_admin "https://github.com/chhumsomary11/cloud-native_microservice/blob/main/4.Identity_management_system/admin-service/admin.js"
click node_admin_model "https://github.com/chhumsomary11/cloud-native_microservice/blob/main/4.Identity_management_system/admin-service/userModel.js"
click node_admin_db "https://github.com/chhumsomary11/cloud-native_microservice/blob/main/4.Identity_management_system/admin-service/dbconnect.js"
click node_identity_gateway "https://github.com/chhumsomary11/cloud-native_microservice/blob/main/4.Identity_management_system/api-gateway/gateway.js"
click node_jwt_auth "https://github.com/chhumsomary11/cloud-native_microservice/blob/main/3.Registration%20Login%20with%20JWT%20Microservice%20/login/authentication-service.js"
click node_jwt_person "https://github.com/chhumsomary11/cloud-native_microservice/blob/main/3.Registration%20Login%20with%20JWT%20Microservice%20/login/person_schema.js"
click node_jwt_db "https://github.com/chhumsomary11/cloud-native_microservice/blob/main/3.Registration%20Login%20with%20JWT%20Microservice%20/login/dbconnect.js"
click node_university_gateway "https://github.com/chhumsomary11/cloud-native_microservice/blob/main/10.%20API%20Gateway%20Routing%20to%20Resolve%20MicroService%20Port%20No%20Issue/University_Project/APIGateway_Microservice/api-gateway.js"
click node_student_service "https://github.com/chhumsomary11/cloud-native_microservice/blob/main/10.%20API%20Gateway%20Routing%20to%20Resolve%20MicroService%20Port%20No%20Issue/University_Project/Student_Microservice/index.js"
click node_teacher_service "https://github.com/chhumsomary11/cloud-native_microservice/blob/main/10.%20API%20Gateway%20Routing%20to%20Resolve%20MicroService%20Port%20No%20Issue/University_Project/Teacher_Microservice/index.js"
click node_balance_08 "https://github.com/chhumsomary11/cloud-native_microservice/blob/main/08.%20Loadbalanceing/webserver/server.js"
click node_balance_7 "https://github.com/chhumsomary11/cloud-native_microservice/blob/main/7.LoadBalancing/webserver/server.js"
click node_balance_test "https://github.com/chhumsomary11/cloud-native_microservice/blob/main/7.LoadbalancingTest/webserver/server.js"
click node_compose_registration "https://github.com/chhumsomary11/cloud-native_microservice/blob/main/6.DockerCompose/registration-service/registration.js"
click node_compose_reg_model "https://github.com/chhumsomary11/cloud-native_microservice/blob/main/6.DockerCompose/registration-service/userModel.js"
click node_compose_reg_db "https://github.com/chhumsomary11/cloud-native_microservice/blob/main/6.DockerCompose/registration-service/dbconnect.js"
click node_compose_login "https://github.com/chhumsomary11/cloud-native_microservice/blob/main/6.DockerCompose/login-service/login.js"
click node_compose_login_model "https://github.com/chhumsomary11/cloud-native_microservice/blob/main/6.DockerCompose/login-service/userModel.js"
click node_compose_login_db "https://github.com/chhumsomary11/cloud-native_microservice/blob/main/6.DockerCompose/login-service/dbconnect.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_registration,node_reg_model,node_reg_db,node_login,node_login_model,node_login_db,node_user_service,node_user_model,node_user_db,node_admin,node_admin_model,node_admin_db,node_identity_gateway,node_compose_registration,node_compose_reg_model,node_compose_reg_db,node_compose_login,node_compose_login_model,node_compose_login_db,node_user,node_jwt_client,node_gateway_client,node_balance_client toneBlue
class node_jwt_auth,node_jwt_person,node_jwt_db,node_database toneAmber
class node_university_gateway,node_student_service,node_teacher_service toneMint
class node_balance_08,node_balance_7,node_balance_test toneRose
```

## Components

### Identity management

- [Registration service](https://github.com/chhumsomary11/cloud-native_microservice/blob/main/4.Identity_management_system/registration-service/registration.js): `4.Identity_management_system/registration-service/registration.js`
- [Registration user model](https://github.com/chhumsomary11/cloud-native_microservice/blob/main/4.Identity_management_system/registration-service/userModel.js): `4.Identity_management_system/registration-service/userModel.js`
- [Registration DB connector](https://github.com/chhumsomary11/cloud-native_microservice/blob/main/4.Identity_management_system/registration-service/dbconnect.js): `4.Identity_management_system/registration-service/dbconnect.js`
- [Login service](https://github.com/chhumsomary11/cloud-native_microservice/blob/main/4.Identity_management_system/login-service/login.js): `4.Identity_management_system/login-service/login.js`
- [Login user model](https://github.com/chhumsomary11/cloud-native_microservice/blob/main/4.Identity_management_system/login-service/userModel.js): `4.Identity_management_system/login-service/userModel.js`
- [Login DB connector](https://github.com/chhumsomary11/cloud-native_microservice/blob/main/4.Identity_management_system/login-service/dbconnect.js): `4.Identity_management_system/login-service/dbconnect.js`
- [Profile service](https://github.com/chhumsomary11/cloud-native_microservice/blob/main/4.Identity_management_system/user-service/user.js): `4.Identity_management_system/user-service/user.js`
- [Profile user model](https://github.com/chhumsomary11/cloud-native_microservice/blob/main/4.Identity_management_system/user-service/userModel.js): `4.Identity_management_system/user-service/userModel.js`
- [Profile DB connector](https://github.com/chhumsomary11/cloud-native_microservice/blob/main/4.Identity_management_system/user-service/dbconnect.js): `4.Identity_management_system/user-service/dbconnect.js`
- [Admin service](https://github.com/chhumsomary11/cloud-native_microservice/blob/main/4.Identity_management_system/admin-service/admin.js): `4.Identity_management_system/admin-service/admin.js`
- [Admin user model](https://github.com/chhumsomary11/cloud-native_microservice/blob/main/4.Identity_management_system/admin-service/userModel.js): `4.Identity_management_system/admin-service/userModel.js`
- [Admin DB connector](https://github.com/chhumsomary11/cloud-native_microservice/blob/main/4.Identity_management_system/admin-service/dbconnect.js): `4.Identity_management_system/admin-service/dbconnect.js`
- [Identity API gateway](https://github.com/chhumsomary11/cloud-native_microservice/blob/main/4.Identity_management_system/api-gateway/gateway.js): `4.Identity_management_system/api-gateway/gateway.js`
- [Compose registration service](https://github.com/chhumsomary11/cloud-native_microservice/blob/main/6.DockerCompose/registration-service/registration.js): `6.DockerCompose/registration-service/registration.js`
- [Compose registration model](https://github.com/chhumsomary11/cloud-native_microservice/blob/main/6.DockerCompose/registration-service/userModel.js): `6.DockerCompose/registration-service/userModel.js`
- [Compose registration DB connector](https://github.com/chhumsomary11/cloud-native_microservice/blob/main/6.DockerCompose/registration-service/dbconnect.js): `6.DockerCompose/registration-service/dbconnect.js`
- [Compose login service](https://github.com/chhumsomary11/cloud-native_microservice/blob/main/6.DockerCompose/login-service/login.js): `6.DockerCompose/login-service/login.js`
- [Compose login model](https://github.com/chhumsomary11/cloud-native_microservice/blob/main/6.DockerCompose/login-service/userModel.js): `6.DockerCompose/login-service/userModel.js`
- [Compose login DB connector](https://github.com/chhumsomary11/cloud-native_microservice/blob/main/6.DockerCompose/login-service/dbconnect.js): `6.DockerCompose/login-service/dbconnect.js`

### JWT login demo

- [JWT authentication service](https://github.com/chhumsomary11/cloud-native_microservice/blob/main/3.Registration%20Login%20with%20JWT%20Microservice%20/login/authentication-service.js): `3.Registration Login with JWT Microservice /login/authentication-service.js`
- [Person model](https://github.com/chhumsomary11/cloud-native_microservice/blob/main/3.Registration%20Login%20with%20JWT%20Microservice%20/login/person_schema.js): `3.Registration Login with JWT Microservice /login/person_schema.js`
- [JWT demo DB connector](https://github.com/chhumsomary11/cloud-native_microservice/blob/main/3.Registration%20Login%20with%20JWT%20Microservice%20/login/dbconnect.js): `3.Registration Login with JWT Microservice /login/dbconnect.js`

### Gateway demos

- [University API gateway](https://github.com/chhumsomary11/cloud-native_microservice/blob/main/10.%20API%20Gateway%20Routing%20to%20Resolve%20MicroService%20Port%20No%20Issue/University_Project/APIGateway_Microservice/api-gateway.js): `10. API Gateway Routing to Resolve MicroService Port No Issue/University_Project/APIGateway_Microservice/api-gateway.js`
- [Student service](https://github.com/chhumsomary11/cloud-native_microservice/blob/main/10.%20API%20Gateway%20Routing%20to%20Resolve%20MicroService%20Port%20No%20Issue/University_Project/Student_Microservice/index.js): `10. API Gateway Routing to Resolve MicroService Port No Issue/University_Project/Student_Microservice/index.js`
- [Teacher service](https://github.com/chhumsomary11/cloud-native_microservice/blob/main/10.%20API%20Gateway%20Routing%20to%20Resolve%20MicroService%20Port%20No%20Issue/University_Project/Teacher_Microservice/index.js): `10. API Gateway Routing to Resolve MicroService Port No Issue/University_Project/Teacher_Microservice/index.js`

### Load balancing

- [Load-balancing server](https://github.com/chhumsomary11/cloud-native_microservice/blob/main/08.%20Loadbalanceing/webserver/server.js): `08. Loadbalanceing/webserver/server.js`
- [Load-balancing server](https://github.com/chhumsomary11/cloud-native_microservice/blob/main/7.LoadBalancing/webserver/server.js): `7.LoadBalancing/webserver/server.js`
- [Load-balancing test server](https://github.com/chhumsomary11/cloud-native_microservice/blob/main/7.LoadbalancingTest/webserver/server.js): `7.LoadbalancingTest/webserver/server.js`

### Other components

- **User**
- **MongoDB**
- **Login client**
- **API client**
- **Web client**

## Connections

- User → Registration service: registers (evidence: `4.Identity_management_system/registration-service/registration.js`)
- Registration service → Registration user model: reads and creates (evidence: `4.Identity_management_system/registration-service/registration.js`)
- Registration service → Registration DB connector: connects through (evidence: `4.Identity_management_system/registration-service/registration.js`)
- Registration DB connector → MongoDB: connects (evidence: `4.Identity_management_system/registration-service/dbconnect.js`)
- User → Login service: authenticates (evidence: `4.Identity_management_system/login-service/login.js`)
- Login service → Login user model: looks up user (evidence: `4.Identity_management_system/login-service/login.js`)
- Login service → Login DB connector: connects through (evidence: `4.Identity_management_system/login-service/login.js`)
- Login DB connector → MongoDB: connects (evidence: `4.Identity_management_system/login-service/dbconnect.js`)
- User → Profile service: views or updates (evidence: `4.Identity_management_system/user-service/user.js`)
- Profile service → Profile user model: queries and updates (evidence: `4.Identity_management_system/user-service/user.js`)
- Profile service → Profile DB connector: connects through (evidence: `4.Identity_management_system/user-service/user.js`)
- Profile DB connector → MongoDB: connects (evidence: `4.Identity_management_system/user-service/dbconnect.js`)
- User → Admin service: requests user administration (evidence: `4.Identity_management_system/admin-service/admin.js`)
- Admin service → Admin user model: searches and deletes (evidence: `4.Identity_management_system/admin-service/admin.js`)
- Admin service → Admin DB connector: connects through (evidence: `4.Identity_management_system/admin-service/admin.js`)
- Admin DB connector → MongoDB: connects (evidence: `4.Identity_management_system/admin-service/dbconnect.js`)
- Login client → JWT authentication service: submits login (evidence: `3.Registration Login with JWT Microservice /login/authentication-service.js`)
- JWT authentication service → Person model: looks up person (evidence: `3.Registration Login with JWT Microservice /login/authentication-service.js`)
- JWT authentication service → JWT demo DB connector: loads connector (evidence: `3.Registration Login with JWT Microservice /login/authentication-service.js`)
- JWT demo DB connector → MongoDB: connects
