How safa-kaware/socialflow-ai works
SocialFlow is a Telegram content-generation and publishing application. A user creates a draft in the app, reviews or edits it, then approves and publishes it; the app also provides post history, queue, calendar, analytics, automation and settings views. The frontend calls serverless API endpoints for generation, post management and publishing, which share a Supabase client. The workflow files indicate additional generation/review and Telegram-publishing automation. Their internal connections are not established by the excerpts, so those links are omitted.
Main entry points: api.js API client · Create.jsx Draft and review · App.jsx Routes and layout · db.js Database client
Components 16
Web application
- Routes and layout
frontend/src/App.jsx - Landing page
frontend/src/pages/Landing.jsx - Draft and review
frontend/src/pages/app/Create.jsx - Preview and review UI
frontend/src/components/app - Post views
frontend/src/pages/app - Post data hook
frontend/src/data/usePosts.js - API client
frontend/src/lib/api.js
Application API
- Generate endpoint
frontend/api/generate.js - Post management endpoint
frontend/api/posts.js - Publish endpoint
frontend/api/publish.js
Post storage
- Database client
frontend/lib/db.js - Supabase
Workflow automation
- Generate and review workflow
n8n/workflows/generate-and-review.json - Telegram publish workflow
n8n/workflows/SocialFlow - Publish to Telegram (1).json
Other components
- Content creator
- Telegram
Connections 16
- Content creator → Routes and layout: uses
frontend/src/App.jsx - Routes and layout → Landing page: routes to
frontend/src/App.jsx - Routes and layout → Draft and review: routes to
frontend/src/App.jsx - Routes and layout → Post views: routes to
frontend/src/App.jsx - Draft and review → API client: requests generation
frontend/src/pages/app/Create.jsx - Draft and review → API client: updates drafts
frontend/src/pages/app/Create.jsx - Draft and review → API client: requests publishing
frontend/src/pages/app/Create.jsx - Draft and review → Preview and review UI: renders
frontend/src/pages/app/Create.jsx - Post views → Post data hook: loads posts
frontend/src/pages/app/Dashboard.jsx - Post data hook → API client: lists posts
frontend/src/data/usePosts.js - API client → Generate endpoint: calls endpoint
frontend/src/lib/api.js - API client → Post management endpoint: calls endpoint
frontend/src/lib/api.js - API client → Publish endpoint: calls endpoint
frontend/src/lib/api.js - Generate endpoint → Database client: uses
frontend/api/generate.js - Post management endpoint → Database client: uses
frontend/api/posts.js - Publish endpoint → Database client: uses
frontend/api/publish.js