# MarkOps / AI-Driven Marketing Agency — Release QA Checklist

# 1. Settings / integrations

## AI providers
Test at least one real provider end-to-end.

- [x] Save API key.
- [x] Refresh page: key remains stored.
- [x] Generate a content post.
- [x] Generate an image/design.
- [x] Generate ad analysis.
- [x] Generate marketing strategy.
- [x] Generate SEO output.
- [x] Remove/invalid key and confirm a clear error instead of fake success.

Providers present in code:
- [x] DeepSeek
- [x] Groq
- [x] Gemini — **fix model first**
- [x] OpenAI
- [x] Serper search

## Meta OAuth
- [x] Enter Meta App ID + Secret.
- [x] App has correct redirect URI for production domain.
- [x] Click Connect Meta.
- [x] OAuth state validation succeeds.
- [x] Facebook ad account(s) appear.
- [x] Facebook Page(s) appear.
- [x] Linked Instagram Business/Creator account appears.
- [x] Tokens are stored encrypted.
- [x] Disconnect marks only selected account inactive.
- [x] Reconnect works without duplicate corruption.

## X OAuth
- [-] Enter X Client ID/Secret.
- [-] Production callback URL matches developer console.
- [-] Connect X.
- [-] OAuth PKCE callback succeeds.
- [-] Account name/username appears in settings.
- [-] Create a real text post from Content module.
- [-] Verify generated X URL opens the exact post.
- [-] Disconnect/reconnect.

## TikTok
Two distinct systems exist and must not be confused:

### TikTok Ads / Marketing connection
- [-] TikTok App ID/Secret entered.
- [-] OAuth connects advertiser account.
- [-] Advertiser appears in Settings.
- [-] Ad/report read endpoints return real data if the system consumes them.

### TikTok organic publishing
- [-] **Do not accept current implementation as working.** Replace with Content Posting API/user authorization.
- [-] Obtain `video.publish` authorization.
- [-] Query creator info.
- [-] Direct-post a test video.
- [-] Poll publish status.
- [-] Verify actual TikTok post URL/status.

## LinkedIn [x]

## WhatsApp
- [x] Baileys/WhatsApp server URL + secret configured.
- [x] Create WhatsApp account.
- [x] Start session.
- [x] QR appears.
- [x] Scan QR.
- [x] Status becomes connected.
- [x] Refresh page; connected state persists.
- [x] Send test message.
- [x] Receive webhook/message.
- [x] Lead/order attribution works if expected.
- [x] Terminate session.
- [x] Delete account.

---

# 2. Brand Profile

- [x] Open Brand Profile.
- [x] Analyze a real website.
- [x] Verify name, tone, audience, product/service data.
- [x] Edit fields manually.
- [x] Save.
- [x] Refresh and verify persistence.
- [x] Generate content and ensure brand profile influences output.
- [x] Delete profile and confirm clean empty state.
- [x] Invalid/dead URL returns useful validation/error.

---

# 3. Content generation + calendar

## Create content
- [x] Text-only Facebook draft.
- [x] Facebook draft with image.
- [x] Instagram image draft.
- [x] Instagram carousel draft.
- [x] Instagram Reel/video draft.
- [-] X text draft <= 280 chars.
- [-] X > 280 chars produces validation/error.
- [-] TikTok video draft.
- [-] Multi-platform draft.

## AI editing
- [x] Generate text.
- [x] Refine text.
- [x] Generate image.
- [x] Regenerate image.
- [x] Save draft.
- [x] Edit draft.
- [x] Delete draft.

## Scheduling
- [x] Schedule future time.
- [x] Calendar displays exact item/date/time.
- [-] Drag/reschedule or reschedule action persists.
- [x] Scheduler command publishes due post.
- [-] Failed publish remains diagnosable and does not claim success.

## Immediate publishing
- [x] Facebook Page post publishes and URL is valid.
- [x] Facebook image post publishes and URL is valid.
- [x] Instagram image publishes.
- [x] Instagram carousel publishes.
- [x] Instagram Reel publishes after media processing.
- [-] X text post publishes.
- [-] TikTok only after API fix.
- [-] Partial multi-platform failure clearly shows which platform failed.

## Metrics
- [x] Sync Facebook post metrics.
- [x] Sync Instagram metrics.
- [x] Repeated sync does not duplicate data.
- [x] Numbers shown are real API numbers, not estimates.

---

# 4. Content Matrix

- [x] Generate plan/matrix.
- [x] Check all generated slots/cards.
- [x] Generate one post from matrix.
- [x] Generate one image from matrix.
- [x] Open saved plan.
- [x] Refresh; plan persists.
- [x] Delete plan.
- [x] Empty/invalid AI response handled gracefully.

---

# 5. Design Studio

## Social Designs
- [x] Generate design.
- [x] Correct dimensions for chosen platform.
- [x] Refine design.
- [x] Delete design.
- [x] Generated asset URL loads publicly from browser.

## Featured Image
- [x] Generate image.
- [x] Download/open image.
- [x] Error handling for AI/image provider failure.

## Site Banner
- [x] Generate banner.
- [x] Dimensions/aspect ratio correct.
- [x] Asset remains after refresh.

## Logo Design
- [x] Generate logo.
- [x] Multiple prompts produce distinct results.
- [x] Asset persists.

---

# 6. Competitor tools

## Market Competitors
- [x] Generate competitors from real market/brand input.
- [x] Results look grounded, not fabricated.
- [x] Save history.
- [x] Open history item.
- [x] Delete history item.
- [x] Clear history.

## Competitor Analysis
- [x] Search competitor.
- [x] Analyze competitor website/profile.
- [x] Save history.
- [x] Reload history.
- [x] Delete item.
- [x] Invalid URL/domain handling.

---

# 7. Marketing Strategy Wizard

- [x] Create new strategy.
- [x] Complete all wizard steps.
- [x] Save draft.
- [x] Refresh/resume.
- [x] Generate strategy.
- [x] Validate target audience/persona.
- [x] Validate positioning/value proposition.
- [x] Validate funnel.
- [x] Validate content strategy.
- [x] Validate channel plan.
- [x] Validate KPIs/budget.
- [x] Refine a section.
- [x] Approve.
- [x] Advance stage.
- [x] Resync execution data.
- [x] Edit plan.
- [x] Delete plan.

---

# 8. Landing Page Builder

- [x]Generate each relevant template.
- [x] Edit title/content/sections.
- [x] Upload asset.
- [x] Skip asset flow.
- [x] Preview token opens page.
- [x] Save version.
- [x] Modify and restore older version.
- [x] Publish.
- [x] Public slug works in incognito without auth.
- [x] Submit lead form.
- [x] Lead appears in page lead list.
- [x] Update lead status.
- [x] Export leads CSV.
- [x] Track page view/event.
- [x] Analytics counts update.
- [x] Duplicate/invalid slug behavior.
- [x] Delete landing page.

---

# 9. SEO Workspace

- [ ] Save SEO profile.
- [ ] Run site audit.
- [ ] Confirm page-level findings.
- [ ] Generate keywords.
- [ ] Create content brief.
- [ ] Generate article.
- [ ] Edit article content.
- [ ] Update brief status.
- [ ] Delete brief.
- [ ] Invalid URL/network failure handling.

---

# 10. Products

- [x] Create tracked product.
- [x] Required validation.
- [x] Cost/selling price values persist.
- [x] Edit.
- [x] Recalculate profitability.
- [x] Delete.
- [x] Ensure linked orders/content behave correctly when deleting.

---

# 11. Campaign Creatives / Ad Library

- [x] Create creative manually.
- [x] Edit creative.
- [x] Delete creative.
- [x] Link to tracked product.
- [-] CPC calculation verified manually.
- [-] CTR calculation verified manually.
- [-] CPM calculation verified manually.
- [-] CAC calculation verified against confirmed orders.

---

# 12. Ads dashboard / performance monitor

- [-] Empty-state works with brand-new tenant.
- [-] Add known test creative + spend + orders.
- [-] Total spend correct.
- [-] Revenue correct.
- [-] Profit correct.
- [-] ROAS correct.
- [-] Conversion rate correct.
- [-] Platform grouping correct.
- [-] 7 / 30 / 90 day filters behave as documented.
- [-] Page filter isolates selected page.
- [-] AI creative analysis works.
- [-] Fatigue hooks generation works.
- [-] Budget advisor works.
- [x] Draft campaign export to Meta only reports success if every real Meta object exists.
- [-] Pause/kill link has valid signed URL and pauses real ad.
- [-] Reports create/list/delete.
- [-] Printed client report uses only real values.

---

# 13. Leads + customer support

- [ ] Add manual lead.
- [ ] Process raw lead/comment.
- [ ] Extract name/phone/email correctly.
- [ ] Lead list filters/search.
- [ ] Export CSV.
- [ ] Open lead chat.
- [ ] Generate AI reply.
- [ ] Manual reply.
- [ ] Process Facebook/Instagram comment if part of flow.
- [ ] Delete lead.
- [ ] Ensure no lead from another tenant can be opened by changing URL ID.

---

# 14. Live Chat Monitor

- [x] New incoming conversation appears.
- [x] Conversation preview updates.
- [x] Open chat.
- [x] Read existing messages.
- [x] Send reply.
- [x] AI suggested reply if available.
- [x] Refresh retains conversation state.

---

# 15. Orders + attribution

- [x] Create product first.
- [x] Create order manually.
- [x] Link order to lead/product/creative where supported.
- [x] pending → confirmed.
- [x] confirmed → shipped.
- [x] shipped → delivered.
- [-] returned status.
- [-] Revenue changes correctly by status.
- [x] Profit calculation correct.
- [x] Ad CAC/ROAS reflect order changes.
- [x] Recalculate pending orders.
- [x] Edit order.
- [x] Delete order.
- [x] Meta CAPI sends only when properly configured; failure is logged, not hidden.

---

# 16. Social Engagement Worker — Facebook

- [ ] Worker URL/secret configured.
- [ ] Create account profile.
- [ ] Start manual login.
- [ ] noVNC viewer opens.
- [ ] Complete login manually.
- [ ] Continue session.
- [ ] Validate saved session after browser restart.
- [ ] Inspect allowed Facebook post URL.
- [ ] Reject non-Facebook URL.
- [ ] Execute one reaction.
- [ ] Execute one approved comment.
- [ ] Verify action is not auto-retried after uncertain timeout.
- [ ] Stats increment exactly once.
- [ ] Delete worker profile.
- [ ] Reset local Facebook engagement data.

---

# 17. Social Engagement Worker — Instagram

- [ ] Create account.
- [ ] Login/manual intervention.
- [ ] Persist session.
- [ ] Validate session.
- [ ] Inspect Instagram post/reel URL.
- [ ] Like.
- [ ] Comment.
- [ ] Stats.
- [ ] Delete account.
- [ ] Cross-tenant ID tampering returns 403/404.

---

# 18. Social Engagement Worker — TikTok

- [ ] Create account.
- [ ] Login/manual intervention.
- [ ] Persist session.
- [ ] Validate session.
- [ ] Inspect TikTok video URL.
- [ ] Like.
- [ ] Comment.
- [ ] Stats.
- [ ] Delete account.

---

# 19. Social Engagement Worker — X

- [ ] Create account.
- [ ] Login/manual intervention.
- [ ] Persist session.
- [ ] Validate session.
- [ ] Inspect x.com / twitter.com post URL.
- [ ] Like.
- [ ] Reply <= 280 chars.
- [ ] Reject reply > 280.
- [ ] Stats.
- [ ] Delete account.

---

# 20. AI Agents

- [ ] Default agents exist on fresh tenant.
- [ ] Create custom agent.
- [ ] Edit prompt/role/platform.
- [ ] Enable/disable agent.
- [ ] Confirm disabled agent is not selected.
- [ ] Delete agent.
- [ ] Confirm one tenant cannot see another tenant's agents.

---

# 21. Dashboard

- [ ] Fresh-account empty state.
- [ ] Populate orders/content/ads.
- [ ] KPIs update.
- [ ] Date range behavior.
- [ ] Charts render with zero, one, and many records.
- [ ] No division-by-zero/NaN.
- [ ] Links from cards go to correct module.

