How khoathaycuoi/btl-java works
This is a dental-clinic management application with a React role-based portal and a Spring backend. The principal workflow is user sign-in, token-based session and role selection, then role-specific clinic tasks such as appointments, clinical records, prescriptions, and billing. The backend also covers staff, services, attendance, and equipment maintenance. The README provides no capability detail; several subsystem branches below are identified by the supplied file tree, so links involving unsampled code are dashed rather than asserted as verified calls.
Main entry points: repository Data repositories · App.jsx Portal and roles · Role_Admin.jsx Admin dashboard · AuthService.java Registration and login
Components 23
Web portal
- Portal and roles
nha-khoa-frontend/src/App.jsx - Auth API client
nha-khoa-frontend/src/api/Auth.js - User API client
nha-khoa-frontend/src/api/User.js - Admin dashboard
nha-khoa-frontend/src/components/roles/Role_Admin.jsx - Login and registration
nha-khoa-frontend/src/components/auth/LoginPage.jsx
Identity and users
- Authentication routes
nha-khoa-backend/src/main/java/com/nhakhoa/backend/controller/AuthController.java - Registration and login
nha-khoa-backend/src/main/java/com/nhakhoa/backend/service/AuthService.java - JWT service
nha-khoa-backend/src/main/java/com/nhakhoa/backend/security/JwtService.java - User routes
nha-khoa-backend/src/main/java/com/nhakhoa/backend/controller/UserController.java - User management
nha-khoa-backend/src/main/java/com/nhakhoa/backend/service/UserService.java
Dental care
- Appointment routes
nha-khoa-backend/src/main/java/com/nhakhoa/backend/controller/LichHenController.java - Appointment management
nha-khoa-backend/src/main/java/com/nhakhoa/backend/service/LichHenService.java - Clinical records and prescriptions
nha-khoa-backend/src/main/java/com/nhakhoa/backend/service/MedicalRecordService.java - Invoices
nha-khoa-backend/src/main/java/com/nhakhoa/backend/service/InvoiceService.java
Clinic operations
- Staff attendance
nha-khoa-backend/src/main/java/com/nhakhoa/backend/service/ChamCongService.java - Equipment maintenance
nha-khoa-backend/src/main/java/com/nhakhoa/backend/service/BaoTriService.java - Dental services
nha-khoa-backend/src/main/java/com/nhakhoa/backend/service/DichVuService.java - Service routes
nha-khoa-backend/src/main/java/com/nhakhoa/backend/controller/DichVuController.java
Domain data
- Clinic entities
nha-khoa-backend/src/main/java/com/nhakhoa/backend/entity - Data repositories
nha-khoa-backend/src/main/java/com/nhakhoa/backend/repository - Person and staff entities
nha-khoa-backend/src/main/java/com/nhakhoa/backend/entity/ConNguoi.java
Other components
- Clinic user
- Clinic backend
nha-khoa-backend/src/main/java/com/nhakhoa/backend/NhaKhoaBackendApplication.java
Connections 27
- Clinic user → Portal and roles: uses portal
nha-khoa-frontend/src/App.jsx - Portal and roles → Login and registration: renders login
nha-khoa-frontend/src/App.jsx - Portal and roles → Auth API client: logs in
nha-khoa-frontend/src/App.jsx - Portal and roles → User API client: loads profile
nha-khoa-frontend/src/App.jsx - Portal and roles → Admin dashboard: selects role view
nha-khoa-frontend/src/App.jsx - Admin dashboard → User API client: loads profile
nha-khoa-frontend/src/components/roles/Role_Admin.jsx - Auth API client → Clinic backend: HTTP requests
- User API client → Clinic backend: HTTP requests
- Clinic backend → Authentication routes: serves routes
- Authentication routes → Registration and login: delegates
- Registration and login → JWT service: generates token
nha-khoa-backend/src/main/java/com/nhakhoa/backend/service/AuthService.java - Registration and login → Data repositories: uses repositories
nha-khoa-backend/src/main/java/com/nhakhoa/backend/service/AuthService.java - User routes → User management: delegates
nha-khoa-backend/src/main/java/com/nhakhoa/backend/controller/UserController.java - User management → Data repositories: reads and updates
nha-khoa-backend/src/main/java/com/nhakhoa/backend/service/UserService.java - Appointment routes → Appointment management: delegates
nha-khoa-backend/src/main/java/com/nhakhoa/backend/controller/LichHenController.java - Appointment management → Data repositories: queries appointments
nha-khoa-backend/src/main/java/com/nhakhoa/backend/service/LichHenService.java - Service routes → Dental services: delegates
nha-khoa-backend/src/main/java/com/nhakhoa/backend/controller/DichVuController.java - Equipment maintenance → Data repositories: reads and writes
nha-khoa-backend/src/main/java/com/nhakhoa/backend/service/BaoTriService.java - Registration and login → Person and staff entities: creates people
nha-khoa-backend/src/main/java/com/nhakhoa/backend/service/AuthService.java - Appointment management → Clinic entities: uses clinic entities
nha-khoa-backend/src/main/java/com/nhakhoa/backend/service/LichHenService.java - Clinical records and prescriptions → Data repositories: uses data
- Invoices → Data repositories: uses data
- Staff attendance → Data repositories: uses data
nha-khoa-backend/src/main/java/com/nhakhoa/backend/service/ChamCongService.java - Dental services → Data repositories: uses data
- Admin dashboard → Clinical records and prescriptions: renders records pages
nha-khoa-frontend/src/components/roles/Role_Admin.jsx - Admin dashboard → Invoices: renders invoices page
nha-khoa-frontend/src/components/roles/Role_Admin.jsx - Admin dashboard → Dental services: renders services page
nha-khoa-frontend/src/components/roles/Role_Admin.jsx