renovate-botandrmcampos d42ee62167
Build & Deploy to Pages / deploy (push) Successful in 5m6s
fix(deps): update dependency appwrite to v26 (#3)
This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [appwrite](https://appwrite.io/support) ([source](https://github.com/appwrite/sdk-for-web)) | [`^25.2.0` → `^26.0.0`](https://renovatebot.com/diffs/npm/appwrite/25.2.0/26.1.0) | ![age](https://developer.mend.io/api/mc/badges/age/npm/appwrite/26.1.0?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/appwrite/25.2.0/26.1.0?slim=true) |

>  **Important**
>
> Release Notes retrieval for this PR were skipped because no github.com credentials were available.
> If you are self-hosted, please see [this instruction](https://github.com/renovatebot/renovate/blob/master/docs/usage/examples/self-hosting.md#githubcom-token-for-release-notes).

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNTIuMSIsInVwZGF0ZWRJblZlciI6IjQzLjI1Mi4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

---------

Co-authored-by: Ricardo Campos <ricardompcampos@gmail.com>
Reviewed-on: #3
Reviewed-by: Ricardo Campos <ricardompcampos@gmail.com>
Co-authored-by: Renovate Bot <renovate-bot@lightroasted.vps-kinghost.net>
2026-07-22 21:04:20 +00:00

MedMinder

A progressive web app (PWA) for tracking daily medication schedules and receiving push notification reminders.

Features

  • Passwordless login via magic link (email)
  • Add, edit, and delete medications with dosage, frequency, and reminder times
  • Daily dashboard showing today's scheduled doses, with confirmation to mark as taken
  • Push notifications at scheduled times (requires Firebase + Appwrite Messaging setup)
  • Dark/light theme
  • Installable as a PWA on Android and iOS

Tech stack

Layer Technology
Frontend React 19 + Vite, TypeScript
UI shadcn/ui + Tailwind CSS v4
Backend / Auth / Database Appwrite
Push notifications Appwrite Messaging + Firebase FCM
PWA vite-plugin-pwa (Workbox)

Services

Appwrite

Appwrite handles three things in this project:

  • Auth — passwordless magic link login. The user enters their email, receives a link, and clicks it to get a real session. No passwords stored.
  • Database — two collections: medications (name, dosage, frequency, reminder times, timezone) and logs (a record each time a dose is confirmed as taken). Row-level security ensures users can only access their own records.
  • Messaging — sends push notifications to registered devices via FCM. The send-reminders function calls the Appwrite Messaging API to dispatch notifications at the right time.

Firebase (FCM)

Firebase Cloud Messaging (FCM) is the delivery layer for push notifications. Appwrite Messaging uses FCM as a provider to actually route notifications to the browser or device. Firebase itself is not used for auth or storage — only for push delivery.

A Firebase project is required to:

  • Generate a VAPID key (used by the browser to subscribe to push)
  • Authenticate Appwrite Messaging via a service account JSON

Getting started

1. Clone and install

git clone <repo>
cd medminder
npm install

2. Configure environment variables

Copy .env.example to .env and fill in all values:

cp .env.example .env

Appwrite variables

Variable Description
VITE_APPWRITE_ENDPOINT Your Appwrite endpoint (e.g. https://cloud.appwrite.io/v1)
VITE_APPWRITE_PROJECT_ID Your Appwrite project ID
VITE_APPWRITE_DATABASE_ID Your Appwrite database ID
VITE_APPWRITE_MEDICATIONS_COLLECTION_ID Collection ID for medications
VITE_APPWRITE_LOGS_COLLECTION_ID Collection ID for dose logs
VITE_APPWRITE_FCM_PROVIDER_ID FCM provider ID from Appwrite Messaging → Providers

Firebase variables

Variable Description
VITE_FIREBASE_API_KEY From Firebase project settings
VITE_FIREBASE_AUTH_DOMAIN From Firebase project settings
VITE_FIREBASE_PROJECT_ID From Firebase project settings
VITE_FIREBASE_STORAGE_BUCKET From Firebase project settings
VITE_FIREBASE_MESSAGING_SENDER_ID From Firebase project settings
VITE_FIREBASE_APP_ID From Firebase project settings
VITE_FIREBASE_VAPID_KEY From Firebase → Project Settings → Cloud Messaging → Web Push certificates

3. Set up Appwrite

  1. Create a project and database in Appwrite Console
  2. Create two collections with Row security enabled:

medications — attributes: name (string), dosage (string), frequency (string), times (string[]), startDate (string), durationDays (integer, optional), timezone (string), userId (string)

logs — attributes: medicationId (string), userId (string), takenAt (string), scheduledDate (string), scheduledTime (string, optional)

  1. On both collections set collection-level permissions: Create: Users, Read: Users

4. Deploy the reminder function

The functions/send-reminders directory contains an Appwrite Function that runs every minute and sends push notifications for due medications.

# Pack it
tar -czf send-reminders.tar.gz -C functions/send-reminders .

Deploy in Appwrite Console → Functions → Create → Node.js 18 → upload the tar.gz → set cron to * * * * * → add the environment variables listed in .env.example under the function section.

5. Run locally

npm run dev

Project structure

src/
├── components/
│   ├── layout/       # AppLayout, BottomNav
│   └── ui/           # shadcn/ui components
├── hooks/            # useAuth
├── lib/
│   ├── appwrite.ts   # Appwrite client
│   ├── auth.ts       # Magic link helpers
│   ├── medications.ts # Database queries + types
│   └── notifications.ts # FCM token registration
├── pages/            # Dashboard, Medications, Settings, Login, AuthCallback
└── sw.ts             # Service worker (Workbox + FCM push handler)
functions/
└── send-reminders/   # Appwrite Function — cron-based push dispatcher
S
Description
[Pages] Offline PWA to help remember pills to take with push notifications
Readme MIT
1.1 MiB
Languages
TypeScript 83.9%
JavaScript 7.6%
CSS 7.3%
HTML 1.2%