Version: 1.0
Designer: Jonsi
Date: 2026-03-11
Status: Staging only. Do not deploy to production.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Symptom Tracker — Home v2 Prototype</title> | |
| <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet"> | |
| <style> | |
| :root { | |
| --teal-600: #5BC5C2; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- 003: Nuclear RLS fix — drop ALL select policies and rebuild without circular refs | |
| -- The issue: children ↔ provider_connections cross-reference each other in SELECT policies | |
| -- ============================================================ | |
| -- DROP ALL EXISTING SELECT POLICIES | |
| -- ============================================================ | |
| -- children | |
| DROP POLICY IF EXISTS "Parents can read their own children" ON children; | |
| DROP POLICY IF EXISTS "Providers can read connected children" ON children; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Fix RLS policies that use subqueries with OR (causes issues on some Supabase versions) | |
| -- Split compound policies into separate parent + provider policies | |
| DROP POLICY IF EXISTS "Parents can read their own children" ON children; | |
| CREATE POLICY "Parents can read their own children" | |
| ON children FOR SELECT USING (parent_id = auth.uid()); | |
| CREATE POLICY "Providers can read connected children" | |
| ON children FOR SELECT USING (id IN (SELECT child_id FROM provider_connections WHERE provider_id = auth.uid())); | |
| DROP POLICY IF EXISTS "Parents can read tracked symptoms for their children" ON tracked_symptoms; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Initial schema for PANS/PANDAS symptom tracker | |
| -- profiles table (extends auth.users) | |
| CREATE TABLE profiles ( | |
| id uuid REFERENCES auth.users ON DELETE CASCADE PRIMARY KEY, | |
| role text NOT NULL CHECK (role IN ('parent', 'provider')), | |
| display_name text, | |
| created_at timestamptz DEFAULT now() NOT NULL, | |
| updated_at timestamptz DEFAULT now() NOT NULL | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- | |
| Journey Pediatrics — New Patient Inquiry Email Sequence (v2) | |
| Trigger: Someone submits the website intake form (has NOT booked an intro call) | |
| Goal: Build trust, introduce JP, convert to intro call booking | |
| Voice: Warm, personal, 6th–8th grade reading level | |
| From: John from Journey Pediatrics (Family Communications Manager) | |
| Prepared by: Loki | Date: 2026-03-06 | Revision: v2 | |
| Implementation: GHL workflow | |
| --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- | |
| Journey Pediatrics — New Patient Inquiry Email Sequence | |
| Trigger: Someone submits the website intake form (has NOT booked an intro call) | |
| Goal: Build trust, introduce JP, convert to intro call booking | |
| Voice: Warm, personal, 6th–8th grade reading level | |
| From: Alice from Journey Pediatrics | |
| Prepared by: Loki | Date: 2026-03-06 | |
| Implementation: GHL workflow | |
| --> |
NewerOlder