How shubham2095/nidan works
NIDAN is a clinic website with online appointment booking and a staff CRM. Visitors browse clinic information and submit bookings or enquiries; staff authenticate to manage appointments, patients, leads, follow-ups, vaccinations, and site content. The React app routes public and admin experiences to an Express API, whose services implement business operations over Sequelize models and a MySQL/MariaDB database. The README documents additional booking, SEO, and content capabilities; several implementation paths below are directory-level because their source was not sampled.
Main entry points: App.jsx Admin Pages · models/index.js Clinic Models · routes/index.js API Routes · booking.service.js Booking Engine
Components 24
Public Website
- Public Pages
client/src/App.jsx - Site Content
client/src/context/SiteContext.jsx - Booking Flow
client/src/pages/public/BookAppointmentPage.jsx
Clinic CRM
- Admin Pages
client/src/App.jsx - Patient Records
client/src/pages/admin/PatientDetailPage.jsx - Leads Follow-ups
client/src/pages/admin/LeadsPage.jsx - Appointments
client/src/pages/admin/AppointmentsPage.jsx - Vaccination Tracker
client/src/pages/admin/VaccinationsPage.jsx - Content Admin
client/src/components/admin/ResourceManager.jsx
API and Services
- Express API
server/server.js - API Routes
server/routes/index.js - Public Content API
server/controllers/public.controller.js - CRM Controllers
server/controllers/crm.controller.js - Patient Controller
server/controllers/patient.controller.js - Session and Roles
server/middleware/auth.js - Booking Engine
server/services/booking.service.js - Public Content
server/services/publicContent.service.js - Lead Service
server/services/lead.service.js - Patient Service
server/services/patient.service.js
Clinic Data
- Clinic Models
server/models/index.js - MySQL Database
server/config/db.js
Other components
- Visitor
- Clinic Staff
- SMTP Email
Connections 24
- Visitor → Public Pages: browses
README.md - Public Pages → Site Content: loads site data
client/src/context/SiteContext.jsx - Public Pages → Booking Flow: routes to booking
client/src/App.jsx - Booking Flow → Booking Engine: submits booking
README.md - Clinic Staff → Admin Pages: uses CRM
README.md - Admin Pages → Patient Records: routes to records
client/src/App.jsx - Admin Pages → Leads Follow-ups: routes to leads
client/src/App.jsx - Admin Pages → Appointments: routes to appointments
client/src/App.jsx - Admin Pages → Vaccination Tracker: routes to vaccinations
client/src/App.jsx - Admin Pages → Content Admin: routes to content tools
client/src/App.jsx - Express API → API Routes: mounts API routes
server/server.js - API Routes → Session and Roles: guards staff routes
- API Routes → CRM Controllers: dispatches CRM requests
- API Routes → Patient Controller: dispatches patient requests
- CRM Controllers → Lead Service: calls lead service
server/controllers/crm.controller.js - Patient Controller → Patient Service: calls patient service
server/controllers/patient.controller.js - Public Content API → Public Content: calls content service
server/controllers/public.controller.js - Public Content API → Lead Service: creates enquiry lead
server/controllers/public.controller.js - Booking Engine → Clinic Models: uses booking models
- Public Content → Clinic Models: reads content models
server/services/publicContent.service.js - Lead Service → Clinic Models: reads and writes
server/services/lead.service.js - Patient Service → Clinic Models: uses patient models
- Clinic Models → MySQL Database: persists records
server/models/index.js - Booking Engine → SMTP Email: sends booking email
README.md