How adityash2006/curifix-all-in-one-health-management works
Project type and purpose
• Type: Full-stack web application (React frontend + Node.js/Express backend).
• Purpose: AI-powered health assistant (“CuriFix”) that provides symptom checking, report storage, medicine reminders, doctor locator, video consults, emergency calls, and user health profiles.
File structure
• Top-level split:
• frontend/ – React (Vite) SPA with pages (Home, Chat, Login, Signup), components (AI chat, dashboard, features), context, styling.
• backend/ – Express REST + WebSocket server with:
– middleware/auth.js
– routes (auth, chat, docs, clerk, wardRoutes, saveUserClerk)
– utils (ai.js, medicalsummary.js, textExtracter.js, socketManager.js)
– models (User, Document, Thread, Meetings)
– uploads/ – stored medical reports
– server.js
• Config/build files: package.json in each tier, Vite config, ESLint.
• CI: .github/workflows/cicd.yml
Extract key tech from README
• Frontend: React, Vite, TailwindCSS, ShadCN UI
• Backend: Node.js, Express
• Database: MongoDB (URI in .env), possibly PostgreSQL in future
• AI/NLP: OpenAI API (ClinicalBERT/BlueBERT), custom summarizer
• External services: Google Maps API, Twilio, Video SDK
• Cloud deployment: AWS / GCP
Main components & their interactions
a. User clients (Browser / Mobile SPA)
→ HTTP/HTTPS: REST calls to Express API (auth, docs, chat, reminders)
→ WebSocket: real-time chat (socketManager)
b. Express API server
– Routing layer (auth.js, docs.js, chat.js, clerk.js, wardRoutes.js)
– Business logic / controllers in utils (AI analysis, summarization, text extraction)
– Middleware (JWT auth)
– File uploads saved to uploads/ directory (could be abstracted to cloud storage)
c. Database (MongoDB)
– Persists Users, Documents, Threads, Meetings collections
d. AI/NLP services
– OpenAI API calls via ai.js
– Medical summary generation via medicalsummary.js
– Text extraction from uploaded reports via textExtracter.js
e. Real-time chat subsystem
– socketManager.js orchestrates WebSocket rooms, events
f. External integrations
– Google Maps API for doctor locator
– Twilio (SMS/call) for emergency reminders
– Video SDK for consultations
g. Cloud infrastructure
– Hosted on AWS/GCP with CI/CD (GitHub Actions)
Important architectural patterns
• Layered (Controller → Service/Utils → Data)
• MVC-inspired routing in Express
• Real-time event-driven chat via WebSockets
• Modular separation: AI utilities, auth, file uploads
• Clear frontend/back separation, context management in React