Bridging Traditional Medicine with Modern Healthcare Technology
HealthSync is a comprehensive Electronic Medical Records (EMR) platform that revolutionizes healthcare management by seamlessly integrating ICD-11 disease classification, real-time collaboration, AI-powered medical insights, and instant access to relevant research papers. Built for organizations and healthcare professionals who demand precision, efficiency, and innovation.
-
Multi-Role Authentication System
- Secure JWT-based authentication
- Role-based access control (Organizations & Doctors)
- Session management with auto-keep-alive
-
Intelligent Patient Management
- Create and manage patient records
- ICD-11 disease code integration via WHO Clinical Tables API
- Real-time patient assignment to doctors
- Comprehensive diagnosis tracking with history
-
Real-Time Collaboration
- Socket.IO powered live updates
- Instant patient assignment notifications
- Connected doctors status monitoring
- Live dashboard synchronization
-
Research-powered Medical Insights
- Direct access to relevant research papers via SerpaAI when searching diseases
- Groq API integration for disease information
- Automated medical knowledge retrieval
- Comprehensive disease data including symptoms, treatments, and prognosis
- Evidence-based medical information
- Instant academic literature retrieval for any disease or condition
-
Advanced Analytics Dashboard
- Organization-wide patient statistics
- Visual data representation with interactive charts
- Recent patients and diagnosis tracking
- Doctor availability monitoring
βββ akankshrakesh-healthsync-react/
βββ package.json # Root monorepo package configuration
βββ vercel.json # Vercel deployment configuration with API routing
βββ api/
β βββ [...slug].js # Vercel serverless catch-all route handler
βββ backend/
β βββ README.md # Backend-specific documentation
β βββ index.js # Main server entry point with Socket.IO setup
β βββ package.json # Backend dependencies (Express, MongoDB, Socket.IO)
β βββ lib/
β β βββ mongo.js # MongoDB connection manager and database utilities
β β βββ userStore.js # User CRUD operations and authentication helpers
β βββ routes/
β βββ auth.js # Authentication endpoints (login, signup, /me, logout, password reset)
β βββ groq.js # AI-powered disease information via Groq API + research papers via SerpaAI
β βββ icd11.js # WHO ICD-11 disease code search proxy
β βββ notifications.js # User notification management system
β βββ organizations.js # Organization management and doctor assignment
β βββ patients.js # Patient CRUD, diagnosis tracking, and medical records
βββ react/
βββ README.md # Frontend-specific documentation
βββ eslint.config.js # ESLint configuration with TypeScript rules
βββ index.html # Main HTML entry point
βββ package.json # Frontend dependencies (React 19, Vite, TailwindCSS)
βββ tsconfig.app.json # TypeScript config for application code
βββ tsconfig.json # Base TypeScript configuration
βββ tsconfig.node.json # TypeScript config for Node.js scripts
βββ vite.config.ts # Vite build configuration with React plugin
βββ .env.production # Production environment variables
βββ src/
βββ App.css # Global application styles
βββ green.index.css # Theme-specific stylesheet (green variant)
βββ index.css # Base styles and Tailwind directives
βββ main.tsx # Application entry point with routing and providers
βββ components/
β βββ auth-guard.tsx # Protected route wrapper with authentication check
β βββ community.tsx # Landing page community section
β βββ cta.tsx # Call-to-action component for landing page
β βββ footer.tsx # Application footer with links
β βββ forgot-password.tsx # Password recovery form
β βββ header.tsx # Navigation header with theme toggle
β βββ hero.tsx # Landing page hero section
β βββ login.tsx # User login form with JWT authentication
β βββ reactBit.tsx # Animated dark mode veil effect component
β βββ signup.tsx # User registration form (doctor/organization)
β βββ theme-toggle.tsx # Dark/light mode switcher
β βββ dashboard/
β β βββ AddDiagnosisModal.tsx # Modal for adding patient diagnosis with ICD-11
β β βββ AnalyticsTab.tsx # Visual analytics with charts and statistics
β β βββ ConfirmDeleteModal.tsx # Confirmation dialog for patient deletion
β β βββ dashboard-header.tsx # Dashboard navigation and user menu
β β βββ DashboardLayout.tsx # Main dashboard layout with sidebar
β β βββ EditPatientModal.tsx # Modal for editing patient information
β β βββ emr-dashboard.tsx # Main EMR dashboard (org vs doctor views)
β β βββ icd11.tsx # ICD-11 disease code search interface
β β βββ NewPatientModal.tsx # Modal for creating new patient records
β β βββ NotificationCenter.tsx # Real-time notification dropdown
β β βββ OrgDoctorsPanel.tsx # Organization's doctor list with drag-drop assignment
β β βββ PatientsPage.tsx # Full patient list with search and filters
β β βββ RecentDiagnosis.tsx # Recent diagnoses widget for dashboard
β β βββ RecentlyAssignedPanel.tsx # Doctor's assigned patients panel
β β βββ RecentPatients.tsx # Recent patients widget with quick actions
β β βββ ReportsModal.tsx # Patient reports and medical history viewer
β β βββ ReportsPage.tsx # Comprehensive reports page
β β βββ settings.tsx # User settings and preferences
β β βββ sidebar.tsx # Dashboard navigation sidebar
β β βββ stat-card.tsx # Reusable statistic card component
β βββ pages/
β β βββ about.tsx # About page with project information
β β βββ home.tsx # Landing page with all sections
β βββ ui/
β βββ badge.tsx # Styled badge component (Radix UI)
β βββ button.tsx # Reusable button component with variants
β βββ card.tsx # Card component for content containers
β βββ icons.jsx # Icon components library (JSX)
β βββ icons.tsx # Icon components library (TypeScript)
β βββ input.tsx # Form input component with validation
βββ lib/
βββ auth.tsx # Authentication context provider and hooks
βββ keepAlive.ts # Backend keep-alive utility for Render
βββ mongo.ts # Frontend MongoDB utilities (if needed)
βββ socket.tsx # Socket.IO provider component
βββ socketContext.ts # Socket.IO React context definition
βββ useSocket.ts # Custom hook for Socket.IO connection
βββ utils.ts # Utility functions (classNames, formatters, etc.)
- Framework: React 19 + TypeScript
- Build Tool: Vite 7
- Styling: Tailwind CSS 4
- Routing: React Router v7
- Animations: Framer Motion, GSAP
- UI Components: Radix UI
- Real-time: Socket.IO Client
- Runtime: Node.js 22
- Framework: Express.js
- Database: MongoDB
- Authentication: JWT + bcrypt
- Real-time: Socket.IO Server
- AI Integration: Groq API
- External APIs: WHO ICD-11 Clinical Tables + SerpaAI for research papers
π For detailed setup instructions, see SETUP.md
- Node.js 22.x or higher
- MongoDB instance (local or cloud)
- npm or yarn package manager
-
Clone the repository
git clone https://github.com/AkankshRakesh/healthsync-react cd HealthSync-React -
Install dependencies
# Install root dependencies npm install # Install backend dependencies cd backend npm install # Install frontend dependencies cd ../react npm install
-
Configure environment variables
Create
.envin thebackend/directory:# Database MONGODB_URI=mongodb-uri MONGODB_DB=healthsync # Authentication JWT_SECRET=your-jwt-key # Server PORT=4000 FRONTEND_URL=http://localhost:3000 # To switch between socket and socket-less ENABLE_SOCKETS=true # AI Integration (Optional) GROQ_API_KEY=your-groq-api-key
Create
.envin thereact/directory:VITE_API_URL=http://localhost:4000 VITE_SOCKET_URL=http://localhost:4000
-
Start the development servers
Backend (Terminal 1):
cd backend npm run devFrontend (Terminal 2):
cd react npm run dev -
Access the application
- Frontend:
http://localhost:3000 - Backend API:
http://localhost:4000
- Frontend:
- Sign Up as an organization
- View Dashboard to see all patients and doctors
- Assign Patients to doctors via drag-and-drop interface
- Monitor Activity through real-time analytics
- Track Connected Doctors for instant collaboration
- Sign Up or with your organization name
- View Assigned Patients in your dashboard
- Add Diagnoses with ICD-11 disease codes
- Search Disease Information using AI-powered insights
- Access Research Papers directly when searching any disease or condition
- Track Patient History and treatment progress
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
POST |
/api/auth/signup |
Create new account (Doctor/Organization) | β |
POST |
/api/auth/login |
Authenticate user and receive JWT token | β |
GET |
/api/auth/me |
Get current authenticated user profile | β |
POST |
/api/auth/logout |
Logout user and invalidate session | β |
POST |
/api/auth/forgot-password |
Request password recovery email | β |
POST |
/api/auth/reset-password |
Reset password with recovery token | β |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
POST |
/api/patients |
Create new patient record | β |
GET |
/api/patients |
List all patients (filtered by role) | β |
GET |
/api/patients/:id |
Get detailed patient information | β |
PUT |
/api/patients/:id |
Update patient information | β |
DELETE |
/api/patients/:id |
Delete patient record | β |
GET |
/api/patients/diagnosis |
Get all diagnoses across patients | β |
POST |
/api/patients/:id/diagnosis |
Add ICD-11 diagnosis to patient | β |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
GET |
/api/organizations |
List all organizations in system | β |
GET |
/api/organizations/:id/doctors |
Get all doctors in organization | β |
POST |
/api/organizations/:id/assign |
Assign patient to doctor (real-time notification) | β |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
GET |
/api/icd11/search |
Search WHO ICD-11 disease codes by query | β |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
POST |
/api/groq/disease-info |
Get AI-powered disease info + research papers via SerpaAI | β |
POST |
/api/groq/diagnosis-summary |
Generate comprehensive diagnosis summary | β |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
GET |
/api/notifications |
Get user notifications (patient assignments, updates) | β |
- Password Hashing: bcrypt with salt rounds
- JWT Tokens: 7-day expiration with secure signing
- CORS Protection: Configured for production
- Input Validation: Server-side validation on all endpoints
- MongoDB Injection Prevention: Parameterized queries
- Real-time Authentication: Socket.IO middleware verification
cd react
npm run build
# Deploy to Vercel via GitHub integration or CLIcd backend
npm start
# Configure environment variables on platform
# Set ENABLE_SOCKETS=true for real-time features- Set
MONGODB_URIto production database - Generate strong
JWT_SECRET - Configure
FRONTEND_URLfor CORS - Enable
ENABLE_SOCKETSfor real-time features - Add
GROQ_API_KEYfor ICD-11 data - Add
SERPAPI_KEYfor reasearch papers on diseases
npm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build
npm run lint # Lint codenpm run dev # Start with nodemon (auto-reload)
npm start # Start production serverContributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request