EBsoft HMSBuild & Architecture Guide

Build Guide / 02

Technology stack

Every library in package.json earns its place — there's no generic starter-kit filler. Grouped by the job each one does.

Core framework

LibraryRole
react / react-dom 19UI runtime
typescript ~5.8Type safety across ~90 page modules
vite 6 + @vitejs/plugin-reactDev server and production bundler
react-router-dom 7Client-side routing across 231 routes
express 4Dev server middleware host + production API
tsxRuns the TypeScript server directly in dev, no separate compile step
esbuildBundles server.ts to a single CommonJS file for deploy

Styling & UI

LibraryRole
tailwindcss 4 + @tailwindcss/viteUtility-first styling, compiled by the Vite plugin (no separate PostCSS config)
shadcn + Radix primitives (radio-group, etc.)Accessible unstyled component primitives under components/ui
class-variance-authority, clsx, tailwind-mergeComposing conditional Tailwind class strings safely
lucide-reactIcon set used throughout every module
framer-motion / motionTransitions — modals, panel reveals, status changes
@fontsource-variable/geist, tw-animate-cssSelf-hosted variable font + animation utility classes

Data & platform

LibraryRole
firebase 11Client SDK: Auth, Firestore, real-time listeners
firebase-admin 13Server-side privileged access for cron jobs and admin operations
@google/genaiGemini API client behind the in-app AI assistant
node-cronDrives the daily automatic IPD bed-charge job
resendTransactional email (referral notices, reports)
serverless-httpAdapts the Express app to run inside a Netlify Function

Domain-specific tooling

LibraryRole
cornerstone-core, cornerstone-wado-image-loader, dicom-parserRendering DICOM medical images for the Radiology module
jspdf, jspdf-autotable, html2canvas, modern-screenshot, react-to-printGenerating and printing invoices, prescriptions and reports
qrcode.react, react-barcode, react-qr-codePatient/sample identifiers on printed labels and invoices
xlsxExporting reports (accounts, HR, stores) to Excel
rechartsDashboards — MIS, accounts, occupancy charts
dompurifySanitizing any HTML rendered from stored user input
date-fnsDate arithmetic for shifts, billing periods, leave

Deployment target

The app deploys to Netlify: static assets from dist/, API routes proxied to a single Netlify Function (netlify/functions/api.ts), and a catch-all rewrite so client-side routing works on refresh. See Build & Deployment for the full pipeline.