Inspiration

We are living in an era of decentralized, unregulated biology.

People are stacking prescriptions, supplements, GLP-1s, cannabinoids, underground IPEDs, gray-market peptides, and viral TikTok "biohacks" with almost no shared safety layer. In practice, millions of people are turning themselves into personal experiments — often without knowing what is interacting, what is untested, what could distort their biomarkers, or what they should actually tell a doctor.

Traditional healthcare is entirely disconnected from this reality. Doctors lack visibility into gray-market pharmacology. Independent chemical testing is fragmented. And consumers have no centralized way to track how overlapping compounds interact, degrade, or impact their biomarkers over time. The tools that do exist are either clinical databases that require a medical degree to navigate, or generic label warnings that nobody reads.

ClearDose is built for that reality: not to help people use more compounds blindly, but to give people and clinicians visibility into the self-experimentation already happening.


What it does

ClearDose maps a person's full compound stack into a deterministic interaction graph, then turns it into an evidence-graded risk score, clinical safety flags, and a doctor-ready disclosure brief.

Compound Input — Enter your stack in plain language, by voice, or by photographing a supplement label or pill. Claude parses the input and resolves compound names, dosages, and timing into structured data. Users never need to search a database — they just describe what they take.

Deterministic Risk Analysis — Every interaction fact comes from a curated clinical knowledge graph sourced from BNF, MHRA Drug Safety Updates, DailyMed, Stockley's Drug Interactions, and NIH ODS — not from AI inference. The system computes an evidence-graded risk score (0–100), detects CYP enzyme conflicts, and maps cumulative organ stress across cardiovascular, hepatic, renal, CNS, and musculoskeletal systems.

3D Body System Mapping — An interactive Three.js point-cloud body model visualises which organ systems your current stack is loading, with per-region risk indicators updated in real time.

GP Disclosure Brief — The core output: a structured clinical document in two versions — one for the patient, one for the clinician. It lists every compound, every known interaction with its evidence grade, blood test flags, and plain-language scripts the user can bring to a GP appointment without shame or confusion.

Demo Mode — A guided walkthrough using a real-world stack (warfarin, CBD, ibuprofen, testosterone, semaglutide, BPC-157, fish oil, vitamin D) that shows new users exactly how ClearDose works before they enter their own data.


How we built it

AI-Assisted Development: We used Z.ai's GLM-4 and Claude Code to generate and explore ideas, then used Manus to document and evaluate them. Manus sourced and reformatted open-source supplement and pharmacological datasets into the structure our knowledge graph required. Manus ran Cursor to generate initial frameworks, while Z.ai's sub-agents handled individual functional modules in parallel using Goal and Loop features to coordinate overnight. A feedback pipeline had Manus test the live Vercel deployment and pass findings to Cursor, which automatically created tickets for resolution.

Frontend: Next.js 16 (App Router) with React 19 and TypeScript. All styling is inline CSSProperties — no Tailwind utilities in components — giving pixel-perfect control over the dark molecular aesthetic. Custom CSS animations (molecular morph, voice ring pulse, node glow, chain-build) built around a #070707 base with DM Serif Display, Syne, DM Mono, and Inter from Google Fonts.

AI Core: Anthropic Claude SDK (claude-sonnet-4-6) handles two roles only: parsing messy input (/api/identify) and explaining knowledge base findings in plain language (/api/brief). Claude never generates interaction facts. Every severity grade, mechanism, and clinical note is drawn from the deterministic graph.

Knowledge Graph: lib/knowledgeGraph.ts — 66 compound nodes, 98 interaction edges, curated from SmPCs, BNF, MHRA, and Stockley's. Backed by an embedded fallback KB (37 compounds, 13 interactions from DailyMed + NIH ODS) that works with zero API calls.

Live Evidence: /api/assess fetches targeted papers from EuropePMC's free REST API for each known interaction, returning title, abstract, citation count, and PMID. Confidence scores are computed from evidence grades (A–D), not hardcoded.

Voice Input: Web Speech API (SpeechRecognition) provides real-time voice-to-text feeding directly into the AI parser.

Data and State: All user data stored in localStorage — no backend database, fully private by design.


Challenges we ran into

Separating AI explanation from AI facts: The hardest design constraint was ensuring Claude could never be the source of a clinical claim. Building the grounding architecture — where every risk verdict traces back to a KB edge with a source citation, and Claude can only paraphrase what's already there — required significant pipeline work and careful prompt design to prevent the model from "filling in" gaps with plausible-sounding but unverified interactions.

Natural language ambiguity at dose level: "Two scoops of pre-workout before the gym" requires inferring the product's compound profile, estimating doses from typical serving sizes, and assigning a time — all from one sentence. Handling brand slang, multilingual input, and confidence scoring required extensive prompt iteration.

Three.js in Next.js App Router: Server-side rendering a Three.js canvas causes hydration failures. Resolved with next/dynamic + ssr: false and moving all Three.js initialisation into client-only lifecycle hooks.

Medical accuracy without regulatory overreach: Contraindication data needs to be clinically grounded while the product explicitly avoids acting as a regulated medical device. Every output carries an evidence grade (A–D), confidence band, and disclaimer — making the system's limitations legible rather than hidden.


Accomplishments that we're proud of

The evidence layer: Rather than relying on model inference, ClearDose cross-references every interaction against a hand-curated knowledge graph and live clinical literature, giving every risk flag a traceable source with an evidence grade. The system never presents an uncertain risk as confirmed.

End-to-end GP disclosure pipeline: A user can go from "I take testosterone, semaglutide, and CBD" to a fully structured, clinician-ready disclosure brief — with compound table, interaction severity list, blood test flags, and verbatim GP scripts — in under 30 seconds.

Graceful degradation: The entire risk scoring, interaction matrix, and body map work with zero AI calls. The deterministic fallback means the core safety function is never dependent on API availability.

Privacy-first architecture: No user accounts, no cloud storage. The only external call is to the Anthropic API for parsing and explanation. Every clinical fact stays on-device.


What we learned

AI's role in safety products has hard limits: When health is the domain, the temptation to let the model "just answer" is dangerous. Building the separation between AI-as-parser and KB-as-source-of-truth taught us that the most important AI design decisions are about what the model is not allowed to do.

Supplement interactions are genuinely underestimated: Researching the knowledge graph surfaced combinations — high-dose vitamin D + calcium, St John's Wort + SSRIs, fish oil + warfarin — that most users and many practitioners aren't aware of. The information exists; it's just never been made accessible outside clinical reference books.

Prompt design is product design: The quality of the parser is entirely determined by the system prompt. Handling confidence levels, multilingual input, and brand-name resolution taught us that LLM integration is an ongoing product discipline, not a one-time API call.


What's next for ClearDose

NHS and prescribing system integration: A clinician-facing view that can receive a patient's ClearDose report directly, flagging undisclosed compounds against their prescribing record before a consultation.

Wearable correlation: Pull data from Apple Health and Google Fit to correlate compound timing with sleep quality, HRV, and energy markers — closing the loop between what someone takes and how they actually feel.

Expanded knowledge graph: Broaden coverage beyond 66 compounds to include the full gray-market landscape — more research peptides, SARMs, nootropics, and compounded GLP-1s — with the same evidence-grade rigour.

Practitioner mode: A shareable report format for GPs and pharmacists to review a patient's full stack in a clinical context, with structured fields designed to fit existing consultation workflows.

Built With

Share this project:

Updates