Ai-Mee Help Centre
Home
Features
How-To Guides
FAQ
Need Help?
Home
Features
How-To Guides
FAQ
Need Help?

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

PhaseTimelineFocusPrerequisites
Phase 0: Foundation & InfrastructureWeek 1-2Wire GoClaw to Supabase, setup Telegram bot, unify configNone
Phase 1: Agent Team ArchitectureWeek 2-4Define 3-agent team, create skills, register API toolsPhase 0 complete
Phase 2: API ExpansionWeek 3-5New endpoints, database tables, publishing adaptersPhase 1.1-1.2
Phase 3: Conversation & Approval FlowWeek 5-7Telegram onboarding, approval loop, notificationsPhase 1, Phase 2
Phase 4: Proactive IntelligenceWeek 7-9Website monitoring, event calendar, analytics feedbackPhase 3
Phase 5: Dashboard EvolutionWeek 8-10Transform dashboard to admin/analytics panelCan run parallel with Phase 3-4
Phase 6: Production HardeningWeek 10-12Multi-tenancy, security, deployment, testingAll functional phases

Current State

What exists today

LayerStackWhat It Does
API (api/)Fastify + TypeScript + LangChain7 routes for post generation/management
AI Agents (api/src/agents/)LangChain prompt chainsPer-platform content generators
Channels (api/src/channels/)Email template parserHTML analysis and tag replacement
Integrations (api/src/integrations/)Ghost CMS publisherBlog post publishing
Scheduler (api/scheduler/)Bree (stub)Placeholder for auto-generation
Front-end (front-end/)Vue 3 + Vite + Pinia + BulmaDashboard for clients and campaigns
DatabaseSupabase (Postgres)Core tables for customers, campaigns, posts
GoClaw (goclaw/)Go binary, DockerNot yet wired to the platform

What's missing

  1. No Telegram integration — clients use Vue dashboard only
  2. No multi-agent orchestration — single LangChain chains
  3. No brand voice / long-term memory — no pgvector
  4. No proactive content — no website monitoring or event calendar
  5. No analytics feedback loop — data not fed back to LLM
  6. No unified publish endpoint — Ghost only
  7. No media ingestion — no image/document processing
  8. 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:

  1. Enable pgvector in Supabase — one SQL command
  2. Create telegram_client_mapping table — simple migration
  3. Extract Unsplash search into its own endpoint — code exists
  4. Create the GET /client/:id/context endpoint — just a query
  5. Write the three SKILL.md files — no code changes
  6. Set up GoClaw docker-compose overlay — config only

Dependency & Tooling Summary

New npm packages (api/)

  • twitter-api-v2 — Twitter/X publishing
  • cheerio + turndown — URL scraping → Markdown
  • fast-xml-parser — Sitemap/RSS parsing
  • @mailchimp/mailchimp_transactional — Email sending
  • ioredis (optional) — Caching layer

New npm packages (front-end/)

  • apexcharts + vue3-apexcharts — Analytics charts
  • v-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

RiskMitigation
GoClaw agent loopsSet max_tool_iterations: 25, use evaluate_loop
LLM cost explosionGemini Flash for creator/critic, Sonnet for liaison
Telegram rate limitsGoClaw has built-in rate limiting
Social media credentialsUse Supabase Vault, OAuth refresh tokens
Brand voice driftMonthly memory review cron
Client AI confusionClear introduction, show draft status

Getting Started

Begin with Phase 0: Foundation & Infrastructure to wire up GoClaw with Supabase and configure the Telegram bot.