How jstmejosh/new-clincare works
Clinicare is a clinic-management application for patients and care-team staff. Patients register, verify and onboard, book appointments, and view their appointments and payments; staff manage patients, doctors, rooms, inpatients, appointments, payments, users, and dashboard summaries. The client routes users through authentication and role-aware pages, while its API modules communicate with an Express server that dispatches requests through route, controller, and service layers to MongoDB-backed models. The tree documents the wider domain, but sampled service code is limited; links for unsampled domain wiring are therefore kept at the established server entry and route boundaries.
Main entry points: AppRoutes.jsx Access and routes · user.service.js Account service · index.jsx Patient journeys · routes API route dispatch
Components 21
Client experience
- Client application
client/src/App.jsx - Access and routes
client/src/routes/AppRoutes.jsx - Route guards
client/src/routes/ProtectedRoutes.jsx - Authentication state
client/src/store/AuthProvider.jsx - Patient journeys
client/src/pages/patientsOnboard/index.jsx - Staff dashboard
client/src/pages/dashboard/index.jsx
API boundary
- HTTP client
client/src/utils/axiosInstance.js - Domain API modules
client/src/api
Server runtime
- Express application
server/index.js - API route dispatch
server/src/routes - Request middleware
server/src/middlewares - Request controllers
server/src/controllers
Clinic operations
- Domain services
server/src/services - Account service
server/src/services/user.service.js - Clinic data models
server/src/models - MongoDB
External services
- Email delivery
server/src/services/email.service.js - Cloudinary media
server/src/utils/cloudinary.js - Payment checkout
client/src/components/Paystack.jsx
Other components
- Patients and public
- Clinic staff
Connections 22
- Patients and public → Client application: use
- Clinic staff → Client application: use
- Client application → Access and routes: renders
- Access and routes → Route guards: applies access
- Access and routes → Patient journeys: routes patients
- Access and routes → Staff dashboard: routes staff
- Route guards → Authentication state: checks session
- Patient journeys → Domain API modules: requests clinic data
- Staff dashboard → Domain API modules: requests clinic data
- Domain API modules → HTTP client: uses HTTP client
- HTTP client → Express application: sends requests
- Express application → API route dispatch: mounts routes
- API route dispatch → Request middleware: applies guards
- API route dispatch → Request controllers: dispatches
- Request controllers → Domain services: calls domain logic
- Request controllers → Account service: calls account operations
- Account service → Clinic data models: reads and writes
- Domain services → Clinic data models: accesses domain data
- Clinic data models → MongoDB: persists records
- Account service → Email delivery: sends verification
- Account service → Cloudinary media: manages avatars
- Patient journeys → Payment checkout: payment flow