# Phase 6/7 Bridge — Event Graph + Family Dashboard **Director Decision:** Phase 7-ready, not MVP. Family iPad dashboard with proper auth. **Timeline:** Aggressive — this week for skeleton, next week for features **Dispatch:** Socrates (backend) + Daedalus (frontend) — parallel with API contract ## Event Graph (Socrates) ### Schema Requirements (Phase 7-Ready) ``` events id, source, source_id, event_type, title, description start_date, end_date, all_day, timezone location, location_lat, location_lon family_member, assigned_to, status confidence, extracted_at, created_at, updated_at raw_text, document_url coordination id, event_id, context, needs_confirmation, blocking assigned_to, child, extracted_dates confirmed_at, confirmed_by maintenance id, event_id, item_name, category, who last_done, next_due, interval_days, interval_miles service_type, provider, cost, warranty_expires document_url, confidence conflicts id, event_ids[], conflict_type, severity detected_at, resolved_at, resolution notified, acknowledged_at members id, name, role, email, telegram_id calendar_url, preferences ``` ### API Contract ``` POST /api/v1/events — create from document pipeline GET /api/v1/events — list with filters (date_range, member, type) GET /api/v1/events/:id — single event PUT /api/v1/events/:id — update DELETE /api/v1/events/:id — soft delete GET /api/v1/briefing — HBM hierarchical briefing Query: date, member, scope (day/week/month) Response: { daily: {}, upcoming: [], coordination: [], maintenance: [] } GET /api/v1/maintenance — upcoming maintenance items GET /api/v1/conflicts — active conflicts POST /api/v1/conflicts/:id/acknowledge WebSocket /ws/events — real-time updates ``` ### Integration Points - Document pipeline writes to `events` table after classification - Coordination extraction writes to `coordination` table - Conflict scanner reads from `events`, writes to `conflicts` - HBM generator reads all tables, produces briefing ## Family Dashboard (Daedalus) ### iPad-First Design - 1024×768 minimum, touch-optimized - Cards, not tables - Large tap targets (min 44pt) - No hover states ### Views 1. **Today** — what's happening now/soon 2. **Week** — upcoming events, maintenance due 3. **Documents** — recent documents with preview 4. **Family** — per-member view 5. **Settings** — preferences, notifications ### Auth - Same middleware sessions as existing Icarus - Family user table with roles (admin/parent/child/viewer) - Session cookie + CSRF protection - No passwords stored locally — delegate to OAuth or use secure cookie tokens ### Real-Time - WebSocket connection for live updates - Briefing cards auto-refresh on new documents ## API Contract (Both Agents) ### Data Shapes ```typescript interface Event { id: string; type: 'calendar' | 'coordination' | 'maintenance' | 'document'; title: string; description?: string; startDate: string; // ISO endDate?: string; allDay: boolean; member: string; // 'matt' | 'aundrea' | 'sullivan' | 'harper' | 'family' location?: string; status: 'confirmed' | 'tentative' | 'needs_action'; source: string; // 'email' | 'document' | 'manual' | 'inference' confidence: number; } interface Briefing { date: string; sections: { urgent: Event[]; // next 24h today: Event[]; coordination: Event[]; // needs confirmation maintenance: Event[]; // due soon documents: Document[]; // recent } } ``` ### Endpoint Prefix `/api/v1/` ### Auth Header `Authorization: Bearer ` ## Dispatch Instructions ### Socrates — Immediate 1. Create Event Graph schema (SQLite + SQLAlchemy) 2. Implement CRUD API (FastAPI) 3. Integrate with document pipeline 4. Build HBM briefing generator 5. WebSocket endpoint for real-time ### Daedalus — After API contract confirmed 1. React/Next.js scaffold 2. Auth middleware integration 3. Today view (consumes GET /api/v1/briefing) 4. Week view 5. Document browser 6. iPad optimization pass ### Parallel Work - Socrates builds API - Daedalus builds UI with mock data - Both test with staging API - Integration at end of week ## Files - `shared/api-specs/event-graph-api.md` — full API contract - `shared/api-specs/dashboard-ui-spec.md` — component spec - `shared/design-tokens/ipad-layout.json` — layout tokens --- **Status:** Approved for dispatch **Next:** Socrates spec first, Daedalus UI spec parallel