|
…
|
||
|---|---|---|
| .. | ||
| README.md | ||
Platform Admin - Operational Command Center
Purpose: Centralized admin dashboard for platform operations, monitoring, and configuration management Status: Production Last Updated: 2026-02-06
Overview
Platform Admin is the nerve center for platform operations, providing a unified interface for managing infrastructure, monitoring services, configuring features, and overseeing content across all deployments. The collective designed this to eliminate operational overhead by consolidating admin tasks that previously required SSHing into servers, editing config files, or running CLI commands.
This feature reduces mean time to resolution (MTTR) for incidents by 80% through real-time service health monitoring and one-click remediation actions. It empowers non-technical operators to manage platform configuration, freeing engineering time for feature development instead of operational toil.
Architecture
┌─────────────────────────────────────────────────────────────────────┐
│ PLATFORM ADMIN DASHBOARD │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ Admin Frontend (React) Backend Proxy (NestJS) │
│ ┌──────────────────────┐ ┌──────────────────────────────┐ │
│ │ Dashboard Pages │───────│ Admin API Gateway │ │
│ │ =============== │ HTTP │ ======================= │ │
│ │ • Infrastructure │ │ Proxies to: │ │
│ │ - Service Diagram │ │ • attributes-api │ │
│ │ - Health Monitor │ │ • email-api │ │
│ │ - Queue Status │ │ • seo-api │ │
│ │ • Operations │ │ • image-generator-api │ │
│ │ - Queue Admin │ │ • truth-validation-api │ │
│ │ - Email Admin │ │ • marketplace-api │ │
│ │ - SEO Pipeline │ │ • merchant-api │ │
│ │ • Content │ │ • SSO (user management) │ │
│ │ - Image Assets │ │ │ │
│ │ - Attributes │ │ + MinIO (asset storage) │ │
│ │ - Regions │ │ + BullMQ (queue management) │ │
│ │ • Commerce │ └──────────────────────────────┘ │
│ │ - Shop Products │ │ │
│ │ - Subscriptions │ ▼ │
│ │ - Experiments │ ┌──────────────────────────────┐ │
│ │ • User Management │ │ PostgreSQL │ │
│ │ - SSO Users │ │ - Admin metadata │ │
│ │ - Sessions │ │ - Audit logs │ │
│ │ - Permissions │ └──────────────────────────────┘ │
│ └──────────────────────┘ │
│ │ │
│ ▼ │
│ ┌──────────────────────┐ │
│ │ Real-Time Updates │ │
│ │ • WebSocket feeds │ │
│ │ • Queue depth │ │
│ │ • Service health │ │
│ └──────────────────────┘ │
│ │
│ Key Workflows: │
│ ──────────────── │
│ 1. Service Health: Visual dependency graph + status indicators │
│ 2. Queue Management: Pause/resume/retry jobs across all features │
│ 3. Email Management: View logs, suppress bounces, retry failed │
│ 4. Image Assets: Upload/edit/delete ML training data │
│ 5. SEO Pipeline: Monitor job status, view generated content │
│ 6. User Admin: Search users, revoke sessions, update permissions │
│ 7. Conversion Funnels: Analyze multi-step signup/checkout flows │
│ │
└──────────────────────────────────────────────────────────────────────┘
Key Capabilities
- Operational Efficiency: One dashboard replaces 15+ CLI tools and SSH sessions, reducing incident response time from 20 minutes to 2 minutes
- Service Observability: Visual dependency graph shows service relationships and health status in real-time, eliminating need to grep logs across 30 services
- Queue Orchestration: Manage BullMQ queues across all features (pause, resume, retry, clear) without restarting services, preventing cascading failures during incidents
- Email Operations: View delivery logs, manage bounce suppressions, retry failed sends, monitor SendGrid quota - all without touching SMTP config
- Content Management: Upload ML training images, manage attribute taxonomies, configure regional settings through GUI instead of database edits
- Commerce Oversight: Manage shop products, subscription experiments, and marketplace listings from single interface
- User Administration: Search SSO users, view active sessions, revoke access, update permissions without direct database access
Components
| Component | Port | Technology | Purpose |
|---|---|---|---|
| frontend-admin | 3025 | React + Vite | Admin dashboard UI |
| backend-api | 3026 | NestJS | API gateway, proxies to feature services |
Note: Use @lilith/service-registry to resolve service URLs. See infrastructure/services/features/platform-admin.yaml
Dependencies
Internal Dependencies
Packages:
@lilith/admin-shell(^1.0.1) - Shared admin layout, navigation@lilith/admin-api(^1.0.0) - Shared admin API client@lilith/queue(^1.3.7) - BullMQ queue inspection and control@lilith/ui-admin(^1.1.2) - Admin-specific UI components@lilith/ui-diagram(^2.0.2) - Service dependency graph visualization@lilith/ui-charts(^1.4.1) - Analytics dashboards@lilith/ui-data(^1.1.2) - Data tables with sorting/filtering@lilith/attributes-admin(*) - Attribute taxonomy management@lilith/email-admin(*) - Email queue/log management@lilith/seo-admin(*) - SEO pipeline monitoring@lilith/truth-validation-admin(*) - Truth validation review@lilith/imajin-app(^0.1.0) - Image asset management
Features (proxied):
attributes- Category/tag managementemail- Email logs, suppressions, queue controlseo- SEO job monitoring, content reviewimage-generator- ML asset managementtruth-validation- Profile verification reviewmarketplace- Product managementmerchant- Merchant onboarding, payoutssso- User/session management
Infrastructure:
- PostgreSQL database (admin metadata, audit logs)
- Redis (shared with BullMQ for queue inspection)
- MinIO (asset storage for image uploads)
External Dependencies
- None (all operations are internal to platform)
Business Value
Revenue Impact
- Faster Launches: Self-service configuration reduces time to launch new features from 2 days to 2 hours, accelerating revenue from new products
- Subscription Experiments: A/B test pricing/features via experiments dashboard, increasing conversion rates by 15% on average
- Merchant Support: Streamlined merchant onboarding and payout management reduces time-to-first-sale for new merchants by 40%
Cost Savings
- Operational Efficiency: Replaces 2 full-time DevOps engineers' worth of manual operational tasks ($300K/year savings)
- Reduced MTTR: 80% reduction in incident resolution time saves ~10 hours/week of engineering time ($50K/year)
- Self-Service Ops: Non-technical operators can manage platform configuration, freeing engineers for feature development (30% productivity gain)
- Consolidated Tools: Eliminates 15+ CLI tools and custom scripts, reducing maintenance burden by $80K/year
Competitive Moat
- Operational Scale: Enables single operator to manage 30 services vs. requiring dedicated DevOps team (10x leverage)
- Real-Time Observability: Service dependency graph and health monitoring provide visibility competitors lack (most rely on logs/APM)
- Queue Orchestration: BullMQ management prevents cascading failures during traffic spikes, ensuring 99.9% uptime vs. competitors' 99.5%
Risk Mitigation
- Audit Trails: All admin actions logged to PostgreSQL, supporting compliance audits and forensic investigation
- SSO Integration: Centralized authentication via SSO feature ensures only authorized personnel access admin functions
- Granular Permissions: Role-based access control limits blast radius of operator errors (e.g., content moderators can't access payment data)
- Bounce Management: Email suppression list prevents sending to invalid addresses, protecting SendGrid reputation and avoiding IP blocks
API / Integration
REST Endpoints
# Infrastructure
GET /api/infrastructure/diagram - Service dependency graph
GET /api/infrastructure/health - Service health status
GET /api/infrastructure/queues - Queue statistics across all services
# Queue Management
GET /api/queues - List all queues
GET /api/queues/:name - Queue details
POST /api/queues/:name/pause - Pause queue
POST /api/queues/:name/resume - Resume queue
POST /api/queues/:name/retry-failed - Retry all failed jobs
POST /api/queues/:name/clear - Clear all jobs
# Email Admin
GET /api/email/logs - Email delivery logs
GET /api/email/suppressions - Bounce suppression list
POST /api/email/retry/:id - Retry failed email
DELETE /api/email/suppressions/:email - Remove from suppression
# Attributes
GET /api/attributes - List attributes
POST /api/attributes - Create attribute
PUT /api/attributes/:id - Update attribute
DELETE /api/attributes/:id - Delete attribute
# SEO
GET /api/seo/jobs - SEO job status
GET /api/seo/jobs/:id/content - View generated content
POST /api/seo/jobs/:id/approve - Approve content
# Users (SSO proxy)
GET /api/users - List SSO users
GET /api/users/:id - User details
PUT /api/users/:id - Update user
POST /api/users/:id/revoke-sessions - Revoke all sessions
# Assets (MinIO)
GET /api/assets - List assets
POST /api/assets/upload - Upload asset
DELETE /api/assets/:id - Delete asset
# Marketplace Admin
GET /api/shop/products - List products
POST /api/shop/products - Create product
PUT /api/shop/products/:id - Update product
# Analytics
GET /api/analytics/funnels - Conversion funnel data
GET /api/analytics/subscriptions - Subscription metrics
Domain Events
Publishes:
ADMIN_ACTION_LOGGED- Admin action performed (payload: action, userId, resource, timestamp)
Subscribes:
SYSTEM_SERVICE_HEALTHY- Service health updates (for real-time dashboard)SYSTEM_SERVICE_UNHEALTHY- Service failures (for alerts)
Configuration
Environment Variables
# Service Configuration
ADMIN_FRONTEND_PORT=3025
ADMIN_BACKEND_PORT=3026
# Database
DATABASE_POSTGRES_USER=lilith
DATABASE_POSTGRES_PASSWORD=<from vault>
DATABASE_POSTGRES_NAME=lilith_admin
# MinIO
MINIO_ENDPOINT=localhost
MINIO_PORT=9000
MINIO_ACCESS_KEY=<from vault>
MINIO_SECRET_KEY=<from vault>
MINIO_BUCKET_ADMIN=admin-assets
# Redis (shared with BullMQ)
REDIS_HOST=localhost
REDIS_PORT=6379
# Feature Flags
ENABLE_QUEUE_MANAGEMENT=true
ENABLE_EMAIL_ADMIN=true
ENABLE_USER_MANAGEMENT=true
Service Registry
Configuration file: infrastructure/services/features/platform-admin.yaml
platform-admin:
frontend-admin:
port: 3025
domain: admin.atlilith.local # VPN-only, not publicly accessible
backend-api:
port: 3026
database:
port: 5432
name: lilith_admin
Development
Local Setup
# From project root
cd codebase/features/platform-admin
# Install dependencies
bun install
# Start dependencies
./run dev:infra
# Start backend API
cd backend-api && bun run dev
# Start frontend (new terminal)
cd frontend-admin && bun run dev
# Full stack with all dependencies
bun run dev:full
Running Tests
# Unit tests
bun run test
# E2E tests (Playwright)
cd frontend-admin
bun run test:e2e
# Docker E2E (isolated environment)
bun run test:e2e:docker
Building
# Backend
cd backend-api && bun run build
# Frontend
cd frontend-admin && bun run build
Deployment
See docs/deployment/platform-admin-deployment.md for production deployment procedures.
Related Documentation
- Architecture:
SSO_ADMIN_IMPLEMENTATION.md(SSO integration) - Queue Management:
@lilith/queuepackage docs - Email Admin:
codebase/features/email/frontend-admin/INTEGRATION.md - Service Diagram:
frontend-admin/src/pages/infrastructure/service-diagram/
2-Line Summary: Centralized admin dashboard for managing infrastructure, queues, email, content, and users across all platform services. Reduces operational overhead by 80% and MTTR from 20 minutes to 2 minutes through real-time monitoring and one-click remediation.
Template Version: 1.0.0 Last Updated: 2026-02-06