Commit Graph
94 Commits
Author SHA1 Message Date
Michael 633875e8ec feat(security): implement security fixes - Add AES-256-GCM encryption for Facebook/Instagram tokens - Add helmet for HTTP security headers - Add rate limiting (5 login attempts, 100 req/15min) - Add file upload validation (50MB max, MIME type whitelist) - Secure SQL console endpoint (disabled in production) - Enforce SESSION_SECRET in production 2026-01-07 14:57:36 +01:00
Michael ba618bfe79 feat: Introduce EmojiRenderer service for canvas, enabling text rendering with Twemoji emojis, caching, and wrapping. 2025-12-30 13:03:11 +01:00
Michael 6be8bbf628 feat: add script to reproduce emoji rendering to a PNG image file. 2025-12-04 14:27:48 +01:00
michaelschal 2c2e3822f6 Correctly display the Euro symbol with product prices
Fix an issue where the Euro symbol was misplaced when saving product images, ensuring it appears after the price consistently.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: e8c912ba-b86c-4da3-954c-070906550761
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/ltYxoh9
2025-11-22 11:13:41 +00:00
michaelschal 6898a0fca9 Improve text rendering by handling long words and centering text
Update emoji rendering to correctly handle long words and center text, and adjust the client-side preview to remove hashtags instead of emojis.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: 1a295c79-6a41-4cf1-94cd-94aa3c4f96e6
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/JcM96XE
2025-11-21 06:10:39 +00:00
michaelschal 3936220a94 Add support for rendering emojis in stories and remove hashtags
Install twemoji-parser and node-fetch, create a new EmojiRenderer service for handling emoji rendering on canvas using Twemoji, and update the text processing logic to remove hashtags instead of emojis in shared/emoji.ts.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: ff08c9a2-11f7-4c75-8c8f-f60e79069dce
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/C5fWcTz
2025-11-21 06:04:46 +00:00
michaelschal 3d26473967 Update token expiration calculation to 60 days for managed pages
Adjusted the token expiration calculation from 90 days to 60 days in server/routes.ts for both new page registrations and access token updates.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 8f8a8bbf-c2e3-4e22-b512-22aeb9e46ecf
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/C5fWcTz
2025-11-18 19:05:33 +00:00
michaelschal 1bdb7445c3 Improve emoji handling and text display in previews and generated images
Refactor emoji removal logic into a shared utility and update dependencies.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: 59d8c635-691c-42a3-b368-902e8f16eeee
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/Q6FJ7Lw
2025-11-18 13:45:07 +00:00
michaelschal 5053cca73e Improve text rendering on images by removing emojis and handling long words
Add emoji removal from text before rendering on images. Implement logic to break long words that exceed the maximum text width.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: d948b4ab-8a36-4043-aed1-fc4629c72817
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/N0tTJcl
2025-11-18 13:37:44 +00:00
michaelschal 20c0866fe8 Add Facebook video compatibility for automatic post scheduling
Transform video URLs to ensure they are compatible with Facebook's requirements (H.264, AAC, MP4) by applying Cloudinary transformations.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: 33011479-5eb2-4750-8cfe-77cac0f51d8e
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/L05E01m
2025-11-18 12:56:21 +00:00
michaelschal c15cc72cd1 Update logo sizing to allow larger logos on images
Modify client-side and server-side logic to adjust logo size constraints, ensuring logos adhere to a maximum percentage of image dimensions and incorporate padding for better placement.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: aee6d999-ad55-471c-8c9a-6033843f313e
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/L05E01m
2025-11-18 09:27:20 +00:00
michaelschal 225e4f2292 Add ability to upload and apply custom logos to social media posts
Implement functionality for uploading, applying, and deleting custom logos as overlays on images, along with backend processing and UI updates.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: 91999614-5187-4902-b7a1-bf9e372de9c8
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/JgqpaNl
2025-11-18 08:47:42 +00:00
michaelschal 0b70e00834 Add font support to correctly display text in generated images for social media
Integrate DejaVu Sans font by updating Dockerfile, registering the font in imageProcessor.ts, and referencing it in canvas font styles to resolve text rendering issues on Facebook stories.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: ded0e79e-eb39-4fe2-9aad-3cb0b8722e22
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/EMt8Koz
2025-11-18 07:15:11 +00:00
michaelschal 1f58e88d30 Update token expiration to 90 days and recalculate upon update
Adjusted access token expiration to 90 days in POST and PUT routes, updating shared/schema.ts and client/src/pages/pages.tsx.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 9b68577b-34d3-49be-8a1f-69c8bcb3cdb3
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/5aomXd9
2025-11-17 15:38:55 +00:00
michaelschal c47722134b Add token expiration date to social media pages for managed accounts
Update schema and routes to include a `tokenExpiresAt` field, setting it to 60 days after creation for social media page tokens.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: a818a1ee-3b1a-48f9-9639-24fc156db095
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/5aomXd9
2025-11-17 15:21:27 +00:00
michaelschal 98a507b030 Adjust minimum font size for adaptive text across the application
Update the minimum font size from 24px to 12px in both client-side preview modal and server-side image processing to improve text adaptability.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 26883c03-a1a8-4dda-9695-f2319b42174c
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/5aomXd9
2025-11-17 15:09:53 +00:00
michaelschal b581050eae Add ability to overlay text on images for social media stories
Integrate image processing to add text to story images with dynamic font sizing and text wrapping, and upload generated images to Cloudinary via a new service.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: 4277243d-e609-4ee4-8cbc-3521773fc333
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/f2EnhiB
2025-11-17 14:39:41 +00:00
michaelschal 6014c4e083 Improve security and filtering for scheduled posts across user pages
Adds a `getScheduledPostsByPages` method to storage, enabling efficient filtering of scheduled posts by authorized page IDs. Updates API routes to correctly retrieve posts based on user roles (admin vs. standard user) and accessible pages, enhancing data security and user experience.

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/77tIrOr
2025-10-28 15:20:15 +00:00
michaelschal 718d1535d6 Fix video story posting to Facebook with proper 3-phase upload
Implement the required 3-phase upload process (START, UPLOAD, FINISH) for publishing video stories to Facebook via the Graph API, addressing the "#100 The parameter upload_phase is required" error.

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/VJoXNjs
2025-10-28 12:23:37 +00:00
michaelschal 1c0e24ece7 Fix error display for previously failed but now successful posts
Update schedulerService.publishPost to clear the error field when a post is successfully republished.

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/VDgoPyA
2025-10-14 19:10:26 +00:00
michaelschal 82846ab633 Ensure users can only post to pages they have access to
Add access control to the posting route in server/routes.ts to verify user permissions against specified pageIds, preventing unauthorized 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/tWDOGLP
2025-10-14 14:11:16 +00:00
michaelschal f2672727b8 Allow all users to generate AI text for posts
Change API endpoint `/api/ai/generate` from `requireAdmin` to `requireAuth` middleware and update OpenRouterService to use shared admin configuration instead of per-user config.

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/tWDOGLP
2025-10-14 13:58:28 +00:00
michaelschal 3175ffee31 Allow users to upload photos using shared Cloudinary configuration
Update routes to use a shared Cloudinary configuration for media uploads and adjust CloudinaryService to fetch any available config instead of user-specific config.

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/vZocxw2
2025-10-14 10:26:14 +00:00
michaelschal f98da13491 Allow users to upload photos using an admin's Cloudinary configuration
Update Cloudinary configuration retrieval to use an admin's settings for all users and modify media upload to utilize the admin's user ID.

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/vZocxw2
2025-10-14 10:18:31 +00:00
michaelschal b1dc815954 Add ability to post videos to Facebook feeds and stories
Adds support for publishing video content to Facebook feeds and stories via new API endpoints and service methods, addressing issues with video previews and direct video uploads.

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/s8IyLQK
2025-10-13 12:05:51 +00:00
michaelschal 5c591899a1 Enable sending multiple photos as individual stories on Facebook
Update FacebookService to publish each media item in mediaList as a separate story, returning a comma-separated string of story IDs.

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/mIWJXC9
2025-10-13 05:32:33 +00:00
michaelschal dd43753d6d Update image editor to display currency symbol correctly after price
Remove ribbon generation functionality and adjust currency symbol placement in image editor.

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/mIWJXC9
2025-10-11 11:33:30 +00:00
michaelschal bf07167663 Update how image URLs are stored to preserve edits
Adjust image URL storage to consistently use the original URL for all formats when edited images with overlays are present.

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/Hpj2VzR
2025-10-11 09:54:10 +00:00
michaelschal 523412bce4 Update ribbon overlay to position text accurately at all corners
Refactor ribbon overlay positioning logic in `routes.ts` to use specific polygon and text coordinates for improved accuracy across all four corners (north_west, north_east, south_west, south_east).

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/Hpj2VzR
2025-10-11 09:51:02 +00:00
michaelschal 773ca663f9 Add ability to apply image overlays on the server
Introduces a new POST endpoint `/api/media/apply-overlays` that uses Sharp to apply customizable ribbon and price badge overlays to images server-side.

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/Hpj2VzR
2025-10-11 09:41:32 +00:00
michaelschal 1079085c33 Improve image processing with additional logging for debugging
Add console logs for imageUrl, ribbon, and priceBadge to server/routes.ts to aid in debugging image processing.

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/Hpj2VzR
2025-10-11 09:34:08 +00:00
michaelschal 83dbd98c8e Process image edits server-side for consistent results
Refactor client-side image editing to server-side processing using Sharp for applying overlays and text, ensuring consistency between the editor preview and saved image.

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/Hpj2VzR
2025-10-11 09:31:14 +00:00
michaelschal d8d691e95b Improve media upload process with enhanced logging and error handling
Add console logs for receiving and processing edited image uploads, Cloudinary configuration checks, and database saving. Update error handling for Cloudinary uploads and database saving.

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/VEZwUqa
2025-10-11 09:12:49 +00:00
michaelschal b764cdfc48 Add ability to save edited images with overlays to the media library
Implement a new endpoint for uploading edited images, converting them to a JPEG blob using html2canvas, and storing them in Cloudinary.

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/VEZwUqa
2025-10-11 09:10:37 +00:00
michaelschal 0d6e9b0832 Add a feature to generate and apply corner ribbons to images
Introduce a new API endpoint and service for generating triangular ribbon overlays with text using Cloudinary, and integrate this into the image editor.

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/VEZwUqa
2025-10-11 08:55:19 +00:00
michaelschal f062e396ee Fix Facebook story posting by implementing a two-step upload process
Update `FacebookService.publishStory` to first upload the photo as unpublished to obtain a `photo_id`, and then use this `photo_id` to publish the story. This addresses the issue where stories were not being posted correctly.

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/d2GBAIk
2025-10-11 06:45:34 +00:00
michaelschal 4127f9fc55 Improve post preview visibility for different user roles
Update the post preview logic in `server/routes.ts` to allow admins and post owners to see previews, while also enabling standard users to see posts from pages assigned to them.

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/1VOBLTw
2025-10-10 10:20:59 +00:00
michaelschal f21e7e5f18 Show all scheduled posts for accessible pages to users
Update scheduled post retrieval logic to fetch posts from all users and then filter by accessible pages, resolving an issue where users could not see posts created by the admin.

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/1VOBLTw
2025-10-10 09:42:28 +00:00
michaelschal b1a142e45c Enforce page selection for scheduled posts to prevent errors
Add validation to ensure scheduled posts are associated with at least one page, returning a 400 error if not.

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/1VOBLTw
2025-10-10 09:23:00 +00:00
michaelschal d32b5ca306 Update post scheduling to synchronize with the posts table
Synchronize scheduled post's `scheduledFor` field with the database when updating post schedule in server/routes.ts.

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/1VOBLTw
2025-10-10 09:11:27 +00:00
michaelschal 73fe39bfbd Allow users to select from assigned pages and manage their posts
Modify routes to differentiate admin and user permissions for fetching, deleting, and updating scheduled posts. Admins can access all data, while regular users can only manage posts associated with their assigned pages.

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/G1P4XGr
2025-10-10 08:47:23 +00:00
michaelschal f291fc000b Restrict AI features to administrators only for improved control
Update routes and sidebar to enforce admin-only access for AI features, including model retrieval, text generation, and history viewing.

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/G1P4XGr
2025-10-10 06:11:41 +00:00
michaelschal 97b1a76270 Fetch and display all available AI models from OpenRouter's API
Integrate OpenRouter API to dynamically fetch and display available AI models in the client, and update the AI generation endpoint to accept a model override.

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/h6F2mtY
2025-10-09 18:39:18 +00:00
michaelschal 27b4f32e62 Fix dashboard count for scheduled posts and improve AI text display
Correctly set the status of scheduled posts to "scheduled" instead of "draft" and update the dashboard count. Also, reposition AI text variations for a better user workflow.

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/vX672i1
2025-10-09 14:18:04 +00:00
michaelschal 4e32e97fe4 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
2025-10-09 11:31:21 +00:00
michaelschal 446459e2b7 Update image formatting for social media posts
Adjust Cloudinary transformations for Facebook and Instagram posts, optimizing aspect ratios and cropping for different platforms.

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/d8HozM2
2025-10-09 10:14:51 +00:00
michaelschal 81d721e339 Improve social media posting with enhanced photo and carousel support
Update Facebook Graph API integration to support multi-photo carousels and refine Instagram Graph API implementation for single media posts, while also removing debug logging from the posts API route.

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/hAPGvGl
2025-10-09 09:36:25 +00:00
michaelschal 7a13b67876 Add logging for post creation and media insertion to aid debugging
Add console logs to server/routes.ts for POST /api/posts endpoint to capture received mediaIds and inserted post_media values.

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/hAPGvGl
2025-10-09 09:34:28 +00:00
michaelschal 168e9bf58d Improve Facebook post publishing to support multiple images and stories
Update FacebookService to handle multi-photo carousel posts and refine story publishing logic; modify SchedulerService to pass all media for a post.

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/hAPGvGl
2025-10-09 09:21:29 +00:00
michaelschal db67f4d039 Allow users to edit and preview their posts before publishing
Add API endpoints to fetch, update post content, and manage associated media for 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/ER8Naji
2025-10-09 08:21:47 +00:00