Skip to content

Posts Page Architecture

This document is AI context for the current posts experience in apps/frontend.

Source Files

  • Route wrapper: apps/frontend/src/routes/posts/SocialPostsRoute.tsx
  • Feature page: apps/frontend/src/features/posts/components/PostsPage.tsx
  • Tests: apps/frontend/src/features/posts/components/PostsPage.test.tsx

Layout Model

PostsPage renders a two-column layout on desktop:

  • left: queue/search/filter/list
  • right: editor (content, platforms, mode, schedule)

Primary UX goals:

  • clear selected state
  • explicit save/update controls
  • manual posting first

Data Flow

Backend mode (signed-in):

  • reads posts via /api/social-posts
  • creates/updates/deletes via /api/social-posts endpoints
  • schedules via /api/social-posts/batch-schedule
  • records manual publish events via /api/social-posts/:id/manual-record

Fallback mode (no auth_token):

  • uses local seed posts
  • does not persist across reload
  • displays local/demo notice

Manual Posting

Manual post actions open platform compose URLs, then optionally call manual-record endpoint.

Supported platform intents:

  • LinkedIn
  • X/Twitter
  • Instagram (open app/site target)
  • Facebook

Direct auto-publish for social platforms is tracked separately as future rollout work (#210).

Guardrails for AI Agents

  • Treat /posts as canonical route, not /social-posts-v2.
  • Keep mapping helpers aligned with backend enum/status changes.
  • Preserve dirty-state behavior (baseline vs editor state) when editing save logic.
  • Update client + internal docs in same PR when post workflow behavior changes.

TendSocial Documentation