Skip to content

HarshitKumar9030/kenko

Repository files navigation

Kenko AI – Health Intelligence App

Kenko AI is a modern preventive health intelligence platform. It combines a Next.js 16 frontend, local Python-based risk inference, and Gemini-powered natural language insights to help users understand and act on their health data.


🚀 Features

  • Local AI Inference: Secure, fast risk prediction using local Python models (no cloud upload required)
  • Gemini-Powered Insights: Human-friendly, context-aware explanations for every result
  • Animated UI: GSAP and Tailwind for a beautiful, responsive experience
  • Downloadable Reports: Export your results as JSON for sharing or further analysis
  • Context-Aware Inputs: Glucose context (fasting/random), BMI calculator, and more

🛠️ Getting Started

  1. Clone the repo:
    git clone <your-repo-url>
    cd kenko
  2. Install dependencies:
    pnpm install
  3. Configure Gemini (optional): Create a .env.local file:
    GEMINI_API_KEY=your_gemini_api_key
    GEMINI_MODEL=gemini-3-flash-preview
    If not set, the app will still run and provide fallback insights.
  4. Run the app:
    pnpm dev
    Visit http://localhost:3000

🏗️ Architecture

Frontend:

  • Next.js 16 (app router, TypeScript, Tailwind CSS)
  • GSAP for animations
  • VitalsForm for structured health input

Backend/API:

  • /api/predict route spawns a Python process for local model inference
  • Python risk engine normalizes, predicts, and explains risk
  • Gemini API (if configured) generates natural language insights

ML Models:

  • Trained offline using OpenML datasets (see kenko-model)
  • Models and training reports stored in kenko-model/models

📦 Folder Structure

kenko/
├── app/
│   ├── api/predict/route.ts      # API handler (Node <-> Python <-> Gemini)
│   ├── components/               # UI components (VitalsForm, Results, etc.)
│   └── ...
├── public/
├── styles/
├── .env.local                    # Gemini API keys (not committed)
└── README.md

🧪 Example Usage

  1. Enter your age, BMI, glucose, blood pressure, activity, diet, sleep, fatigue, and smoking status.
  2. Click Predict Trajectory.
  3. View:
    • Metabolic, cardiovascular, and nutritional risk scores
    • Top contributing factors
    • Gemini-powered plain-language summary
    • Downloadable JSON report

🤝 Contributing

Pull requests are welcome! For major changes, please open an issue first to discuss what you’d like to change.


📄 License

This project is for hackathon and research use. For production or clinical use, consult a medical professional and review all code and models for safety and compliance.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors