Skip to content

Repository files navigation

MedAssist-ng Logo

MedAssist-ng

Never run out of your medications again.
A medication tracking and planning app with stock monitoring, intake schedules, and reminder notifications.

React 19 TypeScript Fastify SQLite Docker

Backend Tests 454/454 Frontend Tests 611/611

🤖 AI-Generated Code

This app was built using the latest available ChatGPT models. Use at your own risk.

⚠️ Disclaimer

Your health is your responsibility. This app may contain bugs. Follow your doctor's instructions closely, keep track of your medication supply, and plan ahead for reordering.

Think of this app as a helpful tool, but make all health decisions independently!

Features

MedAssist-ng Dashboard

Screenshots
Dashboard

Overview with stock status, reorder reminders, and upcoming schedules.

Dashboard
Medication Detail

View medication details, stock information, and intake schedule.

Medication Detail Modal
Medications & Edit Form

Manage your medications with the edit form and refill feature.

Medications Edit Form
Demand Calculator (Planner)

Calculate how many pills you need for a specific date range.

Planner - Demand Calculator
Shared Schedule

Share your medication schedule with others via a public link.

Shared Schedule
Mobile Views
Dashboard
Mobile Dashboard
Medications
Mobile Medications
Schedule
Mobile Schedule

Medication Setup

  • Optional medication lookup in the editor on desktop and mobile
  • Supports RxNorm, openFDA, and EMA with source labels
  • Review-and-apply flow with package-size suggestions when available
  • Manual entry remains available

Smart Inventory

  • Track exact stock with package profiles (blister, bottle, tube, liquid container, inhaler, injection)
  • Display remaining days of supply
  • Automatic calculation based on intake schedule
  • Record package-aware as-needed consumption for active medications without a regular schedule
  • Manual stock corrections

Medication Refill

  • One-click refill
  • Complete refill history per medication
  • Automatic stock updates after each refill

Flexible Schedules

  • Daily, weekly, or custom intervals per medication
  • Independent schedules for each medication
  • Create or edit a medication without a regular schedule on desktop and mobile, then add or remove schedules later
  • Optional timeline filters for dashboard and shared schedule views

Unscheduled Medications & As-Needed Intakes

  • Record now is available for active medications with no regular schedule; scheduled, ended, and obsolete medications keep their existing behavior
  • Quantity, unit, and stock effect follow the medication's package profile. Topical use records one application without guessing a measurable stock reduction
  • Attribute an intake to one of the medication's current people or choose None / self
  • Keep an auditable active and reversed history, with corrections recorded as a reversal followed by a separate replacement
  • Include as-needed history and journals in reports and export/import backups without exposing event details or mutation actions on public shares

See Unscheduled medications and Record now for the inventory, retry, correction, sharing, and backup rules.

Stock Alerts & Reminders

  • Notifications before stock runs out
  • Configurable warning thresholds
  • Intake reminders via push notifications

Trip Planner

  • Calculate medication demand for a trip or date range with package-aware units
  • Send demand reports via email or push notification

Reports

  • Generate medication reports as PDF, Markdown, or plain text
  • Include scheduled history plus separate active as-needed totals and active/reversed audit entries with journal context

Multi-Person Support

  • Manage medications for multiple people
  • Share schedules via link. Recipients can mark doses as taken, you see it live
  • Optionally allow shared links to view and edit intake journal notes for their visible schedule window
  • Optionally embed the medication overview directly on shared links via a settings toggle

Data Export & Import

  • Export all your data (medications, scheduled dose history, as-needed intake events, intake journal notes and moods, settings) as JSON
  • Review validated import contents before replacing current data
  • Optionally download a fresh backup before confirming import
  • Import previously exported data with automatic ID remapping
  • Choose whether to include sensitive data in exports

Notifications

  • Email via SMTP
  • Push notifications via ntfy, Pushover, Gotify, Telegram, Discord & more (Shoutrrr)
  • Supports stock warnings and intake reminders

Privacy & Security

  • Fully self-hosted
  • SSO via OIDC (Authelia, Authentik, Pocket ID, Keycloak)
  • Non-root containers
  • Dark mode included 😎

Getting Started

The easiest way to deploy MedAssist-ng is with Docker Compose:

git clone https://github.com/DanielVolz/medassist-ng.git
cd medassist-ng
cp .env.example .env
docker compose -p medassist-ng up -d

Before running docker compose, choose an authentication mode in .env.

For non-local deployments, enable authentication:

AUTH_ENABLED=true
JWT_SECRET=<output-of-openssl-rand-hex-32>
REFRESH_SECRET=<output-of-openssl-rand-hex-32>
COOKIE_SECRET=<output-of-openssl-rand-hex-32>

For a local/private-only trial that is not reachable from other networks, explicitly set:

ALLOW_UNAUTHENTICATED=true

Production startup refuses AUTH_ENABLED=false unless that local-only override is present.

Open http://localhost:4174 and start tracking your medications.

Verify Deployment

After the containers start, confirm the stack is actually healthy:

  1. Run docker compose ps and confirm the backend service is healthy and the frontend service is running.
  2. Open http://localhost:4174/api/health and confirm the backend responds through the frontend proxy with JSON that includes "status":"ok".
  3. Open http://localhost:4174 and confirm the app loads.

GitHub releases also attach a digest-pinned docker-compose.pinned.yml. The published container images now include OCI SBOM/provenance attestations and must pass container smoke tests before release completion.

If you use MedAssist from another device or domain, set PUBLIC_APP_URL to the address people actually use to open the app.

Deployment Security

Public deployments must enable authentication. The default Docker Compose setup exposes only the frontend; keep the backend private and put public installations behind HTTPS.

More deployment and security options are documented in docs/CONFIGURATION.md.

Configuration

Configure the application with environment variables in .env. Keep the basic container settings in the README and use the dedicated docs for the full reference.

Initial Configuration

Variable Default Description
PUID 1000 User ID for container file permissions
PGID 1000 Group ID for container file permissions
PORT 3000 Backend API port
CORS_ORIGINS http://localhost:4174 in .env.example Allowed frontend origins; backend defaults also include http://localhost:5173 for local Vite development
TZ Europe/Berlin Default timezone for reminders
AUTH_ENABLED false Enable authentication; required for public production deployments
ALLOW_UNAUTHENTICATED false Explicit local/private-only override for production no-auth startup

Optional but commonly needed:

Variable Default Description
PUBLIC_APP_URL — Public base URL for notification, share, and local password-reset links; production reset links require HTTPS and never use request Host headers
SMTP_HOST, SMTP_USER, SMTP_PASS or SMTP_TOKEN, SMTP_FROM — Required with PUBLIC_APP_URL to enable local-password reset emails; OIDC-only accounts are excluded

Detailed configuration references:

Development

Development setup and local commands are documented in docs/DEVELOPMENT.md.

For cross-stack maintenance work and pre-PR validation, the repository root now exposes:

npm run check
npm run build

Acknowledgements

This project was inspired by MedAssist by njic.

Releases

Packages

Used by

Contributors

Languages