feat(g1-g4): design system, memories, medical tracking, AI brain #1

Merged
manohar merged 1 commit from feat/g1-g4-design-memories-medical-ai into main 2026-05-17 12:27:43 +00:00
Owner

Summary

  • G1 — Design System: 14 reusable UI primitives (Button, Card, Modal, Sheet, Tabs, Badge, Avatar, WashiTape, etc.), Framer Motion page transitions, sun/moon CSS theme vars, Caveat handwritten font, /dev/components showcase page
  • G2 — Memories Pipeline: Direct-to-R2 presigned uploads, Sharp WebP thumbnails, LiteLLM vision captions + pgvector(1536) semantic embeddings, CSS masonry gallery with infinite scroll, private toggle (wipes AI data), semantic + ILIKE fallback search
  • G3 — Medical: Dose log + immutable correction audit trail, IAP vaccination bulk import, color-coded emergency escalation page, pediatrician phone in Settings
  • G4 — AI Brain: Two-layer guardrail (keyword → LLM classifier) → router (structured DB tool-use with 7 tools / memory search / general parenting); ai_usage table; 22-case medical bypass safety test suite

DB Migrations (run in Dokploy terminal)

-- Run in order:
-- drizzle/0011_memories.sql
-- drizzle/0012_medical_doses.sql
-- drizzle/0013_ai_usage.sql

Env vars needed

VISION_MODEL=
EMBEDDING_MODEL=
CLASSIFIER_MODEL=
QUERY_MODEL=
CHAT_MODEL=

Test plan

  • /dev/components renders all 14 UI components without errors
  • Upload a photo → thumbnail generates → vision caption appears
  • Semantic search returns correct photo
  • Private toggle removes caption from DB
  • Log a vaccine dose and correction
  • /medical/emergency shows color-coded cards
  • Medical query ("baby has fever") → redirected with pediatrician number
  • Parenting query ("when do babies crawl?") → AI responds normally
  • Structured query ("last feed time") → DB tool result

🤖 Generated with Claude Code

## Summary - **G1 — Design System:** 14 reusable UI primitives (Button, Card, Modal, Sheet, Tabs, Badge, Avatar, WashiTape, etc.), Framer Motion page transitions, sun/moon CSS theme vars, Caveat handwritten font, `/dev/components` showcase page - **G2 — Memories Pipeline:** Direct-to-R2 presigned uploads, Sharp WebP thumbnails, LiteLLM vision captions + pgvector(1536) semantic embeddings, CSS masonry gallery with infinite scroll, private toggle (wipes AI data), semantic + ILIKE fallback search - **G3 — Medical:** Dose log + immutable correction audit trail, IAP vaccination bulk import, color-coded emergency escalation page, pediatrician phone in Settings - **G4 — AI Brain:** Two-layer guardrail (keyword → LLM classifier) → router (structured DB tool-use with 7 tools / memory search / general parenting); `ai_usage` table; 22-case medical bypass safety test suite ## DB Migrations (run in Dokploy terminal) ```sql -- Run in order: -- drizzle/0011_memories.sql -- drizzle/0012_medical_doses.sql -- drizzle/0013_ai_usage.sql ``` ## Env vars needed ``` VISION_MODEL= EMBEDDING_MODEL= CLASSIFIER_MODEL= QUERY_MODEL= CHAT_MODEL= ``` ## Test plan - [ ] `/dev/components` renders all 14 UI components without errors - [ ] Upload a photo → thumbnail generates → vision caption appears - [ ] Semantic search returns correct photo - [ ] Private toggle removes caption from DB - [ ] Log a vaccine dose and correction - [ ] `/medical/emergency` shows color-coded cards - [ ] Medical query ("baby has fever") → redirected with pediatrician number - [ ] Parenting query ("when do babies crawl?") → AI responds normally - [ ] Structured query ("last feed time") → DB tool result 🤖 Generated with [Claude Code](https://claude.com/claude-code)
manohar added 1 commit 2026-05-17 12:19:21 +00:00
G1 — Design System: 14 UI primitives (Button, Card, Modal, Sheet, Input,
Textarea, Select, EmptyState, LoadingShimmer, ConfirmDialog, WashiTape,
Badge, Avatar, Tabs), PageTransition with Framer Motion, sun/moon CSS vars,
Caveat font, /dev/components visual showcase.

G2 — Memories Pipeline: R2 presigned uploads, Sharp thumbnail generation,
LiteLLM vision captions + pgvector embeddings, CSS masonry gallery with
infinite scroll, private toggle, semantic search fallback to ILIKE.

G3 — Medical: dose log + correction audit trail, IAP vaccine bulk import,
emergency escalation page, pediatrician phone in settings.

G4 — AI Brain: keyword guardrail → LLM classifier → structured DB tool-use
(7 tools) → memory search → general parenting handler; ai_usage table;
22-case medical bypass safety test suite.

DB migrations: 0011_memories, 0012_medical_doses, 0013_ai_usage.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
manohar merged commit 5ca655fbe6 into main 2026-05-17 12:27:43 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: manohar/tia#1
No description provided.