Note: This is a public documentation repository. The source code is maintained in a private repository.
Live App: https://protocolbuddy.online/
A Next.js web application that provides extensive library of evidence-based health protocols with precision dosage calculators. The app features weight-based dosing, liquid concentration converters, an AI Q&A assistant, and a paywall system with Stripe integration.
- Protocol System: Extensive library of evidence-based health protocols covering vitamins, minerals, antiparasitics, metabolic support, detoxification, and more
- Dosage Calculators:
- Weight-based calculations (kg/lb)
- Liquid dose converter (mg/ml calculations)
- Powder solution calculator (dissolving powders in liquid)
- Static dosing options
- AskBuddy: AI Q&A widget that answers health questions and links to relevant protocols
- Guides: Long-form guides covering dosage calculation, safety/research, and protocol explainers
- Protocol Search: Whole-word keyword search across protocol names, descriptions, instructions, and cautions
- Calendar Integration: Set reminders and add protocols to your calendar
- Print to PDF: Export protocols and dosage information as PDF documents
- Saved Protocols: Bookmark and manage your favorite protocols
- Payment Integration: Paywall system with Stripe checkout for premium access
- User Tracking: Vercel KV storage for access state management
- Dark Mode: Theme support with next-themes
- Next.js 15 with App Router and Turbopack
- React 18 with TypeScript
- Radix UI components for accessible UI
- Tailwind CSS for styling
- next-themes for dark mode support
- Vercel KV for user data storage
- Stripe for payment processing and subscription management
- Vercel AI SDK powering AskBuddy with OpenAI gpt-4o-mini
- React Hook Form + Zod for form validation
- Protocol Definition: Each protocol is a TypeScript object with standardized schema
- Protocol Interface: Dosage calculations, categories, and safety information
- Categories: Vitamins, minerals, antiparasitics, metabolic support, detoxification, circulation, cognitive, immune support, pain relief, respiratory, antibacterial, antiviral, anti-inflammatory
- Weight-based Calculator: Supports both kg and lb with min/max dosing per kg
- Liquid Dose Converter: For liquid supplements with mg/ml calculations
- Powder Solution Calculator: Calculate concentrations when dissolving powders in liquids
- Static Dosing: For non-weight-based protocols
- Form Validation: Zod schemas with comprehensive error handling
- Visual Aids: Concentration flow visualization for better understanding
- AI-Powered Answers: Answers health questions and links to relevant protocols
- Relevance Guardrails: Constrained to known protocols to prevent hallucinated recommendations
- Long-form Content: Guides covering dosage calculation, safety/research, and protocol explainers
- Reciprocal Linking: Guides link back to their related protocol pages
- Whole-word Matching: Search across protocol names, keywords, descriptions, instructions, and cautions without false-positive substring matches
- Stripe Integration: Checkout sessions for premium access
- User Tracking: Vercel KV storage for user access state and saved protocols
- Paywall Component: Conditional rendering based on user access status
- Zustand: Lightweight state management for global app state
- React Hook Form: Form state and validation
- next-themes: Theme persistence and dark mode
All rights reserved.
Disclaimer: This app provides educational information only and is not a substitute for professional medical advice. Always consult a healthcare provider before starting any supplement or treatment protocol.
