https://github.com/ajitonelsonn/medgraph-navigator
π Submission for https://arangodbhackathon.devpost.com
https://github.com/ajitonelsonn/medgraph-navigator
ai arangodb hackathon healthcare langchain llm llma nextjs
Last synced: 4 months ago
JSON representation
π Submission for https://arangodbhackathon.devpost.com
- Host: GitHub
- URL: https://github.com/ajitonelsonn/medgraph-navigator
- Owner: ajitonelsonn
- License: mit
- Created: 2025-02-27T05:29:15.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-03-07T05:13:44.000Z (4 months ago)
- Last Synced: 2025-03-07T05:27:51.230Z (4 months ago)
- Topics: ai, arangodb, hackathon, healthcare, langchain, llm, llma, nextjs
- Language: TypeScript
- Homepage: https://medgraph-navigator.onrender.com
- Size: 420 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MedGraph Navigator π₯
![]()
![]()
![]()
![]()
Patient Journey & Risk Analytics Platform powered by GraphRAGA comprehensive healthcare analytics platform built for the [ArangoDB Hackathon: Building the Next-Gen Agentic App with GraphRAG & NVIDIA cuGraph](https://arangodbhackathon.devpost.com/).
[](https://medgraph-navigator.onrender.com)
## π Live Demo
Experience MedGraph Navigator live: [https://medgraph-navigator.onrender.com](https://medgraph-navigator.onrender.com)
## π Overview
MedGraph Navigator is a next-generation healthcare analytics platform that harnesses the power of graph databases and large language models (LLMs) to provide medical professionals with deep, actionable insights into patient data. Built on ArangoDBβs advanced graph capabilities and enhanced with GraphRAG (Graph-based Retrieval Augmented Generation) technology, MedGraph Navigator revolutionizes healthcare analytics by enabling:
- Natural language querying of complex medical data
- Visual exploration of patient journeys through medical systems
- Risk factor identification and analysis
- Discovery of treatment patterns and outcomes
- Comprehensive healthcare analytics dashboards## β¨ Key Features
- **Natural Language Query Interface** - Query the medical database using everyday language
- **Patient Explorer** - Visualize and analyze individual patient journeys
- **Analytics Dashboard** - Comprehensive visualizations of healthcare metrics
- **Intent Detection** - AI-powered understanding of query intent
- **GraphRAG Implementation** - Combines graph traversal with LLM reasoning## π οΈ Technology Stack
- **Frontend**: Next.js 15, React 19, TailwindCSS, Recharts
- **Backend**: Next.js API Routes
- **Database**: ArangoDB Graph Database
- **AI/ML**: LangChain, Together AI (Llama 3.2)
- **Deployment**: Render.com## ποΈ System Architecture
MedGraph Navigator follows a modern, layered architecture:
```mermaid
graph TB
User([π€ User]) --> NextApp[["βοΈ Next.js App"]]
subgraph "Frontend Layer"
NextApp --> Pages["π Pages"]
NextApp --> Components["π§© UI Components"]
end
subgraph "API Layer"
NextApp --> APIRoutes["π API Routes"]
APIRoutes --> QueryAPI["π Query API"]
APIRoutes --> PatientAPI["π¨ββοΈ Patient API"]
APIRoutes --> AnalyticsAPI["π Analytics API"]
end
subgraph "Integration Layer"
QueryAPI --> LangChain["π¦οΈ LangChain"]
LangChain --> TogetherAI["π€ Together AI"]
APIRoutes --> ArangoClient["π¦ ArangoDB Client"]
end
subgraph "Data Layer"
ArangoClient --> ArangoDB[("ποΈ ArangoDB")]
ArangoDB --> MedicalData["π Medical Graph Data"]
endclassDef frontend fill:#d6e4ff,stroke:#9cb2eb,stroke-width:1px;
classDef api fill:#ffe6cc,stroke:#d79b00,stroke-width:1px;
classDef integration fill:#d5e8d4,stroke:#82b366,stroke-width:1px;
classDef database fill:#e1d5e7,stroke:#9673a6,stroke-width:1px;class Pages,Components,NextApp frontend;
class APIRoutes,QueryAPI,PatientAPI,AnalyticsAPI api;
class LangChain,TogetherAI,ArangoClient integration;
class ArangoDB,MedicalData database;
```## π§ Installation & Setup
### Prerequisites
- Node.js 18+ and npm
- ArangoDB 3.10+
- Together AI API key### Local Development
1. Clone the repository:
```bash
git clone https://github.com/ajitonelsonn/medgraph-navigator.git
cd medgraph-navigator
```2. Install dependencies:
```bash
npm install
```3. Set up environment variables:
```bash
cp .env.example .env.local
```Edit `.env.local` and add your ArangoDB and Together AI credentials.
4. Prepare your ArangoDB database:
- Follow the setup instructions in the [H_ArngoDB repository](https://github.com/ajitonelsonn/H_ArngoDB) to load the Synthea medical dataset
5. Run the development server:
```bash
npm run dev
```6. Open [http://localhost:3000](http://localhost:3000) in your browser
### Production Deployment
For production deployment to Render.com:
1. Fork this repository
2. Create a new Web Service on Render
3. Link your GitHub repository
4. Configure environment variables
5. Deploy!## π Usage Examples
### Querying the Medical Database
MedGraph Navigator allows natural language queries against the medical database:
- "How many patients have the race 'white'?"
- "List 10 patients with their birthdates and genders"
- "What is the most common race among patients?"
- "Show me patients born in 2016"### Analytics Dashboards
The Analytics section provides comprehensive healthcare insights:
- Demographics analysis
- Condition prevalence and trends
- Medication usage patterns
- Treatment outcomes## π Project Structure
```
medgraph-navigator/
βββ app/ # Next.js app directory
β βββ analytics/ # Analytics dashboard
β βββ api/ # API routes
β βββ components/ # Shared components
β βββ patients/ # Patient explorer
β βββ query/ # Query interface
β βββ utils/ # Utility functions
βββ public/ # Static assets
βββ styles/ # Global styles
βββ next.config.js # Next.js configuration
βββ package.json # Project dependencies
```## π License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## π Acknowledgments
- [ArangoDB](https://www.arangodb.com/) for the powerful graph database
- [NVIDIA Rapids cuGraph](https://github.com/rapidsai/cugraph) for GPU-accelerated graph analytics
- [Synthea](https://synthea.mitre.org/) for the synthetic healthcare dataset
- [Together AI](https://together.ai/) for the LLM infrastructure
- [ArangoDB Hackathon](https://arangodbhackathon.devpost.com/) for the inspiration## π¬ Contact
For questions or feedback, please reach out via GitHub Issues or contact:
- GitHub: [@ajitonelsonn](https://github.com/ajitonelsonn)
---
Made with β€οΈ in Timor-Leste πΉπ±