How lhknguyen15/fomed-api works
FoMed is a clinic-management backend API. Patients and clinic staff send requests to its endpoints; authentication and domain services handle booking and appointment status, doctor schedules, patient/doctor profiles, and clinical records including prescriptions, service orders and lab results. Services access SQL Server through repositories and a Unit of Work, while JWTs support authenticated and role-restricted requests. The README identifies billing and catalog modules as product areas, though their implementation was not sampled; their links are therefore limited to the documented API structure.
Main entry points: Program.cs API host · UnitOfWork.cs Unit of Work · AuthService.cs Auth service · AuthController.cs Authentication
Components 21
API and identity
- API host
FoMed-API/FoMed.Api/Program.cs - Authentication
FoMed-API/FoMed.Api/Controllers/AuthController.cs - Auth service
FoMed-API/FoMed.Application/Services/Auth/AuthService.cs - JWT tokens
FoMed-API/FoMed.Infrastructure/Authentication/JwtTokenService.cs
Appointments and schedules
- Appointments API
FoMed-API/FoMed.Api/Controllers/AppointmentController.cs - Appointment service
FoMed-API/FoMed.Application/Services/Appointment/AppointmentService.cs - Schedule API
FoMed-API/FoMed.Api/Controllers/DoctorScheduleController.cs - Schedule service
FoMed-API/FoMed.Application/Services/Doctor/DoctorScheduleService.cs
Clinical and billing
- Clinical API
FoMed-API/FoMed.Api/Controllers/ClinicalController.cs - Clinical service
FoMed-API/FoMed.Application/Services/Clinical/ClinicalService.cs - Invoice API
FoMed-API/FoMed.Api/Controllers/InvoiceController.cs - Billing service
FoMed-API/FoMed.Application/Services/Clinical/BillingService.cs
People and catalog
- Doctor API
FoMed-API/FoMed.Api/Controllers/DoctorController.cs - Doctor service
FoMed-API/FoMed.Application/Services/Doctor/DoctorService.cs - Patient API
FoMed-API/FoMed.Api/Controllers/PatientController.cs - Profile API
FoMed-API/FoMed.Api/Controllers/ProfileController.cs - Public catalog
FoMed-API/FoMed.Api/Controllers/PublicCatalogController.cs
Persistence
- Unit of Work
FoMed-API/FoMed.Infrastructure/UnitOfWork/UnitOfWork.cs - Appointment repository
FoMed-API/FoMed.Infrastructure/Repositories/AppointmentRepository.cs - Clinic database
FoMed-API/FoMed.Infrastructure/DbContext/FoMedDbContext.cs
Other components
- API clients
Connections 27
- API clients → API host: sends requests
- API host → Authentication: routes
- API host → Appointments API: routes
- API host → Schedule API: routes
- API host → Clinical API: routes
- API host → Invoice API: routes
- API host → Doctor API: routes
- API host → Patient API: routes
- API host → Profile API: routes
- API host → Public catalog: routes
- Authentication → Auth service: invokes
- Auth service → Unit of Work: reads and writes
- Auth service → JWT tokens: creates token
- Appointments API → Appointment service: invokes
- Appointment service → Unit of Work: reads and writes
- Schedule API → Schedule service: invokes
- Schedule service → Unit of Work: reads and writes
- Clinical API → Clinical service: invokes
- Clinical service → Clinic database: queries and writes
- Invoice API → Billing service: invokes
- Doctor API → Doctor service: invokes
- Doctor service → Unit of Work: accesses data
- Patient API → Unit of Work: accesses data
- Profile API → Unit of Work: accesses data
- Public catalog → Unit of Work: accesses data
- Unit of Work → Appointment repository: provides repository
- Appointment repository → Clinic database: queries and writes