How yasin-horani/clinics-system works
This repository is a clinic-management system split into Doctor, Patient, and Payment services, with a Eureka service-discovery application. The clearest user workflow is patient-facing: a request reaches the Patient API, patient operations are handled and persisted, and payment requests are forwarded to the payment service. Doctor APIs provide a second entry point for patient and payment operations. The README contains no architectural details; cross-service arrows are omitted where the sampled source does not show the HTTP wiring.
Main entry points: PatientService.java Patient operations · PaymentService.java Payment operations · DoctorPatientController.java Doctor endpoints · DoctorPatientPaymentController.java Doctor payment endpoints
Components 24
Doctor API
- Doctor endpoints
clinics/doctor/src/main/java/com/microservices/doctor/controller/DoctorPatientController.java - Doctor payment endpoints
clinics/doctor/src/main/java/com/microservices/doctor/controller/DoctorPatientPaymentController.java - Patient coordination
clinics/doctor/src/main/java/com/microservices/doctor/service/DoctorPatientService.java - Payment coordination
clinics/doctor/src/main/java/com/microservices/doctor/service/DoctorPatientPaymentService.java - Patient client
clinics/doctor/src/main/java/com/microservices/doctor/proxy/PatientProxy.java - Payment client
clinics/doctor/src/main/java/com/microservices/doctor/proxy/PaymentProxy.java
Patient Service
- Patient endpoints
clinics/patient/src/main/java/com/microservices/patient/controller/PatientController.java - Patient operations
clinics/patient/src/main/java/com/microservices/patient/service/PatientService.java - Patient DTOs
clinics/patient/src/main/java/com/microservices/patient/model/dto - Patient record
clinics/patient/src/main/java/com/microservices/patient/model/entity/Patient.java - Patient mapper
clinics/patient/src/main/java/com/microservices/patient/model/mapper/PatientMapper.java - Patient repository
clinics/patient/src/main/java/com/microservices/patient/repository/PatientRepo.java - Patient database
clinics/patient/src/main/java/com/microservices/patient/repository/PatientRepo.java - Patient payment endpoints
clinics/patient/src/main/java/com/microservices/patient/controller/payment/PatientPaymentController.java - Payment forwarding
clinics/patient/src/main/java/com/microservices/patient/service/patientPaymentService/PatientPaymentService.java - Payment client
clinics/patient/src/main/java/com/microservices/patient/proxy/PatientPaymentProxy.java
Payment Service
- Payment endpoints
clinics/pay/src/main/java/com/microservices/pay/controller/PaymentController.java - Payment operations
clinics/pay/src/main/java/com/microservices/pay/service/PaymentService.java - Payment DTOs
clinics/pay/src/main/java/com/microservices/pay/model/dto - Payment mapper
clinics/pay/src/main/java/com/microservices/pay/model/mapper/PaymentMapper.java - Payment repository
clinics/pay/src/main/java/com/microservices/pay/repository/PaymentRepo.java - Payment database
clinics/pay/src/main/java/com/microservices/pay/repository/PaymentRepo.java
Service Discovery
- Eureka server
clinics/eureka/src/main/java/com/microservices/eureka/EurekaApplication.java
Other components
- API caller
Connections 19
- API caller → Doctor endpoints: requests
clinics/doctor/src/main/java/com/microservices/doctor/controller/DoctorPatientController.java - API caller → Doctor payment endpoints: requests
clinics/doctor/src/main/java/com/microservices/doctor/controller/DoctorPatientPaymentController.java - Doctor endpoints → Patient coordination: delegates
clinics/doctor/src/main/java/com/microservices/doctor/controller/DoctorPatientController.java - Patient coordination → Patient client: calls
clinics/doctor/src/main/java/com/microservices/doctor/service/DoctorPatientService.java - Doctor payment endpoints → Payment coordination: delegates
clinics/doctor/src/main/java/com/microservices/doctor/controller/DoctorPatientPaymentController.java - Payment coordination → Payment client: calls
clinics/doctor/src/main/java/com/microservices/doctor/service/DoctorPatientPaymentService.java - API caller → Patient endpoints: requests
clinics/patient/src/main/java/com/microservices/patient/controller/PatientController.java - Patient endpoints → Patient operations: delegates
clinics/patient/src/main/java/com/microservices/patient/controller/PatientController.java - Patient operations → Patient repository: reads and writes
clinics/patient/src/main/java/com/microservices/patient/service/PatientService.java - Patient operations → Patient mapper: maps records
clinics/patient/src/main/java/com/microservices/patient/service/PatientService.java - Patient operations → Patient database: persists records
clinics/patient/src/main/java/com/microservices/patient/service/PatientService.java - API caller → Patient payment endpoints: requests
clinics/patient/src/main/java/com/microservices/patient/controller/payment/PatientPaymentController.java - Patient payment endpoints → Payment forwarding: delegates
clinics/patient/src/main/java/com/microservices/patient/controller/payment/PatientPaymentController.java - Payment forwarding → Payment client: calls
clinics/patient/src/main/java/com/microservices/patient/service/patientPaymentService/PatientPaymentService.java - API caller → Payment endpoints: requests
clinics/pay/src/main/java/com/microservices/pay/controller/PaymentController.java - Payment endpoints → Payment operations: delegates
clinics/pay/src/main/java/com/microservices/pay/controller/PaymentController.java - Payment operations → Payment repository: reads and writes
clinics/pay/src/main/java/com/microservices/pay/service/PaymentService.java - Payment operations → Payment mapper: maps records
clinics/pay/src/main/java/com/microservices/pay/service/PaymentService.java - Payment operations → Payment database: persists payments
clinics/pay/src/main/java/com/microservices/pay/service/PaymentService.java