Alchemist's Grand Grimoire
Schedule safely, live magically!
Created on 11th October 2025
•
Alchemist's Grand Grimoire
Schedule safely, live magically!
The problem Alchemist's Grand Grimoire solves
Alchemist's Grimoire
A modern, secure, and context-aware wellness application that helps users maintain perfect medication adherence and track their health journey. It solves the problem of forgotten doses and the lack of personalized, intelligent scheduling by centralizing all wellness data and proactively nudging users through their preferred channels.
🎯 Core Functionality
Basic Features
Dynamic Scheduling: Web interface for setting detailed medication schedules (name, dosage, time, frequency).
Flexible Alerts: Reminder notifications via Browser Push, Email, or SMS (future integration), with customizable timing (5 min, 15 min, 1 hr, etc.).
Adherence Logging: Simple log of taken vs. missed/skipped doses.
Secure Authentication: Two-Factor Authentication (2FA) using Email OTP for robust login security.
Full Account Control: Securely delete all associated data (schedules, logs, subscription keys) when a user deletes their account.
Advanced Features
Data Visualization Dashboard: Displays adherence rates, missed doses, and overall trends using charts.
Dynamic Reminder Timing: Allows users to set a preferred time window before the dose is due (e.g., 30 minutes before), which the backend scheduler respects.
Google Calendar Sync: Medication schedules sync directly with the user's Google Calendar.
AI Chatbot Health Assistant: Users can ask natural language questions like "What pills do I need to take today?" or "Did I miss any dose yesterday?"
Dynamic Snooze & Pause: Users can instantly snooze a pending dose for pre-set intervals (5, 15, 30 minutes) or indefinitely pause the reminder with a single click from the dashboard.
🤖 AI & Technical Capabilities
Gemini AI Integration: Utilized for a Context-Aware Chatbot that grounds its responses in the user's specific schedule, dosage, and dose history data. The AI can also answer general health and drug safety questions using Google Search grounding.
Secure Web Push (VAPID): Backend uses VAPID keys to send encrypted browser push notifications, ensuring timely alerts even when the app is closed.
Stateful Dose Rescheduling: The system captures the snooze event, updates the dose's expected time in the database, and dynamically cancels the current reminder job while queuing a new one based on the chosen snooze duration. This ensures accurate adherence tracking and precise, delayed notifications.
Cascading Deletion: MongoDB backend logic ensures that deleting a user account automatically deletes all associated Medication Schedules and Dose Logs for privacy and data integrity.
🎨 User Experience
Modern UI/UX: Clean, dark/mystical themed design for comfortable viewing.
Responsive Design: Works seamlessly across all devices.
Robust State Management: Utilizes Zustand for centralized, fast, and complex state management across the application.
Challenges we ran into
Authentication Flow Integration: Successfully coordinating the two-step OTP process with JWT token generation and storage across the client and server.
Intermittent 401 Loops: Resolving the persistent bug where background data fetches crashed the application after a user signed out or was deleted, requiring careful implementation of guard clauses within components.
Asynchronous Push Pipeline: Implementing the Service Worker registration and the VAPID key exchange to ensure browser push notifications are reliably sent from the backend cron job.
Coordination of Agents: Ensuring the Snooze action correctly updates the central database log, cancels the existing reminder job, and reliably registers a new delayed job for the next push notification.
