Skip to main content
Behind the scenes

How Lucidio Works

Simple on the outside. Thoughtful logic underneath.

Lucidio combines deterministic calculations, contextual AI generation, and a focused interface to turn complicated health information into simple context and useful questions.

Lab result pipeline

What happens between typing a result and getting questions you can bring to an appointment.

  1. STEP 1Enter

    Choose a lab test and enter your result and the reference range printed on your report.

  2. STEP 2Validate

    Lucidio checks that the values are complete and mathematically valid.

  3. STEP 3Calculate

    Application logic determines whether the result is below, within, or above the user's entered range.

  4. STEP 4Understand

    AI receives the specific test, value, unit, reference range, and calculated status to create a short plain-English explanation.

  5. STEP 5Prepare

    Lucidio generates a few concise questions the user can discuss with a healthcare professional.

  6. STEP 6Save

    Users can save or print the session for later appointment preparation.

The AI does not decide whether a lab result is above or below the entered range. That classification is calculated directly by the application.

Ask Me ✨ pipeline

A short path from what you are worried about to what you can ask.

  1. User concern
  2. Context validation
  3. Context-aware AI generation
  4. 3–4 simple questions
  5. Healthcare conversation

Ask Me is intentionally not designed as a general medical chatbot. Its job is to turn the user's specific concern into concise questions they can bring to a healthcare professional.

What makes Lucidio different

Deterministic Where It Matters

Range classification is calculated using code rather than guessed by AI.

AI Where It Helps

AI is used for flexible plain-language explanations and contextual question generation.

Designed for Simplicity

Generated responses are intentionally short and easy to scan.

Built Around the Conversation

Lucidio does not try to replace a healthcare professional. It helps users prepare better questions for one.

Technical foundation

Only what Lucidio actually uses today. There is no proprietary medical model, no clinical database, and no server-side medical record.

Frontend framework

React 19 with TanStack Start and TanStack Router, built with Vite and styled with Tailwind CSS and shadcn/ui components.

AI integration

Google Gemini via the Lovable AI Gateway, called with the Vercel AI SDK inside TanStack server functions so the API key stays on the server.

State management

Local React component state for forms and results; no global store and no server-side user accounts.

Range calculation

Below / within / above status and the distance from the nearest boundary are computed in TypeScript, then passed to the model as fixed truth.

Validation

Client-side form checks for missing, non-numeric, or inverted ranges, plus Zod schema validation on every server function request.

Saved-session storage

Sessions and feedback are stored as JSON in your browser's localStorage. Nothing is uploaded, and the data is not encrypted.

Print output

A dedicated print stylesheet renders the Lucidio Summary as a clean document with navigation and controls hidden.

Responsive design & PWA

Mobile-first layouts from 320px upward, safe-area handling, and a web app manifest with icons so Lucidio can be installed to a home screen.

Accessibility

Semantic landmarks, labelled form fields, aria-live status updates, visible focus states, keyboard-accessible menus and dialogs, and reduced-motion support.

Error handling

Failed AI requests surface a clear error message instead of hard-coded questions, and urgent phrasing is caught before any AI request is made.

Safety by design

  • Lucidio does not diagnose conditions.
  • Lucidio does not prescribe treatment or medication.
  • Range classification uses the user's own entered reference range.
  • AI-generated language is educational and designed for appointment preparation.
  • Potentially urgent concerns trigger safety messaging instead of normal generation.

For education only. Lucidio does not diagnose, treat, or replace a doctor. Lab results should always be interpreted by a healthcare professional using the patient's symptoms, history, exam, and full lab report.