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
This commit is contained in:
@@ -27,13 +27,16 @@ nano .env # Configure as needed
|
||||
|
||||
```bash
|
||||
# Database (Docker internal networking)
|
||||
DATABASE_URL=postgresql://mosaic:mosaic@postgres:5432/mosaic
|
||||
DATABASE_URL=postgresql://mosaic:mosaic_dev_password@postgres:5432/mosaic
|
||||
POSTGRES_USER=mosaic
|
||||
POSTGRES_PASSWORD=mosaic_dev_password
|
||||
POSTGRES_DB=mosaic
|
||||
|
||||
# Redis (Docker internal networking)
|
||||
REDIS_URL=redis://valkey:6379
|
||||
# Valkey (Docker internal networking)
|
||||
VALKEY_URL=redis://valkey:6379
|
||||
|
||||
# Application URLs
|
||||
NEXT_PUBLIC_APP_URL=http://localhost:3000
|
||||
NEXT_PUBLIC_API_URL=http://localhost:3001
|
||||
|
||||
# JWT
|
||||
JWT_SECRET=$(openssl rand -base64 32)
|
||||
@@ -42,8 +45,12 @@ JWT_EXPIRATION=24h
|
||||
|
||||
## Step 3: Start Services
|
||||
|
||||
### Option A: Core Services Only (Recommended for Development)
|
||||
|
||||
Start PostgreSQL, Valkey, API, and Web:
|
||||
|
||||
```bash
|
||||
# Start entire stack
|
||||
# Start core stack
|
||||
docker compose up -d
|
||||
|
||||
# View startup logs
|
||||
@@ -53,14 +60,38 @@ docker compose logs -f
|
||||
docker compose ps
|
||||
```
|
||||
|
||||
**Services started:**
|
||||
### Option B: With Optional Services
|
||||
|
||||
| Service | Container | Port | Purpose |
|
||||
|---------|-----------|------|---------|
|
||||
| API | mosaic-api | 3001 | NestJS backend |
|
||||
| Web | mosaic-web | 3000 | Next.js frontend |
|
||||
| PostgreSQL | mosaic-postgres | 5432 | Database |
|
||||
| Valkey | mosaic-valkey | 6379 | Cache |
|
||||
Enable Authentik OIDC and/or Ollama AI:
|
||||
|
||||
```bash
|
||||
# With Authentik only
|
||||
docker compose --profile authentik up -d
|
||||
|
||||
# With Ollama only
|
||||
docker compose --profile ollama up -d
|
||||
|
||||
# With all optional services
|
||||
docker compose --profile full up -d
|
||||
|
||||
# Or set in .env file
|
||||
echo "COMPOSE_PROFILES=full" >> .env
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
**Services available:**
|
||||
|
||||
| Service | Container | Port | Profile | Purpose |
|
||||
|---------|-----------|------|---------|---------|
|
||||
| PostgreSQL | mosaic-postgres | 5432 | core | Database with pgvector |
|
||||
| Valkey | mosaic-valkey | 6379 | core | Redis-compatible cache |
|
||||
| API | mosaic-api | 3001 | core | NestJS backend |
|
||||
| Web | mosaic-web | 3000 | core | Next.js frontend |
|
||||
| Authentik Server | mosaic-authentik-server | 9000, 9443 | authentik | OIDC provider |
|
||||
| Authentik Worker | mosaic-authentik-worker | - | authentik | Background jobs |
|
||||
| Authentik PostgreSQL | mosaic-authentik-postgres | - | authentik | Auth database |
|
||||
| Authentik Redis | mosaic-authentik-redis | - | authentik | Auth cache |
|
||||
| Ollama | mosaic-ollama | 11434 | ollama | LLM service |
|
||||
|
||||
## Step 4: Run Database Migrations
|
||||
|
||||
|
||||
Reference in New Issue
Block a user