How aayushships/mediflow works
MediFlow is a Spring Boot clinic-management backend. Its principal workflow accepts appointment requests through REST controllers, delegates appointment operations to a service, persists clinic data, and is designed to publish events for background notifications. The graph also preserves patient and doctor/availability management, authentication, and notification-state handling. The README describes some asynchronous capabilities as planned; the source index confirms appointment publishing and storage references, but does not expose the consumer wiring, so that connection is shown only as documented.
Main entry points: AppointmentServiceImpl.java Appointment operations · AppointmentProducer.java Appointment producer · NotificationConsumer.java Notification consumer · DoctorController.java Doctor API
Components 26
REST API
- Appointment API
src/main/java/com/project/MediFlow/Controller/AppointmentController.java - Patient API
src/main/java/com/project/MediFlow/Controller/PatientController.java - Doctor API
src/main/java/com/project/MediFlow/Controller/DoctorController.java - Availability API
src/main/java/com/project/MediFlow/Controller/DoctorAvailabilityController.java - Authentication API
src/main/java/com/project/MediFlow/Controller/AuthController.java
Clinic workflows
- Appointment operations
src/main/java/com/project/MediFlow/Service/Impl/AppointmentServiceImpl.java - Patient operations
src/main/java/com/project/MediFlow/Service/Impl/PatientImpl.java - Doctor operations
src/main/java/com/project/MediFlow/Service/Impl/DoctorServiceImpl.java - Availability operations
src/main/java/com/project/MediFlow/Service/Impl/DoctorAvailabilityServiceImpl.java - Appointment repository
src/main/java/com/project/MediFlow/Repository/AppointmentRepository.java - Doctor repository
src/main/java/com/project/MediFlow/Repository/DoctorRepository.java - Patient repository
src/main/java/com/project/MediFlow/Repository/PatientRepository.java - Availability repository
src/main/java/com/project/MediFlow/Repository/DoctorAvailabilityRepository.java - Appointment record
src/main/java/com/project/MediFlow/entities/Appointment.java - Patient and doctor records
src/main/java/com/project/MediFlow/entities/Patient.java - Doctor availability record
src/main/java/com/project/MediFlow/entities/DoctorAvailability.java
Identity and access
- Authentication operations
src/main/java/com/project/MediFlow/Service/Impl/AuthServiceImpl.java - JWT service
src/main/java/com/project/MediFlow/security/JwtService.java
Async notifications
- Appointment event
src/main/java/com/project/MediFlow/RabbitMQ/Event/AppointmentEvent.java - Appointment producer
src/main/java/com/project/MediFlow/RabbitMQ/Producer/AppointmentProducer.java - Notification consumer
src/main/java/com/project/MediFlow/RabbitMQ/Consumer/NotificationConsumer.java - Appointment email
src/main/java/com/project/MediFlow/Email/AppointmentEmailService.java - Notification state
src/main/java/com/project/MediFlow/Service/NotificationStateService.java
Other components
- API client
- RabbitMQ
- PostgreSQL
Connections 26
- API client → Appointment API: calls
- Appointment API → Appointment operations: delegates
src/main/java/com/project/MediFlow/Controller/AppointmentController.java - API client → Patient API: calls
- Patient API → Patient operations: delegates
src/main/java/com/project/MediFlow/Controller/PatientController.java - Doctor API → Doctor operations: delegates
src/main/java/com/project/MediFlow/Controller/DoctorController.java - Doctor API → Appointment operations: queries slots
src/main/java/com/project/MediFlow/Controller/DoctorController.java - Availability API → Availability operations: delegates
src/main/java/com/project/MediFlow/Controller/DoctorAvailabilityController.java - Authentication API → Authentication operations: delegates
- Appointment operations → Appointment repository: reads and writes
src/main/java/com/project/MediFlow/Service/Impl/AppointmentServiceImpl.java - Appointment operations → Doctor repository: queries
src/main/java/com/project/MediFlow/Service/Impl/AppointmentServiceImpl.java - Appointment operations → Patient repository: queries
src/main/java/com/project/MediFlow/Service/Impl/AppointmentServiceImpl.java - Appointment operations → Availability repository: checks slots
src/main/java/com/project/MediFlow/Service/Impl/AppointmentServiceImpl.java - Appointment repository → Appointment record: stores
src/main/java/com/project/MediFlow/Repository/AppointmentRepository.java - Doctor repository → Patient and doctor records: stores doctor
- Patient repository → Patient and doctor records: stores patient
src/main/java/com/project/MediFlow/Repository/PatientRepository.java - Availability repository → Doctor availability record: stores
src/main/java/com/project/MediFlow/Repository/DoctorAvailabilityRepository.java - Appointment operations → Appointment producer: publishes event
src/main/java/com/project/MediFlow/Service/Impl/AppointmentServiceImpl.java - Appointment producer → Appointment event: creates payload
- Appointment producer → RabbitMQ: publishes
- RabbitMQ → Notification consumer: dispatches
- Notification consumer → Appointment email: sends email
- Notification consumer → Notification state: tracks delivery
- Authentication operations → JWT service: creates token
src/main/java/com/project/MediFlow/Service/Impl/AuthServiceImpl.java - Appointment operations → PostgreSQL: persists appointments
- Patient operations → PostgreSQL: persists patients
- Availability operations → PostgreSQL: persists availability