GeneLink is a modern, full-stack, AI-powered hereditary health tracking system. Unlike traditional electronic health records (EHRs), GeneLink natively implements zero-trust architecture, automated machine learning (ML) predictive analytics, and a grounded AI chatbot to track, analyze, and forecast both immediate and hereditary health risks.
- Zero-Trust Access Model: Doctors cannot arbitrarily search for patients. Access is strictly granted via dynamic, time-sensitive Email OTPs sent directly to the patient's registered email.
- Hereditary Tracing Algorithm: Recursively parses MongoDB collections to evaluate the medical history, blood tests, and genetic traits of a patient's ancestors, adjusting risk scores dynamically.
- Predictive ML Pipelines: Uses Scikit-learn (Random Forests & Linear Regression) to predict diabetes, heart disease, hypertension probabilities, and forecasts next-year blood test trajectories.
- Cybersecurity Hardened: Features Fernet encryption for data persistence, mathematical input clamping to prevent ML exploitation, absolute-path Dataset constraints, and Differential Privacy layers.
- HELIX AI Chatbot: Built-in Google Gemini AI assistant integrated with Google Custom Search to provide patients with grounded, real-time medical literacy natively inside their dashboard.
- Administrative Edit Pool: Patients and doctors request specific data mutations via an "Edit Request" pool that requires System Admin oversight to approve or reject, ensuring an immutable health ledger structure.
- Frontend: Vanilla HTML5, CSS3, JavaScript (Lightweight, dependency-free)
- Backend: Python 3, FastAPI, Uvicorn (Asynchronous, highly concurrent)
- Database: MongoDB Atlas via
pymongo(Flexible document trees) - AI & Machine Learning:
google-genai, Scikit-learn, Pandas, NumPy - Security & Utility:
cryptography,python-dotenv,resend
Ensure you have the following installed on your machine before running GeneLink:
- Python 3.8+
- An active MongoDB Atlas Cluster (or Local MongoDB)
- Applicable API Keys (Google Gemini, Google Search API, Resend API)
-
Navigate to the core directory:
cd "Genelink"
-
Install all required dependencies:
pip install fastapi uvicorn[standard] pymongo[srv] dnspython scikit-learn pandas numpy google-genai resend python-dotenv cryptography
-
Configure Environment Variables: A
.envfile gracefully handles all secrets. In the root of theGenelinkfolder, ensure you have a.envfile structured as follows:MONGO_URI="mongodb+srv://<auth>@<cluster>.mongodb.net/?appName=<app>" RESEND_API_KEY="re_YOUR_KEY" GEMINI_API_KEY="AIza_YOUR_KEY" SEARCH_API_KEY="AIza_YOUR_KEY" SEARCH_CX="your_search_cx_engine_id" ENCRYPTION_KEY="your_32_byte_base64_fernet_key="
(Note: If
ENCRYPTION_KEYis omitted, the system will auto-generate an ephemeral one on launch, though this resets per session).
Run the application via Uvicorn within your terminal:
uvicorn main:app --reload
# OR
python -m uvicorn main:app --reloadUpon successful startup, the terminal will confirm:
- MongoDB connection.
- Successful Machine Learning model dataset training.
- Initialization of the HELIX chat module.
Because the frontend is exceptionally lightweight, no secondary server is required.
Simply open index.html directly in your browser of choice.
To test the multi-portal system, you can use the following default staging identities. (Ensure the backend is running to receive email OTPs seamlessly).
Patient Login
- Aadhaar ID:
836959650405
Doctor Login
- Doctor ID / License:
591246837102/MH-GEN-774421
Admin Login
- Admin ID:
ADM001
(Note: During local development, the 6-digit OTP code sent via Resend is also printed natively in the Uvicorn terminal for rapid testing).
GeneLink calculates risk projections algorithmically and uses generative AI for literacy. It is not a substitute for professional medical diagnosis. All data handled within GeneLink is intended for educational tracking and doctor-patient facilitation.