Migration: Dashboard-First → Messaging-First AI Marketing Platform
Goal: Transform the current Fastify API + Vue dashboard into a messaging-first platform where GoClaw orchestrates multi-agent teams, Telegram is the primary client interface, and the Cloud Run API handles deterministic execution.
Overview
This migration is organized into 6 phases spanning 10-12 weeks. Each phase builds on the previous one, with some phases running in parallel.
Migration Phases
| Phase | Timeline | Focus | Prerequisites |
|---|---|---|---|
| Phase 0: Foundation & Infrastructure | Week 1-2 | Wire GoClaw to Supabase, setup Telegram bot, unify config | None |
| Phase 1: Agent Team Architecture | Week 2-4 | Define 3-agent team, create skills, register API tools | Phase 0 complete |
| Phase 2: API Expansion | Week 3-5 | New endpoints, database tables, publishing adapters | Phase 1.1-1.2 |
| Phase 3: Conversation & Approval Flow | Week 5-7 | Telegram onboarding, approval loop, notifications | Phase 1, Phase 2 |
| Phase 4: Proactive Intelligence | Week 7-9 | Website monitoring, event calendar, analytics feedback | Phase 3 |
| Phase 5: Dashboard Evolution | Week 8-10 | Transform dashboard to admin/analytics panel | Can run parallel with Phase 3-4 |
| Phase 6: Production Hardening | Week 10-12 | Multi-tenancy, security, deployment, testing | All functional phases |
Current State
What exists today
| Layer | Stack | What It Does |
|---|---|---|
API (api/) | Fastify + TypeScript + LangChain | 7 routes for post generation/management |
AI Agents (api/src/agents/) | LangChain prompt chains | Per-platform content generators |
Channels (api/src/channels/) | Email template parser | HTML analysis and tag replacement |
Integrations (api/src/integrations/) | Ghost CMS publisher | Blog post publishing |
Scheduler (api/scheduler/) | Bree (stub) | Placeholder for auto-generation |
Front-end (front-end/) | Vue 3 + Vite + Pinia + Bulma | Dashboard for clients and campaigns |
| Database | Supabase (Postgres) | Core tables for customers, campaigns, posts |
GoClaw (goclaw/) | Go binary, Docker | Not yet wired to the platform |
What's missing
- No Telegram integration — clients use Vue dashboard only
- No multi-agent orchestration — single LangChain chains
- No brand voice / long-term memory — no pgvector
- No proactive content — no website monitoring or event calendar
- No analytics feedback loop — data not fed back to LLM
- No unified publish endpoint — Ghost only
- No media ingestion — no image/document processing
- GoClaw not connected to Supabase — standalone mode
Dependencies Graph
Phase 0 (Foundation)
├── 0.1 GoClaw + Supabase ─────────────────┐
├── 0.2 Telegram Bot ──────────────────────┐│
└── 0.3 Config unification ────────────────┤│
││
Phase 1 (Agent Team) ◄───────────────────────┘│
├── 1.1 Agent specs ◄───────────────────────┘
├── 1.2 Skill files
├── 1.3 Custom tools ──────┐
└── 1.4 Bindings │
│
Phase 2 (API Expansion) ◄────┘
├── 2.1 New endpoints
├── 2.2 New DB tables
├── 2.3 Content refactor
└── 2.4 Publish adapters ──────────┐
│
Phase 3 (Conversation) ◄──────────────┘
├── 3.1 Onboarding
├── 3.2 Approval loop
└── 3.3 Notifications
│
Phase 4 (Proactive) ◄─────────────────
├── 4.1 Website monitoring
├── 4.2 Event calendar
├── 4.3 Analytics feedback
└── 4.4 Scheduler overhaul
Phase 5 (Dashboard) — parallel with Phase 3-4
├── 5.1 Role change
├── 5.2 New pages
└── 5.3 Real-time updates
Phase 6 (Production) — after all functional phases
├── 6.1 Multi-tenancy
├── 6.2 Security
├── 6.3 Deployment
└── 6.4 Testing
Quick Wins (Can Do Immediately)
These tasks can be started without blocking on other work:
- Enable pgvector in Supabase — one SQL command
- Create
telegram_client_mappingtable — simple migration - Extract Unsplash search into its own endpoint — code exists
- Create the
GET /client/:id/contextendpoint — just a query - Write the three SKILL.md files — no code changes
- Set up GoClaw docker-compose overlay — config only
Dependency & Tooling Summary
New npm packages (api/)
twitter-api-v2— Twitter/X publishingcheerio+turndown— URL scraping → Markdownfast-xml-parser— Sitemap/RSS parsing@mailchimp/mailchimp_transactional— Email sendingioredis(optional) — Caching layer
New npm packages (front-end/)
apexcharts+vue3-apexcharts— Analytics chartsv-calendar— Content calendar view
Remove
bree— Replaced by GoClaw cron system
Infrastructure
- pgvector extension in Supabase
- GoClaw managed mode
- Redis (optional) for caching
- OAuth proxy (optional) for social connections
Risk Register
| Risk | Mitigation |
|---|---|
| GoClaw agent loops | Set max_tool_iterations: 25, use evaluate_loop |
| LLM cost explosion | Gemini Flash for creator/critic, Sonnet for liaison |
| Telegram rate limits | GoClaw has built-in rate limiting |
| Social media credentials | Use Supabase Vault, OAuth refresh tokens |
| Brand voice drift | Monthly memory review cron |
| Client AI confusion | Clear introduction, show draft status |
Getting Started
Begin with Phase 0: Foundation & Infrastructure to wire up GoClaw with Supabase and configure the Telegram bot.