How immohitsen/jeevveda works
Purpose and Runtime
JeevVeda is a Next.js/React prototype for early-stage cancer screening workflows: symptom/chat assessment, blood-report analysis, MRI/OSCC prediction, DICOM review, and persisted patient reports. It runs as a Node.js 18+ Next.js App Router application, with browser dashboard clients calling same-origin route handlers. Primary entry points are src/app/page.tsx, src/app/layout.tsx, and src/app/dashboard/layout.tsx.
Application Shell and Navigation
Public landing, login, and signup routes lead into a shared dashboard shell with responsive navigation. Dashboard pages are distinct feature workspaces rather than a single unified screening flow.
• src/app/dashboard/layout.tsx
• src/components/expandable-sidebar.tsx
• src/app/dashboard/page.tsx
Identity and Session Boundary
Authentication is implemented through user API endpoints, backed by database configuration and a user model. Client-side user state is exposed through a hook, allowing dashboard screens to determine the current user/session.
• src/app/api/users/login/route.ts
• src/app/api/users/signup/route.ts
• src/app/api/users/me/route.ts
• src/dbConfig/dbConfig.ts
• src/models/userModel.js
• src/hooks/useUser.ts
Screening and AI API Layer
Server-side App Router handlers isolate screening requests from UI pages. The symptom-risk, chatbot, blood-analysis, MRI, and OSCC routes are the integration boundary for model inference and external AI services; the README identifies Gemini 2.5 Pro for blood interpretation and describes prototype ML pipelines for symptom and imaging assessment.
• src/app/api/assess-risk/route.ts
• src/app/api/chat/route.ts
• src/app/api/blood-analyzer/route.ts
• src/app/api/mri-predict/route.ts
• src/app/api/oscc-predict/route.ts
Clinical Workflow Clients
Each screening modality has a dedicated dashboard route that gathers inputs, calls its API endpoint, and renders modality-specific output. Reusable report viewers separate presentation of blood, cancer/OSCC, and MRI results from the workflow pages.
• src/app/dashboard/blood-analyzer/page.tsx
• src/app/dashboard/chatbot/page.tsx
• src/app/dashboard/mri-analysis/page.tsx
• src/app/dashboard/oscc-analyzer/page.tsx
• src/components/blood-report-viewer.tsx
• src/components/mri-report-viewer.tsx
Imaging and DICOM Boundary
The DICOM viewer is a browser-facing imaging subsystem, with DICOM parsing/utilities kept outside route handlers. It is architecturally separate from the MRI prediction endpoint: one supports interactive image review, while the other performs predictive analysis.
• src/app/dashboard/dicom-viewer/page.tsx
• src/lib/dicom.ts
• src/app/api/mri-predict/route.ts
Reports, Helpdesk, and Persistence
Generated reports have collection and ID-addressable APIs, database model support, history/detail pages, and specialized viewers. Helpdesk is a parallel persisted support workflow. The database is likely MongoDB/Mongoose-oriented given the model layout and README terminology, but deployment and schema details should be verified in implementation.
• src/app/api/reports/route.ts
• src/app/api/reports/[id]/route.ts
• src/models/reportModel.js
• src/app/dashboard/report-history/page.tsx
• src/app/dashboard/report/[id]/page.tsx
• src/app/api/helpdesk/route.ts
• src/models/helpDeskModel.js
Main entry points: layout.tsx Dashboard shell · blood-analyzer/page.tsx Blood analyzer · mri-analysis/page.tsx MRI analysis · route.ts Reports API
Components 22
Browser & Dashboard
Next.js client routes and shared dashboard navigation.
- App shell · Root layout and public entry route.
src/app/layout.tsx - Dashboard shell · Shared authenticated workspace navigation.
src/app/dashboard/layout.tsx - Expandable sidebar
src/components/expandable-sidebar.tsx - Dashboard home
src/app/dashboard/page.tsx - User session hook · Exposes current user state to dashboard screens.
src/hooks/useUser.ts - Screening workspaces · Dedicated blood, chat, MRI, and OSCC workflows.
- Blood analyzer
src/app/dashboard/blood-analyzer/page.tsx - Chatbot assessment
src/app/dashboard/chatbot/page.tsx - MRI analysis
src/app/dashboard/mri-analysis/page.tsx - OSCC analyzer
src/app/dashboard/oscc-analyzer/page.tsx - Report viewers · Renders blood and MRI result reports.
src/components/blood-report-viewer.tsx - DICOM viewer · Interactive browser image review, separate from prediction.
src/app/dashboard/dicom-viewer/page.tsx - DICOM utilities · Parsing and viewer support outside route handlers.
src/lib/dicom.ts - Report history & detail · Lists persisted reports and opens ID-addressable details.
src/app/dashboard/report-history/page.tsx
Server API
Same-origin App Router route handlers.
- User auth API · Login, signup, and current-user endpoints.
- Screening AI API · Risk, chat, blood, MRI, and OSCC inference boundary.
- Reports API · Collection and ID-addressable report endpoints.
src/app/api/reports/route.ts - Helpdesk API · Persisted support workflow.
src/app/api/helpdesk/route.ts
Persistence
Database configuration and Mongoose-style models.
- Database connection
src/dbConfig/dbConfig.ts - User model
src/models/userModel.js - Report model
src/models/reportModel.js - Helpdesk model
src/models/helpDeskModel.js
Connections 25
- App shell → Dashboard shell: hosts
- Dashboard shell → Expandable sidebar: uses
- Dashboard shell → Dashboard home: routes to
- Dashboard shell → Screening workspaces: hosts
- Dashboard shell → DICOM viewer: hosts
- Dashboard shell → Report history & detail: hosts
- User session hook → User auth API: gets current user
- Screening workspaces → Blood analyzer: includes
- Screening workspaces → Chatbot assessment: includes
- Screening workspaces → MRI analysis: includes
- Screening workspaces → OSCC analyzer: includes
- Blood analyzer → Screening AI API: analyzes blood
- Chatbot assessment → Screening AI API: assesses symptoms
- MRI analysis → Screening AI API: requests prediction
- OSCC analyzer → Screening AI API: requests prediction
- Blood analyzer → Report viewers: renders results
- MRI analysis → Report viewers: renders results
- DICOM viewer → DICOM utilities: parses DICOM
- Report history & detail → Reports API: lists and fetches reports
- User auth API → Database connection: connects through
- User auth API → User model: reads and writes
- Reports API → Database connection: connects through
- Reports API → Report model: reads and writes
- Helpdesk API → Database connection: connects through
- Helpdesk API → Helpdesk model: persists requests