How dranzio/bungipin-clinic works
Bungipin Clinic is a role-based dental clinic management application, with a primary Express application and a separate backend API implementation. The main workflow is patient appointment booking and management, including schedule/slot checks and payment; clinic staff manage schedules, queues, patient records, and payments, while administrators manage services, users, and audit activity. Evidence is limited to the README, source index, and sampled excerpts, so unsampled subsystem links are omitted where not supported.
Main entry points: app.js Express application · PaymongoWebhook.js Payment webhook · BookingRoutes.js Appointment booking · PaymentRoutes.js Payment workflows
Components 26
Clinic application
- Express application
app.js - Appointment booking
Customer/BookingRoutes.js - Appointment history
Customer/HistoryRoutes.js - Clinic MySQL pool
db.js
Clinic operations
- Doctor schedules
Employee/doctorScheduleRoutes.js - Queue management
Employee/QueueRoutes.js - Patient records
Employee/PatientRecords.js - Staff booking requests
Employee/BookingRequest.js - Service catalog
Admin/ServiceRoutes.js
Identity and oversight
- Authentication
auth.js - Request authorization
authMiddleware.js - User administration
Admin/UserManage.js - Audit logging
Admin/auditLogRoutes.js
Payments
- Payment workflows
Services/PaymentRoutes.js - Payment webhook
Services/PaymongoWebhook.js - PayMongo client
Services/paymongo.js - Appointment email
AppointmentEmails.js
Separate backend API
- Backend Express app
backend/app.js - Backend route modules
backend/routes/appointmentRoutes.js - Appointment controller
backend/controllers/appointmentController.js - Backend token middleware
backend/middleware/authMiddleware.js - Backend MySQL pool
backend/config/db.js
Other components
- Patient
- Clinic staff
- Administrator
- PayMongo
Connections 41
- Patient → Express application: uses
- Clinic staff → Express application: uses
- Administrator → Express application: uses
- Express application → Appointment booking: registers
app.js - Express application → Appointment history: registers
app.js - Express application → Doctor schedules: registers
app.js - Express application → Queue management: registers
app.js - Express application → Patient records: registers
app.js - Express application → Staff booking requests: registers
app.js - Express application → Service catalog: registers
app.js - Express application → Payment workflows: registers
app.js - Express application → Payment webhook: registers
app.js - Express application → Authentication: loads
app.js - Appointment booking → Request authorization: authenticates
Customer/BookingRoutes.js - Appointment history → Request authorization: authenticates
Customer/HistoryRoutes.js - Doctor schedules → Request authorization: authenticates
Employee/doctorScheduleRoutes.js - Staff booking requests → Request authorization: authenticates
Employee/BookingRequest.js - Service catalog → Request authorization: authenticates
Admin/ServiceRoutes.js - Appointment booking → PayMongo client: creates checkout
Customer/BookingRoutes.js - Appointment booking → Appointment email: sends email
Customer/BookingRoutes.js - Appointment history → Payment webhook: syncs payments
Customer/HistoryRoutes.js - Payment workflows → PayMongo client: creates checkout
Services/PaymentRoutes.js - Payment workflows → Payment webhook: reconciles via
Services/PaymentRoutes.js - Payment workflows → Appointment email: sends email
Services/PaymentRoutes.js - Payment webhook → PayMongo client: verifies payment
Services/PaymongoWebhook.js - Payment webhook → Appointment email: sends email
Services/PaymongoWebhook.js - PayMongo → Payment webhook: posts events
Services/PaymongoWebhook.js - Appointment booking → Audit logging: logs activity
Customer/BookingRoutes.js - Appointment history → Audit logging: logs activity
Customer/HistoryRoutes.js - Service catalog → Audit logging: logs activity
Admin/ServiceRoutes.js - Payment workflows → Audit logging: logs activity
Services/PaymentRoutes.js - Payment webhook → Audit logging: logs activity
Services/PaymongoWebhook.js - Authentication → Clinic MySQL pool: queries
auth.js - Request authorization → Clinic MySQL pool: checks session
authMiddleware.js - Service catalog → Clinic MySQL pool: queries
Admin/ServiceRoutes.js - Appointment booking → Clinic MySQL pool: reads and writes
Customer/BookingRoutes.js - Payment workflows → Clinic MySQL pool: reads and writes
Services/PaymentRoutes.js - Backend Express app → Backend route modules: mounts routes
backend/app.js - Backend route modules → Appointment controller: dispatches
backend/routes/appointmentRoutes.js - Backend route modules → Backend token middleware: checks tokens
backend/routes/appointmentRoutes.js - Appointment controller → Backend MySQL pool: queries
backend/controllers/appointmentController.js