# nvsivakumar/soaproject-p27-s14 architecture

> Architecture diagram of the GitHub repository nvsivakumar/soaproject-p27-s14, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nvsivakumar/soaproject-p27-s14
- Repository: https://github.com/nvsivakumar/soaproject-p27-s14

## Overview

ResolveNow is a role-based complaint-management application: users register or sign in, then customers submit and track complaints while agents and admins review and resolve them. The frontend routes these workflows through the API gateway to separate authentication, complaint, assignment, and notification services, backed by PostgreSQL; Eureka provides service discovery. Source excerpts show service-layer persistence and assignment/notification delegation, but do not expose all HTTP routing or gateway configuration, so those links are documented at the architecture level or omitted where uncertain.

Main entry points: [`backend/api-gateway/src/main/java/com/resolvenow/gateway`](https://github.com/nvsivakumar/soaproject-p27-s14/tree/main/backend/api-gateway/src/main/java/com/resolvenow/gateway) (API gateway), [`backend/auth-service/src/main/java/com/resolvenow/auth/service/AuthService.java`](https://github.com/nvsivakumar/soaproject-p27-s14/blob/main/backend/auth-service/src/main/java/com/resolvenow/auth/service/AuthService.java) (Authentication), [`backend/complaint-service/src/main/java/com/resolvenow/complaint/service/ComplaintService.java`](https://github.com/nvsivakumar/soaproject-p27-s14/blob/main/backend/complaint-service/src/main/java/com/resolvenow/complaint/service/ComplaintService.java) (Complaint workflow), [`backend/assignment-service/src/main/java/com/resolvenow/assignment/service/AssignmentService.java`](https://github.com/nvsivakumar/soaproject-p27-s14/blob/main/backend/assignment-service/src/main/java/com/resolvenow/assignment/service/AssignmentService.java) (Assignment logic)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web application"]
  node_app["Role-based routes<br/>[App.tsx]"]
  node_authctx["Session and theme<br/>[AuthContext.tsx]"]
  node_pages["Complaint screens"]
  node_api["API client<br/>[api.ts]"]
end

subgraph group_platform["Service platform"]
  node_gateway["API gateway"]
  node_eureka["Service registry"]
  node_userdb[("PostgreSQL")]
end

subgraph group_identity["Identity and access"]
  node_authctl["Auth endpoints"]
  node_authsvc["Authentication<br/>[AuthService.java]"]
  node_jwt["JWT service<br/>[JwtService.java]"]
  node_users["User and role model"]
end

subgraph group_complaints["Complaint workflow"]
  node_complaintctl["Complaint endpoints"]
  node_complaintsvc["Complaint workflow"]
  node_complaintmodel["Complaint model"]
end

subgraph group_operations["Assignment and notices"]
  node_assignmentclient["Assignment client"]
  node_assignmentctl["Assignment endpoints"]
  node_assignmentsvc["Assignment logic"]
  node_assignmentmodel["Assignment model"]
  node_notificationclient["Notification client"]
  node_notificationctl["Notification endpoints"]
  node_notificationsvc["Notification logic"]
  node_notificationmodel["Notification model"]
end

node_user(("Customer / staff"))

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_pages
node_app -->|"reads session"| node_authctx
node_pages -.->|"requests data"| node_api
node_api -->|"sends requests"| node_gateway
node_gateway -->|"routes requests"| node_authctl
node_gateway -->|"routes requests"| node_complaintctl
node_gateway -->|"routes requests"| node_assignmentctl
node_gateway -->|"routes requests"| node_notificationctl
node_authctl -->|"calls"| node_authsvc
node_authsvc -->|"uses"| node_users
node_authsvc -->|"generates tokens"| node_jwt
node_complaintctl -->|"calls"| node_complaintsvc
node_complaintsvc -->|"creates and maps"| node_complaintmodel
node_complaintsvc -->|"delegates assignment"| node_assignmentclient
node_assignmentclient -.->|"requests assignment"| node_assignmentctl
node_assignmentctl -->|"calls"| node_assignmentsvc
node_assignmentsvc -->|"creates assignment"| node_assignmentmodel
node_assignmentsvc -->|"sends notice"| node_notificationclient
node_notificationclient -.->|"posts notification"| node_notificationctl
node_notificationctl -->|"calls"| node_notificationsvc
node_notificationsvc -->|"creates and updates"| node_notificationmodel
node_authsvc -.->|"persists users"| node_userdb
node_complaintsvc -.->|"persists complaints"| node_userdb
node_assignmentsvc -.->|"persists assignments"| node_userdb
node_notificationsvc -.->|"persists notices"| node_userdb
node_gateway -.->|"discovers services"| node_eureka

click node_app "https://github.com/nvsivakumar/soaproject-p27-s14/blob/main/frontend/src/App.tsx"
click node_authctx "https://github.com/nvsivakumar/soaproject-p27-s14/blob/main/frontend/src/context/AuthContext.tsx"
click node_pages "https://github.com/nvsivakumar/soaproject-p27-s14/tree/main/frontend/src/pages"
click node_api "https://github.com/nvsivakumar/soaproject-p27-s14/blob/main/frontend/src/api/api.ts"
click node_gateway "https://github.com/nvsivakumar/soaproject-p27-s14/tree/main/backend/api-gateway/src/main/java/com/resolvenow/gateway"
click node_eureka "https://github.com/nvsivakumar/soaproject-p27-s14/blob/main/backend/eureka-server/src/main/java/com/resolvenow/eurekaserver/EurekaServerApplication.java"
click node_authctl "https://github.com/nvsivakumar/soaproject-p27-s14/blob/main/backend/auth-service/src/main/java/com/resolvenow/auth/controller/AuthController.java"
click node_authsvc "https://github.com/nvsivakumar/soaproject-p27-s14/blob/main/backend/auth-service/src/main/java/com/resolvenow/auth/service/AuthService.java"
click node_jwt "https://github.com/nvsivakumar/soaproject-p27-s14/blob/main/backend/auth-service/src/main/java/com/resolvenow/auth/security/JwtService.java"
click node_users "https://github.com/nvsivakumar/soaproject-p27-s14/tree/main/backend/auth-service/src/main/java/com/resolvenow/auth/entity"
click node_complaintctl "https://github.com/nvsivakumar/soaproject-p27-s14/blob/main/backend/complaint-service/src/main/java/com/resolvenow/complaint/controller/ComplaintController.java"
click node_complaintsvc "https://github.com/nvsivakumar/soaproject-p27-s14/blob/main/backend/complaint-service/src/main/java/com/resolvenow/complaint/service/ComplaintService.java"
click node_complaintmodel "https://github.com/nvsivakumar/soaproject-p27-s14/tree/main/backend/complaint-service/src/main/java/com/resolvenow/complaint/entity"
click node_assignmentclient "https://github.com/nvsivakumar/soaproject-p27-s14/blob/main/backend/complaint-service/src/main/java/com/resolvenow/complaint/client/AssignmentClient.java"
click node_assignmentctl "https://github.com/nvsivakumar/soaproject-p27-s14/blob/main/backend/assignment-service/src/main/java/com/resolvenow/assignment/controller/AssignmentController.java"
click node_assignmentsvc "https://github.com/nvsivakumar/soaproject-p27-s14/blob/main/backend/assignment-service/src/main/java/com/resolvenow/assignment/service/AssignmentService.java"
click node_assignmentmodel "https://github.com/nvsivakumar/soaproject-p27-s14/tree/main/backend/assignment-service/src/main/java/com/resolvenow/assignment/entity"
click node_notificationclient "https://github.com/nvsivakumar/soaproject-p27-s14/blob/main/backend/assignment-service/src/main/java/com/resolvenow/assignment/client/NotificationClient.java"
click node_notificationctl "https://github.com/nvsivakumar/soaproject-p27-s14/blob/main/backend/notification-service/src/main/java/com/resolvenow/notification/controller/NotificationController.java"
click node_notificationsvc "https://github.com/nvsivakumar/soaproject-p27-s14/blob/main/backend/notification-service/src/main/java/com/resolvenow/notification/service/NotificationService.java"
click node_notificationmodel "https://github.com/nvsivakumar/soaproject-p27-s14/tree/main/backend/notification-service/src/main/java/com/resolvenow/notification/entity"

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_app,node_authctx,node_pages,node_api toneBlue
class node_gateway,node_eureka,node_userdb toneAmber
class node_authctl,node_authsvc,node_jwt,node_users toneMint
class node_complaintctl,node_complaintsvc,node_complaintmodel toneRose
class node_assignmentclient,node_assignmentctl,node_assignmentsvc,node_assignmentmodel,node_notificationclient,node_notificationctl,node_notificationsvc,node_notificationmodel,node_user toneIndigo
```

## Components

### Web application

- [Role-based routes](https://github.com/nvsivakumar/soaproject-p27-s14/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Session and theme](https://github.com/nvsivakumar/soaproject-p27-s14/blob/main/frontend/src/context/AuthContext.tsx): `frontend/src/context/AuthContext.tsx`
- [Complaint screens](https://github.com/nvsivakumar/soaproject-p27-s14/tree/main/frontend/src/pages): `frontend/src/pages`
- [API client](https://github.com/nvsivakumar/soaproject-p27-s14/blob/main/frontend/src/api/api.ts): `frontend/src/api/api.ts`

### Service platform

- [API gateway](https://github.com/nvsivakumar/soaproject-p27-s14/tree/main/backend/api-gateway/src/main/java/com/resolvenow/gateway): `backend/api-gateway/src/main/java/com/resolvenow/gateway`
- [Service registry](https://github.com/nvsivakumar/soaproject-p27-s14/blob/main/backend/eureka-server/src/main/java/com/resolvenow/eurekaserver/EurekaServerApplication.java): `backend/eureka-server/src/main/java/com/resolvenow/eurekaserver/EurekaServerApplication.java`
- **PostgreSQL**

### Identity and access

- [Auth endpoints](https://github.com/nvsivakumar/soaproject-p27-s14/blob/main/backend/auth-service/src/main/java/com/resolvenow/auth/controller/AuthController.java): `backend/auth-service/src/main/java/com/resolvenow/auth/controller/AuthController.java`
- [Authentication](https://github.com/nvsivakumar/soaproject-p27-s14/blob/main/backend/auth-service/src/main/java/com/resolvenow/auth/service/AuthService.java): `backend/auth-service/src/main/java/com/resolvenow/auth/service/AuthService.java`
- [JWT service](https://github.com/nvsivakumar/soaproject-p27-s14/blob/main/backend/auth-service/src/main/java/com/resolvenow/auth/security/JwtService.java): `backend/auth-service/src/main/java/com/resolvenow/auth/security/JwtService.java`
- [User and role model](https://github.com/nvsivakumar/soaproject-p27-s14/tree/main/backend/auth-service/src/main/java/com/resolvenow/auth/entity): `backend/auth-service/src/main/java/com/resolvenow/auth/entity`

### Complaint workflow

- [Complaint endpoints](https://github.com/nvsivakumar/soaproject-p27-s14/blob/main/backend/complaint-service/src/main/java/com/resolvenow/complaint/controller/ComplaintController.java): `backend/complaint-service/src/main/java/com/resolvenow/complaint/controller/ComplaintController.java`
- [Complaint workflow](https://github.com/nvsivakumar/soaproject-p27-s14/blob/main/backend/complaint-service/src/main/java/com/resolvenow/complaint/service/ComplaintService.java): `backend/complaint-service/src/main/java/com/resolvenow/complaint/service/ComplaintService.java`
- [Complaint model](https://github.com/nvsivakumar/soaproject-p27-s14/tree/main/backend/complaint-service/src/main/java/com/resolvenow/complaint/entity): `backend/complaint-service/src/main/java/com/resolvenow/complaint/entity`

### Assignment and notices

- [Assignment client](https://github.com/nvsivakumar/soaproject-p27-s14/blob/main/backend/complaint-service/src/main/java/com/resolvenow/complaint/client/AssignmentClient.java): `backend/complaint-service/src/main/java/com/resolvenow/complaint/client/AssignmentClient.java`
- [Assignment endpoints](https://github.com/nvsivakumar/soaproject-p27-s14/blob/main/backend/assignment-service/src/main/java/com/resolvenow/assignment/controller/AssignmentController.java): `backend/assignment-service/src/main/java/com/resolvenow/assignment/controller/AssignmentController.java`
- [Assignment logic](https://github.com/nvsivakumar/soaproject-p27-s14/blob/main/backend/assignment-service/src/main/java/com/resolvenow/assignment/service/AssignmentService.java): `backend/assignment-service/src/main/java/com/resolvenow/assignment/service/AssignmentService.java`
- [Assignment model](https://github.com/nvsivakumar/soaproject-p27-s14/tree/main/backend/assignment-service/src/main/java/com/resolvenow/assignment/entity): `backend/assignment-service/src/main/java/com/resolvenow/assignment/entity`
- [Notification client](https://github.com/nvsivakumar/soaproject-p27-s14/blob/main/backend/assignment-service/src/main/java/com/resolvenow/assignment/client/NotificationClient.java): `backend/assignment-service/src/main/java/com/resolvenow/assignment/client/NotificationClient.java`
- [Notification endpoints](https://github.com/nvsivakumar/soaproject-p27-s14/blob/main/backend/notification-service/src/main/java/com/resolvenow/notification/controller/NotificationController.java): `backend/notification-service/src/main/java/com/resolvenow/notification/controller/NotificationController.java`
- [Notification logic](https://github.com/nvsivakumar/soaproject-p27-s14/blob/main/backend/notification-service/src/main/java/com/resolvenow/notification/service/NotificationService.java): `backend/notification-service/src/main/java/com/resolvenow/notification/service/NotificationService.java`
- [Notification model](https://github.com/nvsivakumar/soaproject-p27-s14/tree/main/backend/notification-service/src/main/java/com/resolvenow/notification/entity): `backend/notification-service/src/main/java/com/resolvenow/notification/entity`

### Other components

- **Customer / staff**

## Connections

- Customer / staff → Role-based routes: uses (evidence: `README.md`)
- Role-based routes → Complaint screens: routes to (evidence: `frontend/src/App.tsx`)
- Role-based routes → Session and theme: reads session (evidence: `frontend/src/App.tsx`)
- Complaint screens → API client: requests data
- API client → API gateway: sends requests (evidence: `README.md`)
- API gateway → Auth endpoints: routes requests (evidence: `README.md`)
- API gateway → Complaint endpoints: routes requests (evidence: `README.md`)
- API gateway → Assignment endpoints: routes requests (evidence: `README.md`)
- API gateway → Notification endpoints: routes requests (evidence: `README.md`)
- Auth endpoints → Authentication: calls (evidence: `backend/auth-service/src/main/java/com/resolvenow/auth/controller/AuthController.java`)
- Authentication → User and role model: uses (evidence: `backend/auth-service/src/main/java/com/resolvenow/auth/service/AuthService.java`)
- Authentication → JWT service: generates tokens (evidence: `backend/auth-service/src/main/java/com/resolvenow/auth/service/AuthService.java`)
- Complaint endpoints → Complaint workflow: calls (evidence: `backend/complaint-service/src/main/java/com/resolvenow/complaint/controller/ComplaintController.java`)
- Complaint workflow → Complaint model: creates and maps (evidence: `backend/complaint-service/src/main/java/com/resolvenow/complaint/service/ComplaintService.java`)
- Complaint workflow → Assignment client: delegates assignment (evidence: `backend/complaint-service/src/main/java/com/resolvenow/complaint/service/ComplaintService.java`)
- Assignment client → Assignment endpoints: requests assignment
- Assignment endpoints → Assignment logic: calls (evidence: `backend/assignment-service/src/main/java/com/resolvenow/assignment/controller/AssignmentController.java`)
- Assignment logic → Assignment model: creates assignment (evidence: `backend/assignment-service/src/main/java/com/resolvenow/assignment/service/AssignmentService.java`)
- Assignment logic → Notification client: sends notice (evidence: `backend/assignment-service/src/main/java/com/resolvenow/assignment/service/AssignmentService.java`)
- Notification client → Notification endpoints: posts notification
- Notification endpoints → Notification logic: calls (evidence: `backend/notification-service/src/main/java/com/resolvenow/notification/controller/NotificationController.java`)
- Notification logic → Notification model: creates and updates (evidence: `backend/notification-service/src/main/java/com/resolvenow/notification/service/NotificationService.java`)
- Authentication → PostgreSQL: persists users
- Complaint workflow → PostgreSQL: persists complaints
- Assignment logic → PostgreSQL: persists assignments
- Notification logic → PostgreSQL: persists notices
- API gateway → Service registry: discovers services
