Files
stack/docs/4-api
Jason Woltje 973502f26e feat(#37-41): Add domains, ideas, relationships, agents, widgets schema
Schema additions for issues #37-41:

New models:
- Domain (#37): Life domains (work, marriage, homelab, etc.)
- Idea (#38): Brain dumps with pgvector embeddings
- Relationship (#39): Generic entity linking (blocks, depends_on)
- Agent (#40): ClawdBot agent tracking with metrics
- AgentSession (#40): Conversation session tracking
- WidgetDefinition (#41): HUD widget registry
- UserLayout (#41): Per-user dashboard configuration

Updated models:
- Task, Event, Project: Added domainId foreign key
- User, Workspace: Added new relations

New enums:
- IdeaStatus: CAPTURED, PROCESSING, ACTIONABLE, ARCHIVED, DISCARDED
- RelationshipType: BLOCKS, BLOCKED_BY, DEPENDS_ON, etc.
- AgentStatus: IDLE, WORKING, WAITING, ERROR, TERMINATED
- EntityType: Added IDEA, DOMAIN

Migration: 20260129182803_add_domains_ideas_agents_widgets
2026-01-29 12:29:21 -06:00
..

API Reference

Complete API documentation for Mosaic Stack backend.

Chapters

  1. Conventions — API design patterns, endpoints, and response formats
  2. Authentication — Auth endpoints and type definitions

API Standards

  • REST Conventions: Standard HTTP methods and status codes
  • Type Safety: All requests/responses typed via @mosaic/shared
  • Error Handling: Consistent error response format
  • Authentication: Bearer token via Authorization header

Base URL

  • Development: http://localhost:3001
  • Production: Configure via NEXT_PUBLIC_APP_URL

Authentication

All authenticated endpoints require:

Authorization: Bearer {session_token}

Next Steps

  • Review Architecture for design context
  • Check Development for contributing guidelines