Clinova is an enterprise-grade, cloud-deployed, AI-assisted Clinical Command Center and Staff Orchestration platform. It decouples complex clinical scheduling, database administration, and artificial intelligence diagnostic reasoning into a unified, high-performance microservice architecture.
Tip
📖 Full System Architecture Document: For complete High-Level Design (HLD), Low-Level Design (LLD), component class diagrams, and multi-turn sequence diagrams, see SYSTEM_ARCHITECTURE_HLD_LLD.md.
Clinova utilizes a secure service-oriented model to separate patient interfaces, business logic, relational storage, and artificial intelligence reasoning engines:
graph TD
A["React Frontend (Vercel)"] -->|HTTPS / JWT Auth| B["Spring Boot Backend (Railway)"]
B -->|JPA / JDBC| C["MySQL Database (Railway)"]
B -->|Asynchronous REST| D["FastAPI AI Engine (Railway)"]
D -->|Parametric Classifier| E["Logistic Regression (41 Diseases, 132 Symptoms)"]
D -->|Dense Vector RAG| F["ChromaDB (gemini-embedding-001)"]
E -->|Prior Probabilities| G["Gemini 2.5 Flash Arbiter"]
F -->|Medical Evidence| G
G -->|Grounded Diagnosis & Diet| B
B -->|Transactional HTTPS| H["Brevo Email REST API"]
-
Hybrid AI Triage Engine (41 Conditions, 132 Symptoms): Combines statistical classification (calibrated Logistic Regression) with dense vector semantic search (ChromaDB +
gemini-embedding-001) and cognitive arbitration (Gemini 2.5 Flash). -
Empirical Diagnostic Tie-Breaking: Automatically detects when patient confidence is ambiguous (
$< 65%$ ) and asks targeted clinical discriminator questions. - Evidence-Grounded Explanations: Generates natural language rationales citing hallmark and excluded symptoms from clinical reference literature.
- Tailored 2-Day Recovery Diets: Automatically designs custom, vitals-aware daily nutrition plans on triage completion.
- Instant Specialist Booking: Automatically maps diagnoses to 41 clinical specialties and links directly to physician availability grids.
- Simulated Secure Payment Gateway: Multi-step payment validation for secure patient copays.
- Live Patient Queue: Visually tracks and displays active, upcoming, and past daily appointments.
- Sovereign Availability Scheduler: Empowers doctors to self-manage their weekly active hour blocks directly.
- Clinical Records Workspace: Integrated form to compile prescriptions, clinical notes, and view Gemini-analyzed triage diagnostics.
- Virtual Consultations: WebRTC-ready video portal mapped directly to live virtual appointments.
- Staff Orchestration: Centralized calendar grid managing weekly scheduling blocks for all verified staff.
- Verification Portal: Professional directory to audit, approve, and certify pending medical practitioner registrations.
- Live System Metrics: Observability charts tracking total visits, pending approvals, and active clinical consults.
The AI engine was benchmarked on 984 held-out stratified test records across 41 diseases and 132 symptoms:
- Logistic Regression (Production): 100.00% Accuracy, 1.00 Macro F1 (Selected for calibrated Bayesian posterior probabilities needed for clinical thresholding).
- Random Forest Baseline: 100.00% Accuracy, 1.00 Macro F1.
When patients report sparse, realistic complaints instead of complete textbook vectors:
| Symptoms Shown ( |
Mean Classifier Confidence | Classifier Accuracy | % Cases Below Triage Threshold ( |
% Cases in Genuine Tie (Margin |
|---|---|---|---|---|
| 28.63% | 59.86% | 90.35% | 52.34% | |
| 46.41% | 74.29% | 66.36% | 38.82% | |
| 60.11% | 86.08% | 45.43% | 25.51% | |
| Full Textbook | 96.21% | 100.00% | 0.00% | 0.00% |
Takeaway: At initial intake (
| Layer | Technologies |
|---|---|
| Frontend | React.js, Tailwind CSS, Axios, Heroicons, Recharts |
| Backend API | Java 21, Spring Boot 3.x, Spring Security 6, JWT, JPA, Hibernate, MySQL 8 |
| AI Triage Microservice | Python 3.12, FastAPI, Google Gemini 2.5 Flash, gemini-embedding-001, ChromaDB, Scikit-Learn, Pandas, NumPy |
| Integrations | Brevo HTTP Mail Client API (Port 443 HTTPS REST), Google GenAI SDK |
- Java: JDK 21+ installed and configured.
- Python: Python 3.10+ installed.
- Node.js: Node 18+ installed.
- Database: MySQL Server running locally (default fallback port
3306).
- Open your MySQL client and run:
CREATE DATABASE clinic_db;
- Navigate to the AI engine folder:
cd ai-triage-engine - Create and activate a python virtual environment:
python -m venv venv # On Windows: .\venv\Scripts\activate # On macOS/Linux: source venv/bin/activate
- Install dependencies:
pip install -r requirements.txt
- Set your Google Gemini API Key:
# On Windows (cmd): set GEMINI_API_KEY=your_gemini_api_key_here # On macOS/Linux: export GEMINI_API_KEY=your_gemini_api_key_here
- Start the FastAPI server:
- On Windows:
start_ai.bat
- On macOS/Linux:
uvicorn main:app --reload --port 8000
- On Windows:
- Navigate to the backend folder:
cd ../backend - Configure credentials in
src/main/resources/application.properties(defaults to port3306, usernameroot, passwordharsh@945). - Set your environment variables:
# On Windows: set GEMINI_API_KEY=your_gemini_api_key_here set BREVO_API_KEY=your_brevo_api_key_here # On macOS/Linux: export GEMINI_API_KEY=your_gemini_api_key_here export BREVO_API_KEY=your_brevo_api_key_here
- Compile and start the server:
# On Windows: .\mvnw.cmd spring-boot:run # On macOS/Linux: ./mvnw spring-boot:run
- Navigate to the frontend folder:
cd ../frontend - Install package dependencies:
npm install
- Start the Vite/CRA dev server:
npm start
- Open your browser and navigate to
http://localhost:3000to access Clinova!
Clinova uses automated CI/CD pipelines:
- Root Directory:
frontend - Build Command:
npm run build - Output Directory:
build - Environment Variable:
REACT_APP_API_URLset to your live Spring Boot URL.
- Java API Service: Root Directory set to
/backend. Port binds dynamically to${PORT:8080}. - MySQL Service: Dynamic instance linked to Java datasource configurations.
- Python AI Service: Root directory
/ai-triage-engine. Environment variableGEMINI_API_KEYbound to Google AI studio credentials. - Linking: Java backend uses
PYTHON_API_URLtargeting the Python microservice URL +/api/v1/chat.