Skip to content

ACE12345NEIL/GeneLink

Repository files navigation

🧬 GeneLink: Hereditary Health Tracking System

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.

🌟 Key Features

  • 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.

🛠️ Technology Stack

  • 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

⚙️ Prerequisites

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)

🚀 Installation & Setup

  1. Navigate to the core directory:

    cd "Genelink"
  2. Install all required dependencies:

    pip install fastapi uvicorn[standard] pymongo[srv] dnspython scikit-learn pandas numpy google-genai resend python-dotenv cryptography
  3. Configure Environment Variables: A .env file gracefully handles all secrets. In the root of the Genelink folder, ensure you have a .env file 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_KEY is omitted, the system will auto-generate an ephemeral one on launch, though this resets per session).


💻 Running the Application

1. Start the Backend Server (FastAPI)

Run the application via Uvicorn within your terminal:

uvicorn main:app --reload
# OR
python -m uvicorn main:app --reload

Upon successful startup, the terminal will confirm:

  • MongoDB connection.
  • Successful Machine Learning model dataset training.
  • Initialization of the HELIX chat module.

2. Launch the Frontend

Because the frontend is exceptionally lightweight, no secondary server is required. Simply open index.html directly in your browser of choice.


🧪 Testing Credentials

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).


🛡️ License & Disclaimers

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.

About

GeneLink is a full-stack web application that connects a patient's health records to their family's health history, creating a traversable multi-generational health graph. It serves patients, doctors, and system administrators through dedicated, role-specific interfaces.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors