Architecture: What is the production-ready MongoDB collection structure fo...
Documentation for Sessions
🏗️ Architecture: What is the production-ready MongoDB collection structure fo...
Date: 2026-03-26
Time: 15:30:08 UTC
Session: gspace1-271.9
Agent: angular
Confidence: 93%
Status: ✅ Documented
📋 Decision Context
Question:
What is the production-ready MongoDB collection structure for kanban and calendar Angular Element widgets?
Task: Not specified
🎯 Decision Made
Chosen:
Six collections total. Kanban: KanbanBoard {slug, name, order}, KanbanColumn {slug, name, order}, Task {title, description, column (slug ref), board (slug ref), priority, assignee, tags}. Calendar: CalendarGroup {name, color}, Event {title, start, end, calendar (group ref), color, allDay}. All collections scoped by spaceId + universeId automatically via DataClient.
Options Considered:
- No alternatives documented
💭 Reasoning
Each structural element (board, column, calendar group) needs its own collection so CRUD operations work independently. Cards/events reference structural elements by slug (not MongoDB _id) because: (1) slugs are human-readable in HTML attributes, (2) slugs survive re-seeding, (3) the widget's column ID must match what cards store. The DataClient automatically scopes all queries to the current space+universe, so no manual spaceId/universeId filtering needed. Order field on boards/columns enables stable sort order via sortBy='order' in the fetch call.
📁 Files Involved
libs/libs-structural/platform-elements-angular/src/lib/components/kanban-widget/kanban-widget.component.tslibs/libs-structural/platform-elements-angular/src/lib/components/calendar-widget/calendar-widget.component.ts
🔗 Related
- Decision ID:
dev_1774539008753_vgasayp - Session: 271
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation