ai-healthcare-app

:four_leaf_clover: Healthcare AI agent app that combines medical records with AI-assisted conversations

138
Stars
988
Forks
TypeScript
Language
8/23/2026
Added
View on GitHubDownload ZIP

⚠️ Third-Party Software Notice

This skill is third-party open-source software developed and hosted independently on GitHub. SkillTip is an informational directory and does not control or maintain the underlying repository. Any security checks displayed are automated and limited in scope. Review the source code before installing.

Read the Terms of Service

Installation

Add to your Claude Code skills directory:

# Add to your Claude Code skills
git clone https://github.com/jinm29/ai-healthcare-app

Getting Started

Guides for using skills like ai-healthcare-app.

Security Report

Verified

Last scanned: —

{
  "status": "PASSED",
  "issues": []
}

README.md

OpenHealth

A self-hostable health data platform that combines structured medical records with AI-assisted conversations. Upload lab results, health checkups, and personal health context — then chat with LLM providers using that data as grounded context.

Built with Next.js 15, TypeScript, PostgreSQL, and an optional Redis cache layer for production deployments.


Table of Contents


Features

CapabilityDescription
Health data ingestionUpload PDFs and images; automatic parsing into structured JSON
Multi-provider LLM supportOpenAI, Anthropic, Google Gemini, and Ollama (local)
Privacy-first deploymentRun fully local with Docling + Ollama — no cloud required
Cloud modeManaged blob storage and Trigger.dev background jobs
Internationalization10 locales via next-intl
Redis cache layerOptional persistence for API response caching with graceful degradation
Credential encryptionAES-256-CBC for stored LLM API keys

Architecture

flowchart TB
    subgraph Client
        UI[Next.js App Router UI]
    end

    subgraph Application
        API[API Routes and Server Actions]
        Auth[NextAuth Credentials]
        Parser[Health Data Parser]
        Cache[Cache Service]
    end

    subgraph Data
        PG[(PostgreSQL)]
        Redis[(Redis)]
    end

    subgraph External
        Docling[Docling Serve]
        LLM[LLM Providers]
        Blob[Vercel Blob]
        Trigger[Trigger.dev]
    end

    UI --> API
    API --> Auth
    API --> Parser
    API --> Cache
    Cache --> Redis
    API --> PG
    Parser --> Docling
    Parser --> LLM
    API --> Blob
    API --> Trigger

Deployment modes

ModeStorageParsingBackground jobs
localFilesystem (public/uploads)Docling (Docker)In-process
cloudVercel BlobUpstage / cloud APIsTrigger.dev

Workflows

Health data upload and parsing

sequenceDiagram
    participant User
    participant API as /api/health-data
    participant Parser as PDF Parser
    participant DB as PostgreSQL
    participant Cache as Redis

    User->>API: POST multipart file
    API->>DB: Create record (status PARSING)
    API->>Parser: parseHealthData()
    Parser-->>API: Structured JSON + OCR metadata
    API->>DB: Update record (status COMPLETED)
    API->>Cache: Invalidate cached entry
    API-->>User: Parsed health data

Authenticated chat session

sequenceDiagram
    participant User
    participant Middleware
    participant Chat as /api/chat-rooms
    participant LLM as Provider API

    User->>Middleware: Request /chat/[id]
    Middleware->>Middleware: Verify JWT session
    User->>Chat: POST message
    Chat->>LLM: Stream completion with health context
    LLM-->>User: Assistant response

Project Structure

open-health/
├── docs/                  # Engineering documentation and audit notes
├── messages/              # i18n translation files (10 locales)
├── prisma/                # Database schema, seed data, migrations
├── public/                # Static assets and local upload directory
├── src/
│   ├── actions/           # Next.js server actions
│   ├── app/               # App Router pages and API routes
│   ├── components/        # React UI components (shadcn/ui)
│   ├── context/           # React context providers
│   ├── hooks/             # Custom React hooks
│   ├── lib/
│   │   ├── api/           # API helpers (auth guards)
│   │   ├── config/        # Typed environment configuration
│   │   ├── encryption/    # AES encryption for API keys
│   │   ├── errors/        # Application error types
│   │   ├── health-data/   # Parsers (PDF, vision, document)
│   │   ├── logger/        # Structured JSON logging
│   │   └── redis/         # Connection manager and cache service
│   ├── trigger/           # Trigger.dev background tasks
│   ├── auth.ts            # NextAuth configuration
│   └── instrumentation.ts # Server lifecycle hooks
├── docker-compose.yaml    # Local stack: Postgres, Redis, Docling, app
├── Containerfile          # Production container image
└── vitest.config.ts       # Unit test configuration

Design decisions:

  • Infrastructure code lives under src/lib/ with clear sub-modules
  • API auth guards are centralized in src/lib/api/
  • Redis is optional — the app degrades gracefully when REDIS_ENABLED=false

Requirements

  • Node.js 20+
  • Docker or Podman (recommended for local stack)
  • PostgreSQL 15+
  • Redis 7+ (optional, enabled by default)

Installation

Quick start with Docker

git clone https://github.com/OpenHealthForAll/open-health.git
cd open-health

cp .env.example .env
# Edit .env — generate AUTH_SECRET and ENCRYPTION_KEY (see Configuration)

docker compose --env-file .env up --build

Open http://localhost:3000 and register an account.

Manual setup

npm install
cp .env.example .env

# Start PostgreSQL and Redis locally, then:
npx prisma db push
npx prisma db seed

npm run dev

Configuration

Copy .env.example to .env and configure the following:

Required

VariableDescription
DATABASE_URLPostgreSQL connection string
AUTH_SECRETNextAuth signing secret (32+ random bytes, base64)
ENCRYPTION_KEYAES-256 key for API key storage (32 bytes, base64)
NEXT_PUBLIC_URLPublic URL of the application

Generate secrets:

node -e "console.log(require('crypto').randomBytes(32).toString('base64'))"

Redis

VariableDefaultDescription
REDIS_URLredis://localhost:6379Redis connection URL
REDIS_ENABLEDtrueSet to false to disable caching
REDIS_KEY_PREFIXopen-health:Namespace prefix for cache keys
REDIS_CONNECT_TIMEOUT_MS10000Connection timeout
REDIS_MAX_RETRIES10Max retries per request

Deployment

VariableValuesDescription
DEPLOYMENT_ENVlocal or cloudControls storage and parser backends
LOG_LEVELdebug, info, warn, errorLogging verbosity

Cloud-only (when DEPLOYMENT_ENV=cloud)

VariableDescription
OPENAI_API_KEYPlatform OpenAI key
ANTHROPIC_API_KEYPlatform Anthropic key
GOOGLE_API_KEYPlatform Google key
BLOB_READ_WRITE_TOKENVercel Blob storage
TRIGGER_PROJECT_IDTrigger.dev project
TRIGGER_SECRET_KEYTrigger.dev secret

Development

npm install        # Install dependencies
npm run dev        # Start dev server (port 3000)
npm run typecheck  # TypeScript validation
npm run lint       # ESLint
npm run test       # Unit tests (Vitest)
npm run validate   # typecheck + lint + test
npm run build      # Production build

Docker services

docker compose up database redis docling-serve   # Infrastructure only
docker compose up --build                         # Full stack

Ollama with Docker

When running Ollama on the host machine:

  • macOS: http://docker.for.mac.localhost:11434
  • Windows: http://host.docker.internal:11434

Testing

Tests use Vitest and cover infrastructure modules:

npm run test           # Run all tests once
npm run test:watch     # Watch mode

Test files are co-located with source: src/**/*.test.ts

Covered areas:

  • Environment configuration parsing
  • Redis key building and config
  • Cache service serialization
  • Application error types

Troubleshooting

Build fails with encryption key error

Ensure ENCRYPTION_KEY is set in .env before running npm run dev. Generate a valid 32-byte base64 key (see Configuration).

Redis connection refused

  1. Verify Redis is running: docker compose ps redis
  2. Check REDIS_URL matches your environment
  3. Disable Redis temporarily: REDIS_ENABLED=false

PDF parsing fails locally

Confirm Docling is running:

docker compose logs docling-serve

Database schema out of sync

npx prisma db push
npx prisma generate

TypeScript errors after pulling

npm install
npx prisma generate
npm run typecheck

Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feat/your-feature
  3. Run validation before committing: npm run validate
  4. Open a pull request with a clear description

See CONTRIBUTING.md for detailed guidelines.

Commit conventions: Use imperative mood (feat:, fix:, chore:, docs:, test:, refactor:).


FAQ

Can I run this without Redis?
Yes. Set REDIS_ENABLED=false. The application skips caching and continues to work normally.

Is my health data sent to cloud LLMs automatically?
Only when you configure cloud LLM providers and use cloud deployment mode. Local mode with Ollama keeps inference on your machine.

What file formats are supported?
PDF, PNG, JPEG, and other image formats. PDFs are converted to images for vision-model parsing.

How are API keys stored?
LLM provider API keys are encrypted at rest using AES-256-CBC with your ENCRYPTION_KEY.

Does this replace medical advice?
No. OpenHealth is an informational tool. Always consult qualified healthcare professionals for medical decisions.


License

See LICENSE.

Frequently Asked Questions

What is ai-healthcare-app?

ai-healthcare-app is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by jinm29. :four_leaf_clover: Healthcare AI agent app that combines medical records with AI-assisted conversations. It has 138 GitHub stars.

Is ai-healthcare-app safe to use?

ai-healthcare-app failed SkillsLLM's automated security scan, which flagged one or more high-severity issues. Review the Security Report section carefully before using it.

How do I install ai-healthcare-app?

Clone the repository with "git clone https://github.com/jinm29/ai-healthcare-app" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is ai-healthcare-app written in?

ai-healthcare-app is primarily written in TypeScript. It is open-source under jinm29 on GitHub, so you can review or fork the full source.

Are there alternatives to ai-healthcare-app?

Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh ai-healthcare-app against similar tools.

Comments (0)

No comments yet. Be the first to share your thoughts!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI Agentsai-agentsanthropicclaude-code
View details
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI Agentsai-agentsbrainstorming
View details

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI Agentsai-agentsanthropicclaude-code
View details

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI Agentsclaude-codeai-tools
View details

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI Agents
View details

Developers Also Liked

Based on votes and bookmarks from developers who liked this skill

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI Agentsai-agentsanthropicclaude-code
View details
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI Agentsai-agentsbrainstorming
View details

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP Serversapisai-tools
View details

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI Agentsai-agentsanthropicclaude-code
View details

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI Agentsclaude-codeai-tools
View details