From c5aefd03fb790da1b714c1a2c6c740e1d781ed8c Mon Sep 17 00:00:00 2001 From: michaelschal <35957947-michaelschal@users.noreply.replit.com> Date: Thu, 9 Oct 2025 10:56:11 +0000 Subject: [PATCH 1/8] Correct schedule time to ensure posts are published at the intended hour Address an issue where scheduled posts were published two hours later than the intended time by adjusting the timezone offset. Replit-Commit-Author: Agent Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda Replit-Commit-Checkpoint-Type: intermediate_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/8Nctbk0 --- .replit | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.replit b/.replit index 04050d4..d2b4742 100644 --- a/.replit +++ b/.replit @@ -46,10 +46,6 @@ externalPort = 6000 localPort = 43245 externalPort = 3001 -[[ports]] -localPort = 45149 -externalPort = 8000 - [[ports]] localPort = 46681 externalPort = 5173 From a033aa95589b96f31994500c8749d35a4eede8fc Mon Sep 17 00:00:00 2001 From: michaelschal <35957947-michaelschal@users.noreply.replit.com> Date: Thu, 9 Oct 2025 11:01:03 +0000 Subject: [PATCH 2/8] Fix time zone issue when scheduling posts for social media Convert scheduledDate to ISO string format in `new-post.tsx` to ensure correct time zone handling for scheduled posts. Replit-Commit-Author: Agent Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda Replit-Commit-Checkpoint-Type: intermediate_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/8Nctbk0 --- client/src/pages/new-post.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/pages/new-post.tsx b/client/src/pages/new-post.tsx index 35f2d7e..9b3b4db 100644 --- a/client/src/pages/new-post.tsx +++ b/client/src/pages/new-post.tsx @@ -268,7 +268,7 @@ export default function NewPost() { createPostMutation.mutate({ content: postText, - scheduledFor: scheduledDate || undefined, + scheduledFor: scheduledDate ? new Date(scheduledDate).toISOString() : undefined, mediaIds: selectedMedia.length > 0 ? selectedMedia : undefined, pageIds: selectedPages, postType, From 26544ac0b55b0ad17ed14badf2d13aad59ecf0ac Mon Sep 17 00:00:00 2001 From: michaelschal <35957947-michaelschal@users.noreply.replit.com> Date: Thu, 9 Oct 2025 11:01:17 +0000 Subject: [PATCH 3/8] Correct schedule time for posts to prevent time zone discrepancies Fix an issue where scheduled posts were displayed with an incorrect time due to time zone misconfiguration. Replit-Commit-Author: Agent Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/8Nctbk0 From 5f5ad4d41c34943ee1723b03f895e15c068db277 Mon Sep 17 00:00:00 2001 From: michaelschal <35957947-michaelschal@users.noreply.replit.com> Date: Thu, 9 Oct 2025 11:15:49 +0000 Subject: [PATCH 4/8] Transitioned from Plan to Build mode Replit-Commit-Author: Agent Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/8Nctbk0 From 4b1112df3868ef072496f2f5017f639ddd4956be Mon Sep 17 00:00:00 2001 From: michaelschal <35957947-michaelschal@users.noreply.replit.com> Date: Thu, 9 Oct 2025 11:16:51 +0000 Subject: [PATCH 5/8] Add support for landscape image uploads for Facebook feeds Add new `facebookLandscapeUrl` field to the `media` schema to accommodate 1200x630 image uploads for Facebook. Replit-Commit-Author: Agent Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/8Nctbk0 --- shared/schema.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/shared/schema.ts b/shared/schema.ts index 2cb6af9..06a6532 100644 --- a/shared/schema.ts +++ b/shared/schema.ts @@ -55,6 +55,7 @@ export const media = pgTable("media", { type: mediaTypeEnum("type").notNull(), cloudinaryPublicId: text("cloudinary_public_id"), originalUrl: text("original_url").notNull(), + facebookLandscapeUrl: text("facebook_landscape_url"), facebookFeedUrl: text("facebook_feed_url"), instagramFeedUrl: text("instagram_feed_url"), instagramStoryUrl: text("instagram_story_url"), From 23472751acd78321bbcf9eb135e259879af5e4dd Mon Sep 17 00:00:00 2001 From: michaelschal <35957947-michaelschal@users.noreply.replit.com> Date: Thu, 9 Oct 2025 11:29:14 +0000 Subject: [PATCH 6/8] Transitioned from Plan to Build mode Replit-Commit-Author: Agent Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/8Nctbk0 From 4e32e97fe48ca704548e6e1f32c739916e968107 Mon Sep 17 00:00:00 2001 From: michaelschal <35957947-michaelschal@users.noreply.replit.com> Date: Thu, 9 Oct 2025 11:31:21 +0000 Subject: [PATCH 7/8] Update Facebook posting to use original media URLs Modify FacebookService to utilize `media.originalUrl` instead of specific optimized URLs for photo posts, carousel posts, and stories, allowing Facebook to handle cropping and formatting. Replit-Commit-Author: Agent Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda Replit-Commit-Checkpoint-Type: intermediate_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/8Nctbk0 --- server/services/facebook.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/server/services/facebook.ts b/server/services/facebook.ts index 8980d77..b5ed12f 100644 --- a/server/services/facebook.ts +++ b/server/services/facebook.ts @@ -88,8 +88,8 @@ export class FacebookService { } private async publishPhotoPost(post: Post, page: SocialPage, media: Media): Promise { - // Use the Facebook Feed optimized URL (1200x630) - const photoUrl = media.facebookFeedUrl || media.originalUrl; + // Use original URL - Facebook handles the cropping + const photoUrl = media.originalUrl; const params = new URLSearchParams({ access_token: page.accessToken!, @@ -128,7 +128,8 @@ export class FacebookService { const photoIds: string[] = []; for (const media of imageMedia) { - const photoUrl = media.facebookFeedUrl || media.originalUrl; + // Use original URL - Facebook handles the cropping for carousel + const photoUrl = media.originalUrl; if (!photoUrl) { console.warn(`Skipping media ${media.id} - no valid URL found`); @@ -242,7 +243,8 @@ export class FacebookService { } private async schedulePhotoPost(post: Post, page: SocialPage, scheduledTimestamp: number, media: Media): Promise { - const photoUrl = media.facebookFeedUrl || media.originalUrl; + // Use original URL - Facebook handles the cropping + const photoUrl = media.originalUrl; const params = new URLSearchParams({ access_token: page.accessToken!, @@ -268,8 +270,8 @@ export class FacebookService { } private async publishStory(post: Post, page: SocialPage, media: Media): Promise { - // Use vertical format for stories (Instagram Story URL 1080x1920) - const photoUrl = media.instagramStoryUrl || media.originalUrl; + // Use original URL - Facebook handles the story cropping + const photoUrl = media.originalUrl; const params = new URLSearchParams({ access_token: page.accessToken!, From ca0d3c6ff648ae557e4d2877d5e412661d140882 Mon Sep 17 00:00:00 2001 From: michaelschal <35957947-michaelschal@users.noreply.replit.com> Date: Thu, 9 Oct 2025 11:32:12 +0000 Subject: [PATCH 8/8] Update media processing and publishing strategy for social media Refine Cloudinary media processing pipeline and update publishing strategy to use original image URLs for social media posts, while using transformation URLs solely for UI previews. Replit-Commit-Author: Agent Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/AfZNdRv --- .replit | 4 ++++ replit.md | 12 ++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.replit b/.replit index d2b4742..e1a1709 100644 --- a/.replit +++ b/.replit @@ -46,6 +46,10 @@ externalPort = 6000 localPort = 43245 externalPort = 3001 +[[ports]] +localPort = 44509 +externalPort = 8000 + [[ports]] localPort = 46681 externalPort = 5173 diff --git a/replit.md b/replit.md index d067604..f37ed4c 100644 --- a/replit.md +++ b/replit.md @@ -24,12 +24,16 @@ The backend runs on **Node.js** with **Express.js**, fully implemented in **Type ### Media Processing Pipeline -The platform leverages **Cloudinary** for cloud-based image and video storage and transformation. Original files are uploaded to Cloudinary, which then automatically generates transformation URLs for various platform-specific formats: -- **Facebook Feed**: 1080x1080px with intelligent center crop (`crop: fill`) - square format, no borders -- **Instagram Feed**: 1080x1080px with padding (`crop: pad`) - maintains aspect ratio with auto background +The platform leverages **Cloudinary** for cloud-based image and video storage and transformation. Original files are uploaded to Cloudinary and stored in the database. + +**Publishing Strategy**: All publications to Facebook/Instagram use the **original image URL** - the platforms handle cropping and formatting automatically based on the post type (feed/story/carousel). + +**Transformations for Preview Only**: Cloudinary generates transformation URLs for UI preview purposes only: +- **Facebook Landscape**: 1200x630px with intelligent center crop (`crop: fill`) - landscape format +- **Facebook Feed / Instagram Feed**: 1080x1080px with intelligent center crop (`crop: fill`) - square format - **Instagram Story**: 1080x1920px with padding (`crop: pad`) - vertical format -These public IDs and transformation URLs are stored in the database, allowing optimized images to be served via Cloudinary's CDN. +These transformation URLs are stored in the database (`facebookLandscapeUrl`, `facebookFeedUrl`, `instagramFeedUrl`, `instagramStoryUrl`) and displayed in the media library for visual preview, but are NOT used when publishing to social media platforms. ### Authentication & Authorization