Skip to content

Commit 231b6ad

Browse files
committed
added flow diagram
1 parent 48cab0e commit 231b6ad

3 files changed

Lines changed: 18 additions & 4 deletions

File tree

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Below are some of the features that could be implemented to further enhance the
4747

4848
- [ ] Allow a user with admin to add or remove patient from database
4949
- [ ] Add Integration test for the above function
50-
- [ ] Flow Diagrams to display how services interact with each other
50+
- [X] Flow Diagrams to display how services interact with each other
5151
- [ ] Add events such as update, delete patient for analytics-service to track via kafka
5252

5353
## Running the Project
@@ -62,6 +62,20 @@ Below are some of the features that could be implemented to further enhance the
6262

6363
- **Notes:** Many services require environment variables (DB, Kafka, gRPC endpoints). Check each service's `src/main/resources` for required settings before running.
6464

65+
## Flow Diagram
66+
67+
![Flow Diagram showcasing how all the services interact with each other](./demo/Flow%20Diagram.drawio.png)
68+
69+
### Explanation
70+
71+
The frontend client sends a request to the API gateway with a JWT token. The API gateway routes the request to the auth-service which checks whether the user exists and the token is valid.
72+
73+
Once verified, the API gateway routes the request to the patient service. This allows the user to create, edit, update, and delete patients.
74+
75+
The patient-service and billing-service communicate via gRPC protocol. When a new patient is added, a billing account is created for said patient.
76+
77+
The patient-service and analytics-service communicate via Kafka. A defined kafka topic (patients) ingests messages when a new patient is added and sends the message to the analytics-service, which has a consumer and displays the details of the added patient.
78+
6579
## Video Demo
6680

67-
This will be uploaded soon once I complete the frontend.
81+
This will be uploaded soon once I complete the frontend.

demo/Flow Diagram.drawio.png

33.5 KB
Loading
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
c:\Users\sbm76\Documents\Projects\patient-management-system\infrastructure\src\main\java\com\pm\infrastructure\Main.java
2-
c:\Users\sbm76\Documents\Projects\patient-management-system\infrastructure\src\main\java\com\pm\stack\LocalStack.java
1+
C:\Users\sbm76\Documents\Projects\patient-management-system\infrastructure\src\main\java\com\pm\infrastructure\Main.java
2+
C:\Users\sbm76\Documents\Projects\patient-management-system\infrastructure\src\main\java\com\pm\stack\LocalStack.java

0 commit comments

Comments
 (0)