feat: Add MicroDAO Dashboard with activity feed and statistics

- Add microdao_activity table for news/updates/events
- Add statistics columns to microdaos table
- Implement dashboard API endpoints
- Create UI components (HeaderCard, ActivitySection, TeamSection)
- Add seed data for DAARION DAO
- Update backend models and repositories
- Add frontend types and API client
This commit is contained in:
Apple
2025-12-02 06:37:16 -08:00
parent 95c9a17a7a
commit ace183e136
15 changed files with 686 additions and 9 deletions

View File

@@ -0,0 +1,14 @@
-- 045_microdao_stats.sql
-- Migration: Add statistics columns to microdaos table
ALTER TABLE microdaos
ADD COLUMN IF NOT EXISTS citizens_count INTEGER NOT NULL DEFAULT 0,
ADD COLUMN IF NOT EXISTS rooms_count INTEGER NOT NULL DEFAULT 0,
ADD COLUMN IF NOT EXISTS agents_count INTEGER NOT NULL DEFAULT 0,
ADD COLUMN IF NOT EXISTS last_update_at TIMESTAMPTZ;
COMMENT ON COLUMN microdaos.citizens_count IS 'Cached count of citizens (public agents) linked to this MicroDAO';
COMMENT ON COLUMN microdaos.rooms_count IS 'Cached count of rooms belonging to this MicroDAO';
COMMENT ON COLUMN microdaos.agents_count IS 'Cached count of agents (all) linked to this MicroDAO';
COMMENT ON COLUMN microdaos.last_update_at IS 'Last time statistics were updated';