Skip to content

kaorii-ako/chronicly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

147 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chronicly

Chronicly

The health tracker chronic illness patients actually want.

Track symptoms. Manage medications. Connect your care team.
AI-powered insights for fibromyalgia, lupus, MS, ME/CFS, diabetes, IBD, and more.

Next.js Supabase TypeScript Tailwind CSS Claude AI License: MIT CI

Live Demo · Quick Setup · Report Bug · ⭐ Star this repo

If this project helps you or someone you know, please give it a star — it helps others find it too. ⭐


What is Chronicly?

Most health apps are built for people who want to lose weight or count steps. Chronicly is built for people managing lifelong conditions — the ones who see multiple doctors, take complex medication regimens, and need to track whether they're actually getting better.

It's a full-stack health management platform with:

  • 📊 Symptom logging with severity scores, body maps, and 14-day trend charts
  • 💊 Medication management with AI pill verification (photo your pills, AI checks them)
  • 🔬 Lab results & vitals with reference ranges and per-test trend charts
  • 🧠 AI Medical Assistant — ask anything, get evidence-based answers
  • 👨‍⚕️ Doctor connection — share live health data with your care team via a 6-character code
  • 🔔 Multi-platform alerts — reminders on Discord, Telegram, LINE, and Slack
  • 📓 Health journal — mood, energy, sleep, and gratitude in one place
  • Trigger diary — find what's causing your flares before they find you
  • 🎯 Goals & achievements — set SMART health targets and celebrate milestones
  • 📅 Appointment manager — with telemedicine video links built in

Screenshots

Dashboard Symptoms Medications
Dashboard Symptoms Medications
AI Chat Lab Results Doctor View
AI Labs Doctor

Tech Stack

Layer Technology
Framework Next.js 15 (App Router)
Monorepo Turborepo + pnpm workspaces
Database Supabase (PostgreSQL + Realtime)
Auth Supabase Auth (email + magic link)
AI Anthropic Claude API (streaming)
Styling Tailwind CSS + shadcn/ui
Charts Recharts
Notifications Discord / Telegram / LINE / Slack webhooks
Deployment Vercel (web) + GitHub Actions (cron)
Medical AI Unsloth QLoRA fine-tuning on Gemma 3

Getting Started

Prerequisites

1. Clone and install

git clone https://github.com/kaorii-ako/chronicly.git
cd chronicly
pnpm install

2. Set up environment variables

cp apps/web/.env.local.example apps/web/.env.local

Edit apps/web/.env.local:

NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
ANTHROPIC_API_KEY=sk-ant-...
CRON_SECRET=your-random-secret
NEXT_PUBLIC_APP_URL=http://localhost:3000

3. Set up the database

Run the SQL in supabase-setup.sql in your Supabase SQL editor. This creates all tables, RLS policies, and seed data.

4. Start development

pnpm --filter @chronicly/web dev
# or from root:
pnpm dev

Open http://localhost:3000 and create your account.


Deployment

Vercel (one click)

Deploy with Vercel

Full guide: SETUP.md

Set these environment variables in Vercel dashboard:

Variable Value
NEXT_PUBLIC_SUPABASE_URL Your Supabase URL
NEXT_PUBLIC_SUPABASE_ANON_KEY Your Supabase anon key
ANTHROPIC_API_KEY Your Anthropic API key
CRON_SECRET Any random string (keep secret)
NEXT_PUBLIC_APP_URL Your Vercel deployment URL
  1. Deploy — Vercel auto-detects the monorepo and builds apps/web

Medication reminders (GitHub Actions)

The 15-minute medication reminder cron runs via GitHub Actions (Vercel Hobby plan limits crons to once/day). Add these repository secrets:

  • CRON_SECRET — same value as above
  • APP_URL — your deployed URL

Platform Integrations

Connect Chronicly to your messaging apps for medication reminders and health notifications:

Platform Setup
Discord Server Settings → Integrations → Webhooks
Telegram Message @BotFather → /newbot → copy token
LINE LINE Developers console → Messaging API channel
Slack Incoming Webhooks app
Facebook Messenger Facebook Developer console
WhatsApp WhatsApp Business API

Configure integrations in Settings → Integrations after signing in.


AI Medical Fine-Tuning (Advanced)

Chronicly includes an Unsloth QLoRA fine-tuning pipeline for running a local medical AI:

cd packages/ai-medical
pip install -r requirements.txt
python finetune.py           # trains on MedQA + PubMedQA + curated chronic illness data
python serve.py              # serves at :8000/v1/chat

Set MEDICAL_AI_ENDPOINT=http://localhost:8000/v1/chat to route AI queries to your fine-tuned model instead of Claude.

GPU requirements: 8 GB VRAM for Gemma 3 4B (default), 16 GB for 12B, 40 GB for 27B.


Project Structure

chronicly/
├── apps/
│   └── web/                 # Next.js application
│       └── src/
│           ├── app/         # App Router pages + API routes
│           ├── components/  # UI components
│           └── lib/         # Utilities, Supabase client
├── packages/
│   ├── ai-medical/          # Unsloth fine-tuning scripts
│   └── ui/                  # Shared UI components (future)
├── supabase-setup.sql       # Full database schema
└── turbo.json

Supported Conditions

Chronicly is designed and tested for:

  • Fibromyalgia
  • Lupus (SLE)
  • Multiple Sclerosis (MS)
  • ME/CFS (Chronic Fatigue Syndrome)
  • Type 1 & 2 Diabetes
  • Inflammatory Bowel Disease (IBD / Crohn's / UC)
  • Rheumatoid Arthritis
  • Hypertension
  • POTS / Dysautonomia
  • Ehlers-Danlos Syndrome (EDS)
  • PCOS
  • Hypothyroidism / Hashimoto's

And any other condition where tracking matters.


Contributing

Contributions are very welcome, especially from people living with chronic illness.

# 1. Fork the repo
# 2. Create a feature branch
git checkout -b feat/your-feature

# 3. Make your changes
# 4. Run checks
pnpm build
pnpm typecheck

# 5. Open a pull request

See CONTRIBUTING.md for detailed guidelines.


Roadmap

  • Mobile app (React Native)
  • Apple HealthKit / Google Fit sync
  • PDF health report generation
  • Wearable device integration (Oura, Garmin)
  • Community condition forums
  • Multi-language support
  • Offline-first PWA mode

License

MIT License — see LICENSE for details.

You own your data. You can self-host this. No vendor lock-in.


Star History

Star History Chart


Built with ❤️ for the chronic illness community.

If Chronicly helps you, please ⭐ star the repo — it helps more patients find it.

Deploy with Vercel

About

Open-source health tracker designed for people managing chronic illness. Log symptoms, medications, appointments, and trends - across web and mobile.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors