Manual Posting Flow
Overview
The Manual Posting Flow (also known as "Copy & Post") allows users to manually publish content to social platforms and then record that action in TendSocial. This is essential for platforms that do not support automatic API publishing or for users who prefer manual control.
Architecture
Frontend Components
- Promote.tsx: The main campaign/post management interface. It handles the "Copy & Post" action which triggers the
PostingHubModal. - *PostingHubModal: Displays the content to be posted, including text and media assets. It provides "Copy" buttons for easy transfer to social platforms and a "Mark Posted" button to record the action.
API Endpoint
POST /api/social-posts/:id/manual-record
This endpoint is responsible for recording the manual action.
- URL Parameters:
id(UUID of the CompanyPost) - Body:json
{ "platform": "linkedin", // string, e.g., 'linkedin', 'twitter' "status": "POSTED" // string } - Response: The created
ManualPostRecord.
Backend Service
ManualPostService (apps/backend/src/services/social/manualPost.service.ts) handles the business logic:
- Create Record: Creates a
ManualPostRecordentry linked to the post and user. - Update Post Status: Automatically updates the parent
CompanyPoststatus toPUBLISHEDand setspublishedAtto the current time.
Data Model
ManualPostRecord
Tracks the individual manual posting events.
| Field | Type | Description |
|---|---|---|
id | UUID | Unique identifier |
companyId | UUID | Tenant ID |
postId | UUID | ID of the parent CompanyPost |
platform | String | Platform name (e.g., 'linkedin') |
postedBy | UUID | ID of the user who performed the action |
status | String | Status of the action (e.g., 'POSTED') |
postedAt | DateTime | Timestamp of the action (default: now) |
Relationship
- One
CompanyPostcan have multipleManualPostRecordentries (though typically one per platform). - The
CompanyPoststatusreflects the overall state (e.g.,PUBLISHED).
Adding New Platforms
To add a new platform to the manual posting flow:
- Frontend:
- Update
PostingHubModalto render the platform icon and specific requirements (e.g., character limits differ). - Ensure the platform key matches the backend enum/string.
- Update
- Backend:
- Update
platform-mapping.tsif the platform string needs validation. - No strict schema changes are usually required if using string keys, but consistency is key.
- Update
User Guide
- Select Post: In the "Promote" view (
/social-posts), select a post that is ready to be published. - Click "Copy & Post": This button opens the Posting Hub.
- Copy Content: Use the "Copy" buttons to copy text and download media.
- Post to Platform: Open the target social network (e.g., LinkedIn) and paste the content.
- Mark as Posted: Return to TendSocial and click "Mark Posted" for that platform.
- Verification: The post status will update to "Posted" in the dashboard.