Skip to content

Latest commit

Β 

History

266 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Mendly Banner

Mendly Logo

Mendly

Your personal health platform
Understand health topics, explore medicines, find nearby care, and track your health.

Website Β· Try Elix Β· API Docs


πŸ“‹ Contents


🌟 Vision

"Bridging the gap between health information and understanding β€” through conversation, memory, and care."

Most health apps either dump raw data on you or lock you into a single feature. Mendly bridges the gap β€” combining AI conversation, drug databases, location-based care discovery, and personalized health tracking into one seamless experience.

The Problem How Mendly Solves It
❓ Hard to find reliable health info fast πŸ€– AI chatbot answers instantly
πŸ’Š No easy way to check drug interactions ⚑ Interaction checker with FDA data
πŸ₯ Can't find nearby care in emergencies πŸ“ Location-based hospital & pharmacy finder
πŸ“š Scattered health bookmarks πŸ”– Save & organize medicines + conditions
🌍 Different emergency numbers per country πŸ†˜ Country-wise contacts with tap-to-call

✨ Features

Feature Description
πŸ€– Elix AI Chatbot Conversational AI that answers questions about diseases, symptoms, medicines & interactions
πŸ’Š Medicine Search Browse FDA-approved drugs β€” uses, dosage, side effects & precautions
🩺 Medical Conditions Disease profiles with symptoms, causes, treatment & prevention
⚑ Drug Interaction Checker Check two medicines for conflicts & adverse reactions
πŸ₯ Nearby Hospitals Find healthcare facilities by search or geolocation
πŸ’Š Nearby Pharmacies Locate pharmacies & medical stores near you
πŸ†˜ Emergency Contacts Country-wise emergency numbers with tap-to-call
πŸ”– Saved Items Bookmark medicines & conditions for quick reference
πŸ” Auth System Secure signup / login with JWT
πŸ“± Works Everywhere Responsive design that works on desktop, tablet, and mobile

πŸ–₯️ Live Demo

Service URL
🌐 Frontend mendlyapp.web.app
βš™οΈ Backend API mendly-backend-0vyg.onrender.com
πŸ“– API Docs mendly-backend-0vyg.onrender.com/docs

πŸ“Š Repository Activity

Last Commit Stars Forks Open Issues Pull Requests Repo Size License Top Language


πŸ—οΈ System Architecture

graph TB
    subgraph Client["πŸ“± Client Layer"]
        User([πŸ‘€ User])
        FE["Vanilla JS SPA<br/>(Firebase Hosting)"]
    end

    subgraph API["βš™οΈ API Layer"]
        BE["FastAPI Backend<br/>(Render)"]
        Auth[πŸ” JWT Auth]
        Chat[πŸ€– AI Chatbot Engine]
    end

    subgraph Services["🧩 Service Layer"]
        FDA[πŸ“‘ openFDA Client]
        KB[πŸ“š Knowledge Base]
        NIM[🧠 NVIDIA NIM API]
        Mem[πŸ’Ύ Memory Manager]
    end

    subgraph Data["πŸ—„οΈ Data Layer"]
        DB[(MongoDB Atlas)]
    end

    User -->|API Calls| FE
    FE --> BE
    BE --> Auth
    BE --> Chat
    BE --> FDA
    BE --> KB
    Auth --> DB
    Chat --> Mem
    Mem --> NIM
    Mem --> DB
    KB --> DB
    FDA -->|REST| OpenFDA[πŸ›οΈ openFDA]

    style FE fill:#0d2137,color:#fff
    style BE fill:#0d2137,color:#fff
    style Mem fill:#00bcd4,color:#fff
    style DB fill:#0d2137,color:#fff
    style NIM fill:#0d2137,color:#fff
Loading

🧠 AI Model

Attribute Detail
Provider NVIDIA NIM
Models Llama 3.3 Nemotron, DeepSeek variants
Role Health Q&A, symptom guidance, medicine info, emotional support
Prompt Strategy System-prompted with medical disclaimer, context-aware memory injection
Fallback Local knowledge base for offline / common queries
Temperature 0.3 (factual) β€” 0.7 (conversational)

Inference Flow

sequenceDiagram
    actor U as User
    participant FE as Frontend
    participant BE as Backend
    participant MEM as Memory
    participant NIM as NVIDIA NIM
    participant DB as MongoDB

    U->>FE: Types a message
    FE->>BE: POST /chat
    BE->>MEM: Fetch conversation history
    MEM->>DB: Retrieve past sessions
    DB-->>MEM: Session summaries + context
    MEM-->>BE: Assembled memory context
    BE->>BE: Construct system prompt
    BE->>NIM: API call with context
    NIM-->>BE: Streamed response
    BE->>MEM: Save response to history
    BE-->>FE: Stream tokens
    FE-->>U: Display response
Loading

πŸ’Ύ Memory Architecture

Mendly uses a hybrid memory system that balances conversation continuity with token efficiency.

Memory Layers

Layer Scope Storage Retention
🟒 Working Memory Current session messages In-memory (Python dict) Session lifetime
πŸ”΅ Episodic Memory Recent conversations MongoDB β€” sessions collection 30 days
🟑 Summarized Memory Compressed long-term history MongoDB β€” memory_summaries collection Indefinite
πŸ”΄ Profile Memory User preferences + saved items MongoDB β€” users collection Until changed

How Memory Works

graph LR
    subgraph Online["🟒 Working (In-Memory)"]
        WM[Session Messages]
    end

    subgraph Recent["πŸ”΅ Episodic (MongoDB)"]
        EM[Recent Sessions<br/>24h window]
    end

    subgraph Long["🟑 Summarized (MongoDB)"]
        SM[Compressed Summaries<br/>Key topics + mood]
    end

    subgraph Profile["πŸ”΄ Profile (MongoDB)"]
        PM[User Profile<br/>Saved Items + Prefs]
    end

    WM -->|Flush on session end| EM
    EM -->|Summarize every N sessions| SM
    PM -->|Inject on login| WM

    style WM fill:#00bcd4,color:#fff
    style EM fill:#0d2137,color:#fff
    style SM fill:#0d2137,color:#fff
    style PM fill:#0d2137,color:#fff
Loading

Context Assembly

When a user sends a message, the backend assembles context in this priority:

  1. System prompt β€” Role, boundaries, medical disclaimer
  2. User profile β€” Name, saved items, preferences
  3. Recent memory β€” Last 10-20 messages from current session
  4. Summarized history β€” Compressed key topics from past sessions
  5. Knowledge base β€” Relevant disease/drug info if detected
  6. Current message β€” The user's latest input

This keeps responses context-aware without exceeding the model's token window.


πŸ—ΊοΈ Roadmap

gantt
    title Mendly Development Roadmap
    dateFormat  YYYY-MM-DD
    section Core
    AI Chatbot v1           :done, 2025-01-01, 2025-03-01
    Medicine Search         :done, 2025-02-01, 2025-04-01
    Drug Interaction Checker:done, 2025-03-01, 2025-05-01
    Nearby Hospitals        :done, 2025-04-01, 2025-06-01

    section Current
    Firebase Hosting        :active, 2025-06-01, 2025-08-01
    Memory System v2        :active, 2025-07-01, 2025-09-01

    section Upcoming
    Long-term Summaries     :2025-08-01, 2025-10-01
    Habit & Mood Tracking   :2025-09-01, 2025-11-01
    Community Discussions   :2025-11-01, 2026-01-01
    Crisis Detection        :2025-12-01, 2026-02-01
Loading

βœ… Completed

  • AI chatbot with NVIDIA NIM integration
  • Medicine search via openFDA API
  • Drug interaction checker
  • Nearby hospitals & pharmacies (geolocation)
  • Emergency contacts database
  • Saved items / bookmarks
  • JWT authentication
  • Firebase Hosting migration
  • Responsive SPA (desktop + mobile)

πŸ”„ In Progress

  • Memory system v2 (long-term summarization)
  • UI / UX polish

πŸ“… Planned

  • Habit & mood correlation detection
  • Anonymous community discussions
  • Crisis detection & escalation
  • Offline mode (PWA)
  • Multi-language support

πŸ“ Project Structure

mediguide/
β”œβ”€β”€ frontend/                    # Vanilla HTML/CSS/JS SPA
β”‚   β”œβ”€β”€ index.html               # Single HTML entry point
β”‚   β”œβ”€β”€ js/
β”‚   β”‚   └── app.js               # SPA router, all views, features
β”‚   β”œβ”€β”€ css/
β”‚   β”‚   └── style.css            # Full design system, responsive
β”‚   β”œβ”€β”€ assets/
β”‚   β”‚   └── icon/                # Logo variants (SVG)
β”‚   β”œβ”€β”€ manifest.json            # PWA manifest
β”‚   └── sw.js                    # Service worker
β”‚
β”œβ”€β”€ backend/                     # FastAPI backend
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ main.py              # Routes, CORS, security headers
β”‚   β”‚   β”œβ”€β”€ auth.py              # JWT, bcrypt, user dependencies
β”‚   β”‚   β”œβ”€β”€ chatbot.py           # AI chat engine
β”‚   β”‚   β”œβ”€β”€ knowledge_base.py    # Disease/medicine data
β”‚   β”‚   └── openfda_client.py    # FDA API client
β”‚   β”œβ”€β”€ requirements.txt
β”‚   └── .env
β”‚
└── README.md

πŸš€ Quick Start

Prerequisites

Requirement Version Link
Node.js 18+ nodejs.org
Python 3.12+ python.org
MongoDB Atlas (free tier) mongodb.com/atlas
NVIDIA API Key β€” build.nvidia.com

Setup

# 1. Clone
git clone https://github.com/Satendra90390/Mendly.git
cd Mendly

# 2. Backend
cd backend
python -m venv .venv
# Windows: .venv\Scripts\activate
# macOS/Linux: source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env  # add your keys
uvicorn app.main:app --reload --port 8002

# 3. Frontend (new terminal)
cd frontend
npx serve . -p 3000

πŸ“– API docs at http://localhost:8002/docs 🌐 Open http://localhost:3000 in your browser


πŸ“– Usage Guide

flowchart LR
    A[πŸ” Create Account] --> B[πŸ“Š Dashboard]
    B --> C[πŸ’¬ Chat with Elix AI]
    B --> D[πŸ’Š Search Medicines]
    B --> E[πŸ“ Find Nearby Care]
    C --> F["Ask health<br/>questions"]
    D --> G[⚑ Check Interactions]
    E --> H[πŸ₯ Hospitals / πŸ’Š Pharmacies]
Loading
Feature Location How To Use
πŸ’¬ AI Chat Sidebar β†’ Chat Type your health question
πŸ’Š Medicines Sidebar β†’ Medicines Search by name or condition
⚑ Interactions Medicines β†’ Checker tab Select two drugs to compare
πŸ₯ Hospitals Sidebar β†’ Hospitals Allow location or search city
πŸ†˜ Emergency Sidebar β†’ Emergency Pick country β†’ tap to call
πŸ”– Saved Sidebar β†’ Saved Bookmark from any medicine page

πŸ”§ Development

Command What It Does
npx serve . -p 3000 Start local dev server
uvicorn app.main:app --reload --port 8002 Start backend with hot reload

Conventions

Area Convention
Frontend Vanilla HTML, CSS, JavaScript β€” single-file SPA
Backend Python FastAPI, async/await, Pydantic validation
HTTP Native fetch() β€” no Axios
Auth JWT in Authorization: Bearer <token> header
API JSON, RESTful routes
Styling CSS custom properties, mobile-first, design tokens

❓ FAQ

Question Answer
Is Mendly a real medical service? No. Mendly is an experimental software project for informational purposes. It does not provide diagnosis, treatment, or professional medical advice.
Can I use Mendly in an emergency? No. If you are experiencing a medical emergency, call your local emergency services immediately. Mendly's emergency section provides contact numbers only.
Is my data private? Conversation data is stored in MongoDB Atlas. We do not share or sell your data.
Do I need an API key? To run the backend locally, yes β€” you need an NVIDIA NIM API key (free tier available). The live demo is pre-configured.
What AI model powers the chatbot? Mendly uses NVIDIA NIM with Llama 3.3 Nemotron / DeepSeek models, fine-tuned via system prompts for health information.
Why the name "Mendly"? Mend (to heal/fix) + -ly (friendly/serene) β€” a friendly companion for your health journey.

🀝 Contributing

flowchart LR
    A[Fork] --> B[Branch]
    B --> C[Code]
    C --> D[Commit]
    D --> E[Push]
    E --> F[Open PR]
    F --> G[Review]
    G --> H[Merge πŸŽ‰]
Loading
Principle Guideline
πŸ”’ Security Never commit secrets or API keys
πŸ§ͺ Testing Verify changes locally before PR
πŸ“š Docs Update README for new features
🎨 UI/UX Follow existing component patterns

πŸ“„ License

MIT License β€” Free to use, modify, and distribute.

Copyright Β© 2026 Mendly


Built with care using vanilla JS, FastAPI, and MongoDB

πŸ› Report Bug Β· πŸ’‘ Request Feature

About

AI-powered medicine and health information platform - search any drug, chat with AI about diseases, check drug interactions, and find nearby hospitals & pharmacies.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages