Commit Graph
189 Commits
Author SHA1 Message Date
Michael 59caa19fbe feat: add mobile video generator page with Remotion integration for rendering and publishing. 2026-03-25 11:46:15 +01:00
MichaelandClaude Sonnet 4.6 0f49218f62 fix: embed local images as base64 data URLs for Remotion renderer
Remotion's headless Chromium cannot reliably fetch http://localhost
inside Docker due to network sandboxing. Instead of HTTP URLs, convert
all local /uploads/... files to data:image/...;base64,... before passing
to inputProps. This is reliable in all environments (Docker, dev, CI).

Audio files remain as HTTP URLs since they are loaded via Web Audio API
which has different network handling.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 11:26:04 +01:00
MichaelandClaude Sonnet 4.6 a40a5a500e fix: read logo file from disk before uploading (multer uses diskStorage)
req.file.buffer is undefined with diskStorage — must read the temp file
from req.file.path using fs.readFileSync instead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 11:14:17 +01:00
MichaelandClaude Sonnet 4.6 9681c62ae8 fix: resolve logo URL to absolute before passing to Remotion renderer
Logo stored as relative /uploads/logos/... was resolving to Remotion's
bundle server (port 3000) instead of the app (port 5555).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 11:12:59 +01:00
MichaelandClaude Sonnet 4.6 a638cfba6a fix: use localhost for Remotion image URLs instead of Docker service hostname
Remotion's headless Chromium runs inside the same container as the app,
so it must use http://localhost:PORT to fetch local media files.
The Docker service hostname (socialflow-app) is only reachable from
other containers on the Docker network, not from within the container itself.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 11:07:07 +01:00
MichaelandClaude Sonnet 4.6 abaee384bf fix: resolve relative media URLs to absolute before passing to Remotion renderer
Remotion's headless Chromium cannot load relative /uploads/... paths.
Library images were passed as-is, causing "Error loading image" at render time.
Now resolves them using INTERNAL_APP_URL (Docker) or the request host (dev).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 11:00:30 +01:00
MichaelandClaude Sonnet 4.6 545dfec17f fix: add migration endpoint to convert absolute localhost media URLs to relative
Images uploaded between the local storage switch and the relative URL
fix have http://hostname/uploads/... stored in DB, which is blocked by
CSP. POST /api/media/fix-urls (admin only) updates all affected rows
to use relative /uploads/... paths.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 09:26:43 +01:00
MichaelandClaude Sonnet 4.6 b353fb6ded fix: use relative URLs for local media storage to fix CSP blocking
Media files were stored with absolute http://localhost:5555/... URLs,
which got blocked by the Content Security Policy when the app runs at
https://socialflow.fnancy.fr. Now stores relative /uploads/... paths
and resolves to absolute URLs only when needed by external APIs
(Facebook, FFmpeg internal service).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 08:30:07 +01:00
MichaelandClaude Sonnet 4.6 7733acbc22 feat: Replace external storage with local file storage + auto cleanup
Media is now stored directly on the server disk (no external service).
Files are served via Express static middleware at /uploads/*.

Cleanup rules:
- Videos deleted immediately after successful publish to Facebook/Instagram
- Videos older than 7 days purged daily by cron job
- Images older than 30 days purged daily by cron job

Changes:
- server/services/minio.ts: replaced S3 client with local fs read/write
- server/index.ts: added static serving for /uploads/media, /logos, /stories
- server/services/media-purge.ts: new rules (images 30d, videos 7d)
- server/services/scheduler.ts: delete local videos after successful publish
- docker-compose.yml: add media_uploads, logos_uploads, stories_uploads volumes
- settings UI: removed credentials card, shows local storage info
- package.json: removed googleapis (unneeded)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 07:35:27 +01:00
MichaelandClaude Sonnet 4.6 ba94e7cc7d feat: Add MinIO endpoint/public URL configuration via settings UI
Store endpointUrl and publicUrl in cloudinary_config DB table so
MinIO connection can be fully configured from the app settings
without needing environment variables.

- DB migration: adds endpoint_url and public_url columns
- Schema: adds endpointUrl/publicUrl to cloudinaryConfig table
- MinIO service: reads endpoint from DB (falls back to MINIO_ENDPOINT env)
- buildMinioUrl: accepts optional publicUrl override from DB config
- All routes updated to pass config.publicUrl to buildMinioUrl
- Settings UI (desktop + mobile): adds Endpoint URL and Public URL fields

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 21:19:49 +01:00
MichaelandClaude Sonnet 4.6 e39fa1026d feat: replace Cloudinary with MinIO for all media storage
- Create server/services/minio.ts: S3-compatible service (same interface as
  cloudinaryService) using @aws-sdk/client-s3 and MINIO_ENDPOINT env var
- Replace all cloudinaryService imports with minioService across routes.ts,
  routes/reels.ts, routes/remotion.ts, services/media-purge.ts
- Replace Cloudinary logo URL pattern (res.cloudinary.com/...) with
  buildMinioUrl() helper throughout all server routes
- GET /api/cloudinary/config now returns a logoUrl field (full MinIO URL)
  so clients never need to build the URL themselves
- Update settings pages (desktop + mobile): labels changed to MinIO
  (Bucket Name, Access Key, Secret Key)
- Update image-editor.tsx: remove Cloudinary URL transformation, use logoUrl
- Update media-utils.ts: simplify getVideoThumbnailUrl (no URL transforms)
- Add MINIO_ENDPOINT and MINIO_PUBLIC_URL to docker-compose.yml + .env.example
- DB table reuse: cloudinary_config.cloud_name = bucket, api_key = access key,
  api_secret = secret key — no migration needed

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 21:05:37 +01:00
MichaelandClaude Sonnet 4.6 4072f8954f feat: add publication scheduling to Remotion video generator
- New POST /api/remotion/publish endpoint: uploads MP4 to Cloudinary,
  creates post/media records, publishes or schedules per-page as a Reel
- Desktop and mobile pages show page selector + DateTimePicker + description
  after video generation, matching the Reels publication workflow

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 19:36:53 +01:00
MichaelandClaude Sonnet 4.6 32c308c2af fix: use exact MP3 duration for word-timing sync instead of byte estimate
Parses the generated TTS audio file with music-metadata to get the real
duration before computing word timings, eliminating desync between text
overlay and voice playback.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 19:22:28 +01:00
MichaelandClaude Sonnet 4.6 9145bc5941 feat: add logo watermark, ending slide, 25-30s duration, and word-sync text
- Video duration forced to 25-30s (content 22-27s + 3s ending)
- Logo watermark (bottom-right) visible throughout content section
- Ending slide: logo centered + store name with spring animation (3s)
- Text overlay now shows only the active spoken word (true TikTok sync)
- Server fetches logo from Cloudinary config and store name from user's pages
- Player preview also shows logo/storeName via /api/cloudinary/config + /api/pages

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 19:13:07 +01:00
MichaelandClaude Sonnet 4.6 eba9c9da5e fix: resolve music URL 404 and revert Dockerfile to Alpine + gcompat
- Convert relative music track URLs to absolute before passing to Remotion renderer
- Reverts Dockerfile from Debian-slim back to Alpine + gcompat/libc6-compat for lighter image

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 17:13:51 +01:00
Michael abfb958340 deps: Add music-metadata dependency. 2026-03-24 16:55:18 +01:00
Michael 24a1d39e88 feat: Implement Remotion video generation feature, allowing users to combine images with text overlay and text-to-speech. 2026-03-24 16:44:06 +01:00
Michael 4f69a2edda feat: Add Remotion rendering API with TTS and update Dockerfile to use Debian-slim for Remotion's glibc-dependent Chrome headless shell. 2026-03-24 14:18:57 +01:00
Michael fa4e6e3131 feat: Add Remotion video rendering endpoint with image and TTS support, and enhance Dockerfile's Chromium detection logic. 2026-03-24 14:15:07 +01:00
Michael 468e65091f feat: Add Remotion video rendering API with TTS integration and configure Docker to use system Chromium for rendering. 2026-03-24 14:01:13 +01:00
Michael d97c0ed73a feat: Add Remotion video rendering endpoint with image upload, TTS generation, and dynamic word timings. 2026-03-24 13:54:37 +01:00
Michael 297af0ab0d feat: add libcap to Dockerfile and ensure Remotion browser binary is downloaded 2026-03-24 13:49:43 +01:00
Michael b15ba68b78 feat: Add Remotion video rendering endpoint with image uploads, text overlay, and TTS generation. 2026-03-24 13:39:28 +01:00
Michael e472e05a3b feat: Implement Remotion video rendering API with TTS, word timings, and Docker pre-bundling. 2026-03-24 13:33:18 +01:00
Michael d98d43cd06 feat: Add Remotion video generation page and API for image-based videos with text overlay and text-to-speech capabilities. 2026-03-24 13:28:28 +01:00
Michael 1a7cbe6af9 feat: Implement Remotion bundling and rendering scripts. 2026-03-24 13:25:22 +01:00
Michael 526e608077 feat: Implement Remotion video generation with client-side image selection and server-side rendering. 2026-03-24 12:48:53 +01:00
Michael e41c43c1da feat: Implement Remotion video generation with dedicated client UI, components, and server-side rendering. 2026-03-24 12:35:52 +01:00
Michael 3a5acd425c feat: Implement new Reel creation functionality with dedicated mobile and desktop UIs, server-side API routes, and a new FFmpeg processing service. 2026-03-19 14:51:16 +01:00
Michael a01194cc79 fix(cloudinary): correct method name to getCloudinaryConfig across backend 2026-03-04 14:45:38 +01:00
Michael 60c830c88b feat: implement automatic purging of old media and schedule its daily execution via cron. 2026-03-04 14:32:27 +01:00
Michael f6376cb470 Merge branch 'main' of https://github.com/R0m1k3/Socialflow 2026-03-04 14:25:06 +01:00
Michael 82befb2264 feat: Implement analytics, media management, and third-party service configurations with new settings pages. 2026-03-04 14:25:02 +01:00
Michael 4fcc8cf53c feat: Add music search and favorite API routes, and introduce FFmpeg service for Reels. 2026-03-03 12:34:09 +01:00
Michael 4e189e7797 feat: add core API routes for authentication, user management, and file upload handling. 2026-03-02 14:16:19 +01:00
Michael 84d2012929 feat: Implement music search and favorite APIs for Facebook Reels, and configure the internal app URL for the ffmpeg service. 2026-03-02 14:11:18 +01:00
Michael a71c5a278f feat: Initialize the Express server with essential middleware, security, authentication, routing, and service configurations. 2026-03-02 14:06:50 +01:00
Michael 6d16dc9d41 feat: add API routes for Jamendo music search, popular tracks, user favorites, and track details, including a placeholder for AI text generation for Reels. 2026-03-02 13:49:08 +01:00
Michael 7e5c73cad9 feat: establish server API routes for authentication, user management, and media processing. 2026-03-02 13:33:23 +01:00
Michael 94429e86df feat: Initialize the core Express server with security, session management, and service integrations, and add a Docker volume for audio file persistence. 2026-03-02 13:21:05 +01:00
Michael 04373d2881 feat: introduce audio administration, reel generation, and enhanced analytics with new database schema and API routes. 2026-03-02 13:11:37 +01:00
Michael 9e9eb7d1bb feat: implement multi-step reel creation flow with video upload, music selection, text generation, and scheduling. 2026-03-02 12:10:50 +01:00
Michael 0e9622b5eb feat: Implement internal MP3 management and logo overlay functionality for Reels. 2026-03-02 11:33:22 +01:00
Michael 08f82d4080 feat: simplify mobile dashboard & implement reel queue system 2026-02-13 10:32:58 +01:00
Michael dbddf3a74e feat: implement reel improvements (clean text, deletion, mobile TTS) 2026-02-13 10:11:04 +01:00
Michael 3859170d35 fix(analytics): upsert history one data point per day per page, add gte/lt imports 2026-02-12 11:01:43 +01:00
Michael 8b13748f13 fix(analytics): reduce sync to 2x/day, remove frontend polling for cleaner charts 2026-02-12 10:59:17 +01:00
Michael 330c42c6ff feat(analytics): resilient Graph API calls, CRON sync every 6h, polling frontend, engagement+views metrics 2026-02-12 10:51:06 +01:00
Michael 71b47a9b7c fix(migration): resolve SQL syntax error in migrate.ts (extra parenthesis) 2026-02-12 10:38:32 +01:00
Michael e1c6b51e0a feat(reels): add real-time generation progress tracking on dashboard (desktop & mobile) 2026-02-12 10:33:00 +01:00