Admin

Paisley Marketing Hub

Software Requirements Specification v1.0

Software Requirements Specification

Paisley Marketing Hub

Standalone Multi-Brand Content Automation Engine — v1.0

Generated: February 24, 2026 Author: Base44 AI Architect Owner: Paisley Technologies


1. Executive Summary

The Paisley Marketing Hub is a standalone, AI-native content marketing automation platform built to manage the full content lifecycle — ideation, generation, approval, distribution, and analytics — across unlimited brands and industries from a single operator dashboard.

Built for internal use first (Paisley Technologies operator), the system is architected from day one as a multi-tenant, white-label-ready SaaS product. Each brand operates in complete isolation with its own content pipeline, tone profile, platform connections, team members, and analytics. The operator controls whether each brand runs on full automation or manual approval workflows.

The system is not a social media scheduler. It is an intelligent content engine that sources ideas from real audience behavior (comments, search gaps, trends), generates platform-appropriate content in each brand's voice, routes it to the right platforms based on topic and audience — and learns from performance to continuously improve output.


2. System Architecture Overview

OPERATOR LAYER (Paisley Technologies)
├── Global Dashboard — all brands, aggregate analytics, system health
├── Tenant Management — activate multi-tenant when ready
├── Paisley Wallet — fund paid platform campaigns (future)
└── Global Automation Override — pause all brands with one toggle

BRAND LAYER (one per product/company)
├── Brand Profile — name, URL, industry, tone, logo, team
├── Platform Connections — OAuth per platform, stored per brand
├── Content Pipeline — sources → generate → queue → approve → post
├── Analytics — follower growth, site traffic, lead gen (per platform)
└── Team & Permissions — Owner, Editor, Reviewer, Viewer

CONTENT ENGINE (runs per brand)
├── Source Miners (4 engines)
├── AI Generator (tone-aware, dual-tagged)
├── Smart Router (Platform Intelligence DB)
├── Approval Workflow (manual or automated)
└── Publisher (API or Puppeteer fallback)

3. Multi-Brand Management

3.1 Brand Registry

  • Unlimited brands per operator
  • Each brand is fully isolated: content, platforms, team, analytics, tone, approval settings
  • Brand types supported: SaaS, consumer app, financial services, lifestyle, local services, e-commerce, personal brand — any vertical
  • Brand setup wizard: name → URL → industry → tone crawl → platform connect → team invite → go live

3.2 Brand Profile Fields

| Field | Description | |---|---| | Brand Name | Display name | | Website URL | Used for AI tone crawl | | Industry | Primary vertical (used for platform routing) | | Target Audience | B2B, B2C, developer, consumer, investor, etc. | | Content Ratio | % reactive / % trend / % original (default: 50/30/20) | | Approval Mode | Manual or Automated | | Approval Email | Email(s) notified when content queued for review | | Active | Toggle brand on/off without deleting | | Paisley Wallet Balance | For paid platform campaigns (future) |

3.3 Brand Isolation Rules

  • No content, credentials, analytics, or team members bleed between brands
  • Cross-industry content (e.g. "lead generation" article from IntakeFlow brand) uses dual-tagging and distributes to BOTH industry-specific AND topic-specific platforms simultaneously
  • Each brand maintains its own content calendar, queue, and publication history

4. Multi-Tenant Infrastructure

Active at launch in single-operator mode. Full multi-tenant activation via feature flag.

4.1 Tenant Model

  • Tenant = one business/operator (e.g. Paisley Technologies = Tenant 1)
  • Each tenant has: isolated brands, users, billing, analytics, white-label config
  • Tenant onboarding: invite via email → setup wizard → assign plan → go live
  • Tenant admin can manage their own brands, users, and billing independently

4.2 White-Label Configuration (per tenant)

  • Custom logo, color scheme, domain (e.g. marketing.clientbrand.com)
  • Custom email sender name for notifications
  • Remove "Powered by Paisley" option (premium tier)
  • Custom onboarding flow and help text

4.3 Tenant Roles vs Brand Roles

| Level | Roles | |---|---| | Tenant | Tenant Owner, Tenant Admin, Billing Manager | | Brand | Brand Owner, Editor, Reviewer, Viewer |

A user can have different roles across different brands within the same tenant.


5. AI Tone Engine

5.1 Website Crawl & Tone Detection

  • On brand creation, AI fetches and analyzes the brand's website (homepage, about, blog, services pages)
  • Extracts: vocabulary style, sentence length, formality level, audience signals, industry keywords, brand personality descriptors
  • Generates a Tone Profile: stored as structured metadata per brand
  • Example output: { formality: "professional", voice: "authoritative", audience: "small business owners", keywords: ["workflow", "efficiency", "systems"], personality: ["trustworthy", "knowledgeable", "direct"] }

5.2 Tone Application

  • All AI-generated content for a brand passes through tone filter before output
  • Tone reapplied consistently: blog posts, social captions, email subjects, video scripts
  • Manual override: operator can edit tone profile fields at any time
  • Tone refresh: re-crawl website on demand (e.g. after rebrand)

5.3 Per-Platform Tone Adaptation

  • Same brand voice, adapted per platform character limits and norms:
    • LinkedIn: professional long-form
    • X/Twitter: punchy, conversational
    • Reddit: authentic, non-promotional
    • Dev.to / Hashnode: technical, detailed
    • Medium: narrative, readable
    • Email: direct, personal

6. Content Engines (4 Tiers)

6.1 Tier 1 — Reactive Content (Highest Priority)

Trigger: Real audience questions and comments detected

Sources:

  • YouTube video comments (via YouTube Data API)
  • Blog post comments (native or Disqus integration)
  • Reddit threads in brand-relevant subreddits
  • Quora questions in brand's topic tags
  • Direct customer emails/support tickets (manual input or API)

Process:

  1. Miner runs on schedule (daily by default)
  2. AI clusters similar questions/themes
  3. Generates ranked list of article ideas with estimated search demand
  4. Top ideas auto-drafted or queued for operator review (based on brand approval setting)
  5. Published article links back to the comment/question source where appropriate

Output formats: Long-form blog, Q&A post, FAQ page update, social thread


6.2 Tier 2 — Search Gap / AEO Content

Trigger: Unanswered or weakly-answered questions in brand's niche

Sources:

  • Google People Also Ask (scraped)
  • Answer The Public API
  • Reddit "unanswered" threads
  • Quora questions with low/no upvoted answers
  • Competitor content gap analysis (what they rank for that you don't)

Process:

  1. Scanner runs weekly per brand
  2. AI scores gaps by: search volume estimate, answer quality of existing results, brand relevance
  3. Generates authoritative, structured answers formatted for:
    • Google SGE (AI Overview) indexing
    • Perplexity AI citations
    • ChatGPT knowledge base pickup
  4. Output includes structured data markup recommendations (FAQ schema, HowTo schema)

Output formats: Authoritative answer article, FAQ cluster, How-To guide


6.3 Tier 3 — Trend-Driven Content

Trigger: Topic trending in brand's industry

Sources:

  • Google Trends API (brand keyword categories)
  • Reddit rising posts in relevant subreddits
  • LinkedIn trending topics (monitored via search)
  • X/Twitter trending hashtags in niche
  • BuzzSumo-style monitoring (keyword-based)

Process:

  1. Monitor runs every 6 hours
  2. AI evaluates trend relevance score against brand's industry + audience tags
  3. High-relevance trends (score > 70%) trigger draft generation automatically
  4. Content marked with expiry date — deprioritized after trend window closes

Output formats: Opinion piece, news commentary, hot-take social thread, LinkedIn article


6.4 Tier 4 — Original / Planned Content

Trigger: Content calendar gap, no Tier 1/2/3 content available, or scheduled thought leadership

Process:

  1. AI analyzes what topics have NOT been covered in the last 30/60/90 days
  2. Generates original idea suggestions based on brand's industry, audience, and past performance
  3. Operator can also manually input a content prompt or idea
  4. Fills gaps to maintain publishing cadence (configurable: daily / 3x week / weekly)

Output formats: Any — determined by content calendar slot


6.5 Content Ratio Engine

  • Operator sets ratio per brand (default: 50% reactive / 30% trend / 20% original)
  • System respects ratio when building the weekly content queue
  • If Tier 1 content is scarce, Tier 3/4 backfills automatically
  • Ratio performance tracked in analytics (which tier drives most engagement)

7. YouTube Repurposing Engine

7.1 Input

  • Connect YouTube channel via YouTube Data API (OAuth, per brand)
  • System ingests: transcript, title, description, comments, view count, engagement rate
  • Manual upload: paste YouTube URL to trigger repurpose

7.2 Output Per Video (auto-generated)

| Asset | Description | |---|---| | Blog Post | Full SEO-optimized article from transcript | | Social Snippets | 5 platform-appropriate posts (LinkedIn, X, Facebook, IG caption, Reddit) | | Email Newsletter | Introductory campaign email with video embed link | | Short-form Script | 60-second hook + CTA script for Reels/TikTok/Shorts | | Comment Mining | All comments fed into Tier 1 Reactive engine |

7.3 Repurpose Queue

  • New videos auto-detected and queued within 1 hour of publish
  • Manual repurpose available for existing video library
  • Operator can bulk-process entire channel history on brand setup

8. Platform Intelligence Database

8.1 Platform Registry Structure

Each platform record contains:

Platform ID, Name, URL
├── Industries: [list of applicable verticals]
├── Audience Types: [B2B, B2C, developer, investor, consumer, etc.]
├── Topic Tags: [topics this platform is best for]
├── Content Formats: [article, link, discussion, image, video]
├── Tone: [professional, casual, technical, authentic]
├── API Available: true/false
├── Puppeteer Fallback: true/false
├── Free/Paid: free | paid | freemium
├── Requires Human Review: true/false (Reddit = always true)
├── Canonical URL Supported: true/false
└── Notes: posting rules, restrictions, best practices

8.2 Default Platform List at Launch

| Platform | Best For | API | Notes | |---|---|---|---| | LinkedIn | B2B, SaaS, finance, professional | Yes | OAuth required | | Medium | General business, tech, lifestyle | Yes | Canonical URL supported | | Substack | Newsletter audience building | Yes | Email subscriber sync | | Dev.to | Developers, tech products | Yes | Canonical URL supported | | Hashnode | Developers, technical blogs | Yes | Custom domain mapping | | Google Business | Local services, all businesses | Yes | Post limit: 1/week | | Facebook Pages | Consumer, local, lifestyle | Yes | OAuth required | | X / Twitter | Real-time, all verticals | Yes | OAuth required | | Reddit | All verticals | Partial | ALWAYS human review | | Quora | Q&A, all verticals | No | Puppeteer | | Pinterest | Lifestyle, dating, visual brands | Yes | OAuth required | | BiggerPockets | Real estate, finance | No | Puppeteer | | Nextdoor | Local services | No | Puppeteer | | Craigslist | Local services, classifieds | No | Puppeteer | | Hacker News | Tech, SaaS, startups | No | Human review |

8.3 Smart Routing Logic

  1. Content is tagged: Industry + Audience + Topic + Format + Tone
  2. Router queries Platform DB: match topic tags + audience tags (not just industry)
  3. Returns ranked list of applicable platforms
  4. Applies brand's active platform connections filter
  5. Schedules posts — respects platform rate limits and best-time-to-post windows
  6. Human-review platforms (Reddit, HN) placed in separate approval queue always

8.4 Custom Platform Addition

  • Operator can add any platform manually with custom metadata
  • Puppeteer automation available for any non-API platform
  • Custom platforms inherit smart routing once tagged properly

9. Blog Cross-Posting Engine

9.1 Publish Once → Distribute Many

  • Primary publish target: brand's own blog (IntakeFlow M11 or external CMS)
  • Auto-distribute to: Medium, LinkedIn Articles, Substack, Dev.to, Hashnode
  • Canonical URL set on ALL cross-posts pointing back to brand's site
  • Prevents Google duplicate content penalty

9.2 Cross-Post Scheduling

  • Stagger cross-posts: primary site → 24h → Medium → 48h → LinkedIn → 72h → Dev.to/Hashnode
  • Stagger delay configurable per brand
  • Substack cross-post triggers email send to subscriber list automatically

9.3 Email Subscriber Management

  • Substack integration syncs subscriber count to Marketing Hub
  • Subscriber growth tracked as primary metric for newsletter brands
  • Future: native email list (phase 2)

10. Platform Connections & OAuth

10.1 Setup Flow

  • Brand setup wizard includes platform connection step
  • OAuth flow per platform: connect once, credentials stored securely per brand
  • Token refresh handled automatically — no re-auth unless platform revokes access
  • Connection status dashboard: green (active) / yellow (expiring) / red (revoked)

10.2 Puppeteer Automation Layer

  • For platforms without API (Quora, Craigslist, Nextdoor, BiggerPockets, etc.)
  • Headless browser automation handles posting
  • All Puppeteer-based posts flagged in activity log
  • Recommended: human review before Puppeteer post executes (configurable per platform)
  • Puppeteer sessions run in isolated containers per brand

10.3 Credential Security

  • OAuth tokens encrypted at rest
  • Puppeteer credentials (username/password) stored in encrypted vault per brand
  • No cross-brand credential access

11. Approval & Notification Workflow

11.1 Per-Brand Approval Modes

Manual Approval Mode:

  1. Content generated → placed in "Pending Review" queue
  2. Email notification sent immediately to brand's approval email(s)
  3. Email contains: content preview, target platform, scheduled post time, approve/reject links
  4. Reviewer clicks Approve → scheduled for posting
  5. Reviewer clicks Edit → opens in dashboard editor
  6. Reviewer clicks Reject → content archived with rejection note
  7. If no action within 48h → reminder email sent (configurable)

Automated Mode:

  1. Content generated → scheduled immediately based on content calendar
  2. Posts without human intervention
  3. Activity log records every post with full content snapshot
  4. Operator can review log and retroactively flag/delete posts

11.2 Global Controls

  • Master pause toggle: stops ALL automation across ALL brands instantly
  • Per-brand pause: suspend one brand without affecting others
  • Emergency delete: remove a post from platform directly via API (where supported)

12. Analytics Dashboard

12.1 Metrics Hierarchy (default — configurable per brand/tenant)

  1. Follower Growth — net new followers per platform, per week/month
  2. Site Traffic — UTM-tracked clicks back to brand site, per platform
  3. Lead Generation — CTA clicks, form fills, tracked conversions

12.2 Dashboard Views

  • Operator View: aggregate across all brands — total posts, total reach, top performing brand
  • Brand View: per-platform breakdown, content tier performance, top posts
  • Content Performance: which tier (reactive/trend/original) drives most engagement
  • Platform ROI: which platforms drive the most traffic and leads per brand

12.3 Feedback Loop

  • High-engagement content → tagged → fed back into Tier 4 idea engine as "proven topics"
  • Low-engagement content types → deprioritized in queue
  • Weekly performance digest email to operator (every Monday)
  • Per-brand performance report available on demand

12.4 Multi-Tenant Analytics

  • Each tenant sees only their own brands' data
  • Tenant Owner gets aggregate view across their brands
  • Operator (Paisley) sees all tenants in master dashboard (anonymized option available)

13. Data Architecture

13.1 Core Entities (always active)

| Entity | Description | |---|---| | Tenant | Top-level account (operator or client) | | Brand | Product/company managed by a tenant | | BrandToneProfile | AI-extracted tone metadata per brand | | PlatformConnection | OAuth token / credentials per brand per platform | | Platform | Platform Intelligence Database record | | ContentItem | Individual piece of content (any format, any status) | | ContentSource | Mined source record (comment, search gap, trend, manual) | | ContentQueue | Scheduled publication queue per brand | | PublicationRecord | Log of every post made, platform, timestamp, result | | AnalyticsSnapshot | Daily metrics snapshot per brand per platform | | TeamMember | User with role, scoped to brand and/or tenant | | ApprovalRequest | Pending review items with email notification log | | PaisleyWalletTransaction | Funding ledger for paid platform campaigns (future) |

13.2 Dormant Entities (built-in, activate when needed)

| Entity | Activates With | |---|---| | EmailSubscriber | Substack integration or native newsletter | | PaidCampaign | Paisley Wallet activation | | PuppeteerSession | Non-API platform connections | | WhiteLabelConfig | Multi-tenant white-label activation | | TenantBilling | Multi-tenant billing activation |


14. Integrations

14.1 Phase 1 (Launch)

| Integration | Purpose | Auth Method | |---|---|---| | YouTube Data API | Video ingestion, comment mining | OAuth | | LinkedIn API | Article posting, analytics | OAuth | | Medium API | Cross-posting | API Token | | Substack | Newsletter + cross-post | OAuth | | Dev.to API | Cross-posting | API Key | | Hashnode API | Cross-posting | API Key | | Google Business API | Post scheduling | OAuth | | Facebook Graph API | Page posting | OAuth | | X/Twitter API v2 | Tweet scheduling | OAuth | | Pinterest API | Pin scheduling | OAuth | | Google Trends | Trend monitoring | API Key |

14.2 Phase 2 (Post-Launch)

  • Answer The Public API (search gap mining)
  • BuzzSumo API (trend monitoring)
  • Native email list management (Resend or Mailchimp)
  • Stripe (tenant billing)
  • Zapier webhook output (custom automation triggers)

14.3 Puppeteer Layer (no API available)

  • Quora, Reddit (fallback), Craigslist, Nextdoor, BiggerPockets, Hacker News

15. User Roles & Permissions

| Role | Scope | Permissions | |---|---|---| | Operator | System-wide | Full access to all tenants, brands, system config | | Tenant Owner | Tenant | Manage all brands, users, billing, white-label | | Tenant Admin | Tenant | Manage brands and users, no billing | | Brand Owner | Brand | Full brand control, team management | | Editor | Brand | Create, edit, submit content for approval | | Reviewer | Brand | Approve/reject/edit queued content | | Viewer | Brand | Read-only access to brand dashboard and analytics |


16. Technical Requirements

16.1 Infrastructure

  • Frontend: React + Tailwind (Base44 platform)
  • Backend: Deno-based serverless functions (Base44 functions)
  • Database: Base44 entities (NoSQL, per-app isolation)
  • Scheduled jobs: Base44 automations engine (minimum 5-min intervals)
  • File storage: Base44 file upload (for media assets)

16.2 Automation Schedules

| Job | Frequency | |---|---| | Reactive comment miner | Daily | | Search gap scanner | Weekly per brand | | Trend monitor | Every 6 hours | | Content queue processor | Every 30 minutes | | Analytics snapshot | Daily at midnight | | Platform token health check | Daily | | Weekly performance digest email | Every Monday 8am | | Approval reminder (no action) | 48h after queue entry |

16.3 External API Keys Required (set in secrets)

  • YOUTUBE_API_KEY
  • LINKEDIN_CLIENT_ID / LINKEDIN_CLIENT_SECRET
  • FACEBOOK_APP_ID / FACEBOOK_APP_SECRET
  • TWITTER_API_KEY / TWITTER_API_SECRET
  • PINTEREST_APP_ID / PINTEREST_APP_SECRET
  • GOOGLE_CLOUD_API_KEY (for Google Business + Trends)
  • MEDIUM_INTEGRATION_TOKEN (per brand, user-provided)
  • DEVTO_API_KEY (per brand, user-provided)
  • HASHNODE_API_KEY (per brand, user-provided)

17. Build Phases

Phase 1 — Core Engine (Build First)

  1. Brand management (create, edit, delete brands)
  2. AI tone crawl engine
  3. Platform Intelligence Database (seed with default platforms)
  4. Content Item entity + manual content creation
  5. Smart router (tag-based platform matching)
  6. Approval workflow (manual mode) + email notifications
  7. Publication queue + activity log
  8. Basic analytics dashboard (follower growth, site traffic)
  9. OAuth connections: LinkedIn, Medium, Substack, Dev.to, Hashnode, Google Business
  10. YouTube repurposing engine (transcript → blog + social snippets)

Phase 2 — Content Mining

  1. YouTube comment miner (Tier 1 Reactive)
  2. Blog comment miner
  3. Search gap scanner (Tier 2 AEO)
  4. Google Trends monitor (Tier 3)
  5. Content ratio engine
  6. Feedback loop (performance → idea engine)

Phase 3 — Scale & Monetize

  1. Multi-tenant activation
  2. White-label configuration
  3. Team member invitations + brand-level permissions
  4. Puppeteer automation layer
  5. Paisley Wallet integration (paid platforms)
  6. Tenant billing (Stripe)
  7. Full analytics suite + weekly digest emails

18. Assumptions & Open Items

| Item | Assumption / Note | |---|---| | Reddit | Always human-review; Puppeteer available but flagged | | Platform API limits | Rate limiting handled per platform; back-off logic required | | YouTube transcript | YouTube auto-captions used if manual transcript not available | | Substack API | Limited API; cross-posting may require Puppeteer fallback | | Answer The Public | Phase 2; search gap phase 1 uses Google PAA scraping | | Paid platforms | Infrastructure built; no spend until Paisley Wallet activated | | Multi-tenant billing | Stripe integration deferred to Phase 3 | | Mobile app | Web-first; PWA layer available via Base44 M17 |


19. Success Metrics (Launch KPIs)

| Metric | Target (90 days post-launch) | |---|---| | Brands onboarded | 3+ (IntakeFlow, lending, dating app) | | Posts published | 100+ per brand | | Follower growth | +500 across all platforms combined | | Site traffic (UTM) | Measurable increase from baseline | | Content queue backlog | < 24h (system generating faster than consuming) | | Approval email open rate | > 80% |


End of SRS — Paisley Marketing Hub v1.0 Next step: Begin Phase 1 build. Start with Brand Management + AI Tone Engine.