Last Updated: 2025-12-28 Phase: 6 - Workflow Orchestration & Hook System (Complete) | Dashboard Phase 5 - Brand Center (Complete) Status: 27 agents (32 files), 73+ commands (118 files), 28+ skills (2,664 files), 6 workflow systems (10 files), 7 hooks active, 8 MCP servers operational, Marketing Dashboard production-ready (32 components, 5 Pinia stores, 6 views, 18+ API endpoints), 142 tests (88% pass rate), security hardened, human-in-the-loop controls enabled
10x Team uses a distributed agent orchestration architecture where a main Claude Code agent coordinates specialized sub-agents for different marketing functions. This design enables parallel execution of independent tasks and sequential chaining for dependent workflows.
┌─────────────────────────────────────────────────────────────┐
│ Main Orchestrator │
│ (Claude Code Agent Runtime) │
│ │
│ Responsibilities: │
│ • User request parsing and routing │
│ • Agent delegation and coordination │
│ • Task result aggregation │
│ • Report generation and storage │
└─────────────────────────┬───────────────────────────────────┘
│
┌─────────────────┼─────────────────┐
│ │ │
▼ ▼ ▼
┌──────────┐ ┌──────────┐ ┌──────────┐
│Copywriter│ │Brainstorm│ │Researcher│
│ │ │ │ │ │
│• Copy │ │• Ideas │ │• Market │
│• Voice │ │• Strategy│ │• Compete │
│• Optimize│ │• Concepts│ │• Trends │
└──────────┘ └──────────┘ └──────────┘
│ │ │
└─────────────────┼─────────────────┘
│
┌─────────────────┼─────────────────┐
│ │ │
▼ ▼ ▼
┌────────────┐ ┌──────────────┐ ┌───────────┐
│Content │ │Campaign │ │Project │
│Reviewer │ │Debugger │ │Manager │
│ │ │ │ │ │
│• Quality │ │• Performance │ │• Progress │
│• Brand │ │• Diagnostics │ │• Roadmap │
│• SEO │ │• Optimization│ │• Reports │
└────────────┘ └──────────────┘ └───────────┘
│ │ │
└─────────────────┼─────────────────┘
│
┌─────────────────┼─────────────────┐
│ │ │
▼ ▼ ▼
┌────────────┐ ┌───────────┐ ┌───────────┐
│Docs Manager│ │Git Manager│ │Journal │
│ │ │ │ │Writer │
│• Docs │ │• Commits │ │• Learnings│
│• Guidelines│ │• PRs │ │• Insights │
│• Playbooks │ │• Branches │ │• Stories │
└────────────┘ └───────────┘ └───────────┘
Main Claude Code Agent
- Role: Central coordinator for all marketing tasks
- Responsibilities:
- Parse user commands and natural language requests
- Route requests to appropriate sub-agents
- Manage parallel and sequential task execution
- Aggregate results and generate reports
- Store reports in
plans/reports/with standardized naming
Communication Pattern:
User Request → Main Agent → Sub-agents → Reports → Aggregation → Output
TOFU (Top of Funnel) Agents
Attraction Specialist Agent (Phase 2)
- Purpose: Lead generation and TOFU content creation
- Model: Claude 3.5 Sonnet
- Input: Target keywords, audience pain points, competitor analysis
- Output: Content strategy, landing pages, lead magnets
- Expertise:
- Keyword research & gap analysis
- Competitor content intelligence
- Landing page generation
- Programmatic SEO templates
- Lead magnet ideation
SEO Specialist Agent (Phase 2)
- Purpose: SEO optimization and keyword strategy
- Model: Claude 3.5 Sonnet
- Input: Content, keywords, competitor URLs
- Output: SEO recommendations, optimized content
- Expertise:
- Keyword research
- On-page optimization
- Technical SEO
- Link strategy
- Content optimization
Lead Qualifier Agent (Phase 2)
- Purpose: Lead scoring and qualification
- Model: Claude 3.5 Haiku (cost-optimized)
- Input: Lead signals, engagement data, behavior patterns
- Output: Lead scores, qualification rules, recommendations
- Expertise:
- Behavioral signal analysis
- Engagement pattern recognition
- Sales readiness prediction
- Next-best-action recommendations
- Lead scoring models
MOFU (Middle of Funnel) Agents
Email Wizard Agent (Phase 2)
- Purpose: Email campaign orchestration
- Model: Claude 3.5 Sonnet
- Input: Campaign goals, audience segments, templates
- Output: Email sequences, subject lines, send schedules
- Expertise:
- Sequence template generation
- Dynamic content personalization
- Send-time optimization
- A/B test design & analysis
- Drip campaign architecture
Sale Enabler Agent (Phase 2)
- Purpose: Sales collateral and deal acceleration
- Model: Claude 3.5 Sonnet
- Input: Product info, customer objections, pricing
- Output: Sales proposals, pitch decks, objection responses
- Expertise:
- Personalized pitch generation
- Objection handling guides
- Social proof matching
- Deal acceleration workflows
- Proposal templates
Funnel Architect Agent (Phase 2)
- Purpose: Funnel design and conversion optimization
- Model: Claude 3.5 Opus (complex reasoning)
- Input: Current funnel data, bottleneck analysis
- Output: Funnel redesigns, optimization roadmaps
- Expertise:
- Funnel stage design
- Conversion rate analysis
- Bottleneck identification
- A/B test recommendations
- Attribution modeling
BOFU (Bottom of Funnel) Agents
Upsell Maximizer Agent (Phase 2)
- Purpose: Cross-sell and upsell strategy
- Model: Claude 3.5 Sonnet
- Input: Customer segments, product portfolio
- Output: Upsell strategies, offer recommendations
- Expertise:
- Upsell opportunity identification
- Offer sequencing (Hormozi model)
- Cross-sell analytics
- Customer lifetime value optimization
- Retention strategy
Continuity Specialist Agent (Phase 2)
- Purpose: Customer retention and engagement
- Model: Claude 3.5 Sonnet
- Input: Customer lifecycle data, retention metrics
- Output: Retention campaigns, engagement plans
- Expertise:
- Churn risk detection patterns
- Re-engagement campaign design
- NPS automation workflows
- Customer health scoring
- Lifecycle stage analysis
Core Content & Optimization Agents
Copywriter Agent
- Purpose: Create compelling marketing copy
- Model: Claude 3.5 Sonnet
- Input: Content briefs, target audience, brand voice guidelines
- Output: Copy drafts, subject lines, CTAs
- Expertise:
- Landing page copy
- Email marketing
- Ad copy
- Product descriptions
- Brand voice consistency
Brainstormer Agent
- Purpose: Generate creative marketing ideas
- Model: Claude 3.5 Sonnet
- Input: Campaign objectives, target market, constraints
- Output: Concept ideas, angles, strategy recommendations
- Expertise:
- Campaign concepts
- Content ideas
- Marketing angles
- Strategy development
- Innovation ideation
Researcher Agent
- Purpose: Market and competitive intelligence
- Model: Claude 3.5 Sonnet
- Input: Market segments, competitors, trends
- Output: Analysis reports, insights, recommendations
- Expertise:
- Competitor analysis
- Market research
- Audience insights
- Industry trends
- Data-driven recommendations
Content Reviewer Agent
- Purpose: Quality assurance for marketing content
- Model: Claude 3.5 Sonnet
- Input: Marketing content (copy, email, landing pages)
- Output: Review reports, improvement suggestions
- Expertise:
- Brand voice validation
- SEO analysis
- Conversion optimization
- Compliance checking
- Quality assessment
Campaign Debugger Agent
- Purpose: Campaign performance diagnostics
- Model: Claude 3.5 Sonnet
- Input: Campaign metrics, performance data, issues
- Output: Diagnostic reports, optimization recommendations
- Expertise:
- Performance analysis
- Bottleneck identification
- A/B test analysis
- Funnel diagnostics
- Optimization strategy
Content Creator Agent (Phase 2)
- Purpose: Multi-format content creation
- Model: Claude 3.5 Sonnet
- Input: Content briefs, formats, channels
- Output: Blog posts, social content, videos, docs
- Expertise:
- Blog content creation
- Social media content
- Video scripts
- Whitepaper generation
- Resource content
Campaign Manager Agent (Phase 2)
- Purpose: Campaign orchestration and management
- Model: Claude 3.5 Sonnet
- Input: Campaign plans, budget, channels
- Output: Campaign timelines, coordination, reporting
- Expertise:
- Campaign planning
- Cross-channel coordination
- Budget management
- Performance tracking
- Campaign optimization
Social Media Manager Agent (Phase 2)
- Purpose: Social media strategy and content
- Model: Claude 3.5 Sonnet
- Input: Brand voice, platforms, audience
- Output: Social strategies, content calendars
- Expertise:
- Platform strategy
- Content calendar creation
- Engagement optimization
- Community management
- Analytics and reporting
Community Manager Agent (Phase 2)
- Purpose: Community engagement and management
- Model: Claude 3.5 Sonnet
- Input: Community data, engagement metrics
- Output: Engagement strategies, member programs
- Expertise:
- Community strategy
- Member programs
- Event planning
- Engagement optimization
- Growth strategies
Planner Agent
- Purpose: Strategic planning and roadmap creation
- Responsibilities: Campaign planning, content strategy, implementation roadmaps
Project Manager Agent
- Purpose: Progress tracking and task management
- Responsibilities: Status reports, milestone tracking, resource allocation
Docs Manager Agent
- Purpose: Documentation and guideline management
- Responsibilities: Update docs, maintain brand guidelines, manage content repos
Git Manager Agent
- Purpose: Version control workflows
- Responsibilities: Clean commits, branch management, PR creation
Journal Writer Agent
- Purpose: Learning and insight documentation
- Responsibilities: Campaign post-mortems, success stories, learnings
Scout Agent
- Purpose: Internal content discovery
- Responsibilities: File finding, pattern matching, codebase navigation
Scout External Agent
- Purpose: External resource exploration
- Responsibilities: Competitor analysis, external codebase exploration
UI/UX Designer Agent
- Purpose: Visual design and interfaces
- Responsibilities: Landing page design, visual hierarchy, design system adherence
MCP Manager Agent
- Purpose: External tool integration
- Responsibilities: Tool discovery, server management, capability analysis
Skills extend agent capabilities through specialized knowledge modules. Each skill can be used by multiple agents.
AI & Content Generation Skills
ai-multimodal- Gemini image/video generation and analysismedia-processing- FFmpeg/ImageMagick video and image editingchrome-devtools- Browser automation and performance analysisdocument-skills- PDF and document processing
Design & UI Skills
ui-styling- Tailwind CSS and shadcn/ui implementationui-ux-pro-max- Advanced design system with 50 stylesfrontend-design- Design patterns and best practicesfrontend-design-pro- Production-ready interfaces
Strategy & Analysis Skills
planning- Solution architecture and implementationresearch- Technical research and discoveryproblem-solving- Systematic problem-solvingsequential-thinking- Logical reasoning and analysis
Integration & Utility Skills
mcp-management- MCP server integrationpayment-integration- Payment gateway integrationrepomix- Codebase analysis and packagingdocs-seeker- Documentation discoveryclaude-code- Claude Code feature referenceskill-creator- Custom skill creation guide
Commands provide user-facing interfaces to agent capabilities through slash commands.
Content Commands
/content/good- Create high-quality content (Copywriter)/content/cro- Optimize for conversions (Content Reviewer)/content/enhance- Improve existing content (Copywriter)
Planning Commands
/plan- Create strategic plans (Planner)/brainstorm- Generate ideas (Brainstormer)
Analysis Commands
/scout- Find files and content (Scout)/ask- Ask questions (Research)/analyze- Analyze data (Researcher)
Utility Commands
/fix- Solve problems (Campaign Debugger)/journal- Document learnings (Journal Writer)/use-mcp- Use external tools (MCP Manager)/ck-help- Display command help (Project Manager)/watzup- Quick status (Project Manager)
Automation triggers that execute at key lifecycle events. Context injection and workflow enforcement hooks provide quality gates and brand compliance.
Session Lifecycle Hooks
session-init.cjs- Initialize session, load project contextsubagent-init.cjs- Inject subagent-specific context on agent startup
Content Quality Hooks (Phase 6)
brand-guidelines-reminder.cjs- Enforce brand guidelines for content agents- Targets: content-creator, copywriter, social-media-manager, email-wizard, sale-enabler
- Injects brand voice, messaging, and visual guidelines into agent context
- Ensures consistent brand representation across all content workflows
Campaign Tracking Hooks (Phase 6)
campaign-tracking.cjs- Monitor campaign metrics and conversions- Targets: campaign-manager, campaign-debugger, social-media-manager, email-wizard, content-creator, analytics-analyst
- Logs campaign execution events and performance metrics
- Provides audit trail for compliance and optimization
Approval Workflow Hooks (Phase 6)
approval-workflow.cjs- Request human approval for publish actions- Targets: All subagents (*) on completion
- Creates approval requests in
plans/approvals/before sensitive actions - Actions requiring approval: publish, send_email, launch_campaign, post_social, go_live, deploy, activate_ads
- Enables human-in-the-loop controls for risk mitigation
Development Standards Hooks
dev-rules-reminder.cjs- Enforce development best practicesscout-block.cjs- Validate file access permissions
Structured workflow definitions enable predictable agent interactions and coordinated multi-agent orchestration across marketing domains.
Marketing Domain Workflows
-
marketing-workflow.md- Campaign planning, execution, and optimization workflows- Campaign lifecycle orchestration
- Multi-channel coordination
- Performance monitoring and adjustment
-
sales-workflow.md- Sales enablement and deal acceleration workflows- Proposal generation and customization
- Objection handling and response
- Sales collateral management
-
campaign-workflow.md- Campaign execution and management workflows- Campaign kickoff and planning
- Cross-team coordination
- Performance tracking and reporting
Content Domain Workflows
-
content-workflow.md- Multi-format content creation workflows- Blog post creation and optimization
- Social media content calendar
- Whitepaper and guide generation
- Brand voice consistency
-
seo-workflow.md- SEO optimization and keyword strategy workflows- Keyword research and gap analysis
- On-page and technical SEO optimization
- Content optimization for search
- Link strategy and authority building
-
analytics-workflow.md- Performance analytics and reporting workflows- Campaign performance analysis
- Funnel diagnostics and optimization
- A/B test design and analysis
- ROI and conversion tracking
System Workflows
primary-workflow.md- Main orchestration and command routingdevelopment-rules.md- Development standards and best practicesorchestration-protocol.md- Agent coordination and communication rulesdocumentation-management.md- Documentation procedures and standards
Report Storage
- Location:
plans/reports/ - Naming:
{agent-name}-{date}-{topic-slug}.md - Example:
copywriter-251209-landing-page-copy.md
Documentation Storage
- Location:
docs/ - Core docs: Overview, catalogs, architecture, guidelines
- Strategic docs: Roadmap, PDR, architecture
Configuration Storage
- Location:
.claude/directory - Agent definitions, skill modules, command definitions
- Workflow specifications, hook automation
User Request: "Create email campaign"
│
├─→ Brainstormer: Generate email concepts
│ → Report: concept-ideas.md
│
├─→ Researcher: Analyze competitor emails
│ → Report: competitor-analysis.md
│
├─→ Copywriter: Write email sequences
│ → Report: email-draft.md
│
└─→ Content Reviewer: Validate quality
→ Report: review-feedback.md
Initial Content
│
├→ Content Reviewer: Analyze quality
│ └→ Issues Found? YES
│ │
│ └→ Copywriter: Revise based on feedback
│ │
│ └→ Content Reviewer: Re-validate
│ └→ Approved? YES → Final Content
Campaign Launched
│
└→ Campaign Debugger: Analyze performance
│
├→ Issues Identified?
│ │
│ └→ Recommends changes
│ │
│ └→ Copywriter/Content Reviewer: Implement
│ │
│ └→ A/B test results
All agents produce standardized markdown reports:
# [Task Title]
**Date:** YYYY-MM-DD
**Agent:** [agent-name]
**Status:** [Complete/In-Progress/Failed]
## Summary
[Brief overview of findings]
## Findings
[Detailed findings and analysis]
## Recommendations
[Specific recommendations for next steps]
## Artifacts
[Links to generated files or content]When agents need to coordinate:
- Agent A completes task → generates report
- Main orchestrator reviews report
- Orchestrator shares relevant insights with Agent B
- Agent B reads previous report and continues work
- New report references previous work
AI/ML:
- Google Gemini API - Image/video generation and analysis
- Claude 3.5 Sonnet - LLM backbone for all agents
Tools:
- Puppeteer - Browser automation
- FFmpeg - Video processing
- ImageMagick - Image manipulation
- Git - Version control
Future Integrations (Phase 5):
- Google Analytics 4 - Performance analytics
- Google Ads - Advertising platform
- Meta Ads - Social advertising
- SendGrid - Email delivery
- Discord/Slack - Team communication
Independent tasks execute in parallel:
- Multiple agents can run simultaneously
- Reduces total execution time
- Maximizes resource utilization
Dependent tasks execute in sequence:
- Downstream agents receive upstream results
- Ensures data consistency
- Maintains workflow integrity
- Agents use configurable model selection (Opus for complex tasks, Sonnet for standard)
- Skills are shared across agents to reduce duplication
- Reports cached in
plans/reports/for reference
- All API keys stored in
.env(not committed) - Environment variables used for secrets
.gitignoreprevents credential leaks
- Reports stored locally in project
- No automatic upload to external services
- User controls all data distribution
- All agents run within Claude Code sandbox
- File system access through designated directories
- MCP integrations require explicit configuration
- Every agent execution generates a timestamped report
- Reports stored in
plans/reports/for audit trail - Standardized naming enables easy searching
- Project Manager tracks milestone progress
- Journal Writer documents campaign learnings
- Git commits create version history
- Failed tasks trigger diagnostic reports
- Campaign Debugger analyzes performance issues
- Recommendations provided for remediation
- Runs on developer's machine via Claude Code
- All dependencies installed via npm
- Environment configuration via
.envfile
- Commits follow conventional commit format
- PRs created through Git Manager
- Clean history maintained through hooks
- Docs Manager keeps documentation current
- Changes tracked in git history
- Easy rollback if needed
Status: ✅ Complete
- 3 engineer agents (fullstack-developer, tester, database-admin)
- 13 engineer skills (backend, testing, devops, etc.)
- 5 engineer commands (/cook, /code, /bootstrap, /test, /debug)
- Engineer-specific hooks
- Content Reviewer Agent - Marketing content quality assurance
- Campaign Debugger Agent - Campaign performance analytics
- Enhanced Copywriter Agent - Marketing-focused copy generation
- Enhanced Brainstormer Agent - Marketing concept development
- All workflows refocused on marketing context
- Command help updated with marketing examples
- Documentation restructured for marketing focus
Status: ✅ Complete (2025-12-09)
TOFU Agents:
- Attraction Specialist - Lead generation & TOFU content creation
- SEO Specialist - SEO optimization & keyword research
- Lead Qualifier - Lead scoring & behavioral analysis
MOFU Agents:
- Email Wizard - Email campaign orchestration
- Sale Enabler - Sales collateral & deal acceleration
- Funnel Architect - Funnel design & optimization
- Content Creator - Multi-format content creation
BOFU Agents:
- Upsell Maximizer - Cross-sell & upsell strategies
- Continuity Specialist - Customer retention & engagement
Operations Agents:
- Campaign Manager - Campaign orchestration
- Social Media Manager - Social media strategy
- Community Manager - Community engagement
- brainstormer (support) - Brainstorming support
campaigns/directory - Campaign templates and archivescontent/sales/directory - Sales content templatescontent/social/directory - Social media contentreports/directory - Campaign reports and analytics
- Brand Guidelines - Voice, tone, messaging framework
- Design Guidelines - Visual design system, colors, typography
- Updated Agent Catalog - 27 agents with full documentation
- Updated System Architecture - Hormozi framework integration
- Hormozi funnel framework integrated (TOFU/MOFU/BOFU)
- Agent model selection optimized (Haiku, Sonnet, Opus)
- Content organization by channel
- Report generation standardized
- Funnel stage-based agent coordination
- SEO Optimization - Keyword research and content optimization
- Content Marketing - Blog, landing pages, strategy
- Social Media - Multi-platform content
- Email Marketing - Campaign automation
- Analytics - GA4 integration and reporting
- Video Production - Script and video management
- GA4 for analytics
- Google Ads and Meta Ads
- SendGrid for email
- Discord and Slack for collaboration
- Single responsibility per agent
- Clear input/output contracts
- Consistent report format
- Error resilience
- Focused functionality per skill
- Reusable across agents
- Well-documented with examples
- Tested before deployment
- Sequential for dependent tasks
- Parallel for independent tasks
- Feedback loops for iteration
- Clear handoff protocols
- Always in sync with code
- Examples for all features
- Regular review and updates
- Version history maintained
Status: ✅ Complete (2025-12-23)
The Marketing Dashboard API Layer provides a REST interface for campaign and content management with AI integration. Built on Hono framework + better-sqlite3, designed to support the Vue.js frontend.
Frontend (Vue.js)
│
└─→ [CORS Middleware]
│
├─→ [API Key Auth]
│
├─→ Routes Layer
│ ├─ /api/campaigns (Campaign CRUD)
│ ├─ /api/content (Content CRUD)
│ ├─ /api/assets (Asset Management + Scanner)
│ └─ /api/ai (AI Enhancement)
│
└─→ Database Layer
└─ SQLite (marketing.db)
├─ campaigns table
├─ content table
├─ assets table
└─ automations table
1. Campaigns API (/api/campaigns)
- CRUD operations for campaign management
- Validation: name (required), status (draft|active|completed)
- Data: goal, start_date, end_date, brand_context, notes
- Tests: 23 passing
2. Content API (/api/content)
- CRUD with type/status filtering
- Types: blog | social | email | landing | other
- Statuses: draft | review | published
- Queryable by: campaign_id, type, status
- Tests: 29 passing
3. Assets API (/api/assets)
- Asset management + Content Hub scanner integration
- Live scan of assets folder with DB merge
- File serving with 6-layer path traversal protection
- Asset rescanning and database synchronization
- Tests: 24 passing (security: 21 passing)
4. AI API (/api/ai)
- Claude Code CLI bridge for content enhancement
- Status check endpoint for availability
- POST /enhance - Improve existing content
- POST /generate - Create new content
- Brand context injection support
- Tests: 35 passing
Authentication: API Key (X-API-Key header)
- Required in production
- Bypassed in development (SKIP_AUTH=true)
- Returns 401 for missing/invalid keys
Path Traversal Defense (6 Layers):
- URL decoding validation
- Windows backslash normalization
- Null byte filtering
- Symbolic link rejection
- Directory boundary enforcement
- Whitelist path validation
Additional Security:
- CORS restricted to configured origins
- Command injection prevention (Claude CLI sanitization)
- Database: foreign keys enabled, prepared statements
- .gitignore excludes database file
Total Tests: 132 (90% passing)
| Module | Tests | Status |
|---|---|---|
| Campaigns | 23 | ✅ Passing |
| Content | 29 | ✅ Passing |
| Assets | 24 | ✅ Passing |
| AI | 35 | ✅ Passing |
| Security | 21 | ✅ Passing |
campaigns table:
- id (PK), name, status, goal, start_date, end_date
- brand_context (JSON), notes, created_at, updated_at
content table:
- id (PK), campaign_id (FK), type, status, title
- body, metadata (JSON), created_at, updated_at
assets table:
- id (PK), path, type, size, mime
- metadata (JSON), created_at, updated_at
automations table:
- id (PK), name, enabled, configuration (JSON)
- created_at, updated_at
Required:
- PORT (default: 3457)
- NODE_ENV (development/production)
- API_KEY (required in production)
Optional:
- ALLOWED_ORIGINS (default: http://localhost:5173)
- SKIP_AUTH (development only)
- DATABASE_PATH (custom location)
- Framework: Hono 4.0+ (lightweight HTTP server)
- Database: SQLite 3 (better-sqlite3)
- Testing: Vitest + Supertest
- Runtime: Node.js (ES modules)
Frontend:
- Vue.js dashboard consumes API endpoints
- CORS enabled for localhost:5173 (configurable)
- Credentials mode enabled for auth headers
Content Hub Scanner:
- Live asset scanning with
scanner.cjs - DB merge with scanned assets
- Manifest generation
Claude Code CLI:
- AI bridge (
ai-bridge.cjs) integration - Brand context injection (
brand-context.cjs) - Async content enhancement/generation
Standardized error responses:
{
"error": "Error type",
"message": "Human-readable description",
"details": "Technical details (dev mode only)"
}HTTP Status Codes:
- 200/201 - Success
- 400 - Validation failed
- 401 - Unauthorized
- 403 - Forbidden (security violation)
- 404 - Not found
- 500 - Server error
Health Endpoint: GET /health
- Returns: status, timestamp, environment
Log Levels:
- INFO: Server startup, request routing
- WARN: Auth bypassed, missing config
- ERROR: Database errors, API failures
Startup Output:
🚀 Marketing Dashboard API
Server: http://localhost:3457
Health: http://localhost:3457/health
Environment: development
CORS: http://localhost:5173
Endpoints:
• /api/campaigns - Campaign CRUD
• /api/content - Content CRUD
• /api/assets - Assets + Scanner
• /api/ai - AI Enhancement
Server implements signal handlers:
- SIGTERM - Graceful shutdown
- SIGINT - Graceful shutdown
- Closes database connections before exit
Full API documentation: docs/marketing-dashboard-api.md
- Complete endpoint reference
- Request/response examples
- Error scenarios
- cURL examples
Status: ✅ Complete (2025-12-23)
The Marketing Dashboard Frontend provides a modern Vue 3 UI for managing campaigns, content, and assets with real-time API connectivity.
Browser (Vue 3)
│
└─→ [Pinia Store Layer]
│
├─→ campaigns.js (Campaign state & actions)
├─→ content.js (Content management)
├─→ assets.js (Asset browser)
└─→ ai.js (AI enhancement pipeline)
│
└─→ [HTTP Client]
│
├─→ [Auth Interceptor - API Key]
│
└─→ REST API Layer (Phase 2)
├─ /api/campaigns
├─ /api/content
├─ /api/assets
└─ /api/ai
Layout Components (3):
AppHeader.vue- Top navigation bar with brandingAppSidebar.vue- Collapsible sidebar navigationAppLayout.vue- Main layout wrapper with responsive grid
Campaign Components (3):
CampaignCard.vue- Campaign card display with meta infoCampaignList.vue- Paginated campaign listingCampaignForm.vue- Campaign creation/editing form
Content Components (3):
ContentCard.vue- Content item previewContentGrid.vue- Grid-based content browserContentEditor.vue- Rich text content editor
Asset Components (3):
AssetCard.vue- Asset preview with metadataAssetGrid.vue- Asset gallery with filtersAssetPreview.vue- Full-screen asset viewer
Common Components (4):
Modal.vue- Reusable modal dialogToast.vue- Notification toastsLoadingSpinner.vue- Loading indicator- Utility components & mixins
campaigns.js
- State: campaigns list, selected campaign, filters
- Actions: fetchCampaigns, createCampaign, updateCampaign, deleteCampaign
- Getters: filteredCampaigns, campaignById
content.js
- State: content library, filters, editor state
- Actions: fetchContent, createContent, updateContent, deleteContent
- Getters: contentByType, contentByCampaign, publishedContent
assets.js
- State: assets list, asset scanner status, metadata
- Actions: scanAssets, filterAssets, updateAssetMetadata
- Getters: assetsByType, assetsByTag
ai.js
- State: enhancement queue, generation status
- Actions: enhanceContent, generateContent, checkStatus
- Getters: queueStatus, completedTasks
DashboardView (/)
- Analytics overview
- Key performance indicators
- Recent activity feed
- Quick actions
CampaignsView (/campaigns)
- Campaign list with filters
- Campaign creation wizard
- Status tracking
- Performance metrics
ContentView (/content)
- Content library browser
- Type-based filtering
- Content editor
- Publishing workflow
AssetsView (/assets)
- Asset gallery
- Asset scanner integration
- Metadata management
- Asset preview
SettingsView (/settings)
- Configuration options
- API key management
- Preferences
- Integration setup
// src/router/index.js
routes: [
{ path: '/', component: DashboardView },
{ path: '/campaigns', component: CampaignsView },
{ path: '/content', component: ContentView },
{ path: '/assets', component: AssetsView },
{ path: '/settings', component: SettingsView }
]| Technology | Version | Purpose |
|---|---|---|
| Vue | 3.5.24 | Frontend framework |
| Pinia | 3.0.4 | State management |
| Vue Router | 4.6.4 | Client-side routing |
| Tailwind CSS | 4.1.18 | Utility-first styling |
| Vite | 7.2.4 | Build tooling |
| @vueuse/core | 14.1.0 | Composition utilities |
Development:
npm run dev # Start vite dev server with HMR
npm run preview # Preview production buildProduction:
npm run build # Build for production
# Output: dist/Bundle Metrics:
- Production bundle: 162.78 kB
- Gzipped size: 53.44 kB
- Build time: 657ms
- Tree-shakable modules
- Lazy-loaded routes
In Pinia Store:
// Example: campaigns.js
async fetchCampaigns() {
const response = await fetch(`${API_URL}/campaigns`, {
headers: { 'X-API-Key': this.apiKey }
})
const data = await response.json()
this.campaigns = data
}In Component:
// Example: CampaignList.vue
import { useCampaignStore } from '@/stores/campaigns'
const campaignStore = useCampaignStore()
await campaignStore.fetchCampaigns()- API key configured in
.env - Auth interceptor adds
X-API-Keyheader - Backend validates token on all requests
- 401 response triggers re-authentication
- Secure credential storage (no localStorage secrets)
Normalized State:
- Campaigns stored as array with ID keys
- Reduce duplicates and consistency issues
- Simple update/delete operations
Action Patterns:
- All API calls in actions
- Error handling with try-catch
- Loading states during requests
Getter Patterns:
- Computed filtering by type/status
- Count aggregations
- Sorted/paginated results
Parent to Child: Props
<CampaignCard :campaign="campaign" :active="isActive" />Child to Parent: Emits
emit('update:campaign', updatedData)Cross-Component: Pinia Store
const store = useStore()
store.updateData(newValue)Tailwind CSS 4.1:
- Utility-first approach
- PostCSS integration
- Custom theme configuration
- Dark mode support (optional)
Component Scoping:
- Scoped styles per component
- Tailwind utilities in templates
- No CSS-in-JS overhead
Planned test coverage:
- Unit tests for components
- Integration tests for stores
- E2E tests for workflows
- Performance benchmarks
- Accessibility testing
Local Development:
- Install dependencies:
npm install - Start dev server:
npm run dev - Opens
http://localhost:5173 - HMR enabled for instant updates
Component Development:
- Create in
src/components/ - Define props and emits
- Use Pinia stores for state
- Style with Tailwind
Store Development:
- Create in
src/stores/ - Define state, actions, getters
- Test API integration
- Document patterns
Files:
.env- Local secrets (not committed).env.example- Template for dev setupsrc/config.js- App configuration
Variables:
// src/config.js
export const API_BASE_URL =
import.meta.env.VITE_API_URL || 'http://localhost:3457'Frontend Security:
- CSP headers configuration
- No sensitive data in localStorage
- API key from environment only
- Input validation on forms
- XSS prevention via Vue auto-escape
API Integration Security:
- HTTPS in production
- API key in request headers
- CORS validation
- Token rotation support
Code Splitting:
- Route-based code splitting
- Lazy-loaded components
- Dynamic imports for heavy modules
Asset Optimization:
- Image lazy-loading
- Webp format support
- Minified production build
- Gzip compression ready
State Optimization:
- Normalized store state
- Computed getters avoid recalculation
- Selective reactivity
- API endpoints tested end-to-end
- Authentication flow validated
- Error handling verified
- Loading states working
- Asset scanner integrated
- Content editor functional
- Campaign creation flow complete
- UI responsive on mobile/tablet
- Accessibility validated
- Performance optimized
- Frontend code:
./.claude/skills/marketing-dashboard/app/src/ - API documentation:
docs/marketing-dashboard-api.md - Component catalog:
./.claude/skills/marketing-dashboard/app/COMPONENTS.md(Phase 4) - State management:
./.claude/skills/marketing-dashboard/app/STORES.md(Phase 4)
Status: ✅ Complete (2025-12-24)
Brand Center View (1):
BrandView.vue- Brand Center dashboard with design system showcases
Brand System Components (6):
ColorPalette.vue- Display brand color tokens with contrast checkerTypographyPreview.vue- Font family and size scale showcaseSpacingScale.vue- Spacing/layout scale visualizationComponentShowcase.vue- Component library preview galleryLogoGallery.vue- Brand logo management with upload capabilityVoiceSummary.vue- Brand voice and tone guidelines
brand.js
- State: design tokens, logos, voice guidelines
- Actions: fetchTokens, fetchLogos, fetchVoice, fetchAll, uploadLogo
- Getters: tokensByCategory, logosByType, voiceData
Brand Center API (/api/brand)
GET /api/brand/tokens- Load design tokens (colors, fonts, spacing)GET /api/brand/voice- Load brand voice guidelinesGET /api/brand/logos- List all brand logos with metadataPOST /api/brand/logos- Upload new logo file with validation
- File upload validation (MIME type, file size 5MB max)
- Filename sanitization (path traversal prevention)
- Design token read-only access
- Logo management with category organization
AppSidebar.vue
- Added Brand Center navigation link
Removed from Dashboard (Phase 5 Refocus):
- Campaign automation recipes
- Blog post generator
- Social media pack generator
- Campaign brief generator
- SEO audit automation
Focus: Reoriented dashboard to Brand Center management, design system showcase, and asset management
Architect: Frontend Engineering Team Last Review: 2025-12-24 (Phase 5 Brand Center Completion) Next Review: Phase 6 Integration & Deployment (Q1 2026)