How amaurylacalmette-ui/opensocial works
OpenSocial is a social publishing workspace: creators connect accounts, compose platform-specific posts, publish or schedule them, and review real engagement data. The graph separates the UI, account/OAuth handling, publishing and automation, analytics, and AI. README statements support the product workflow and major features; source-index references and excerpts support the server-side links. Several UI-to-API calls and unsampled automation details are not shown, so those relationships are marked unverified rather than asserted.
Main entry points: db.ts Workspace database · account-service.ts Account verification · route.ts Streaming chat route · publisher.ts Publisher
Components 28
Workspace UI
- Workspace shell
src/components/opensocial/app-shell.tsx - Composer
src/components/opensocial/composer.tsx - Posts and schedule
src/components/opensocial/posts-view.tsx - Accounts view
src/components/opensocial/accounts-view.tsx - Platform icons
src/components/opensocial/platform-icons.tsx - UI primitives
src/components/ui - Settings view
src/components/opensocial/settings-view.tsx
Accounts and Integrations
- Account routes
src/app/api/accounts - OAuth routes
src/app/api/oauth - OAuth flows
src/lib/oauth.ts - Account verification
src/lib/account-service.ts - Platform configuration
src/lib/platforms.ts - Adapter registry
src/lib/adapters/index.ts - Platform connectors
src/lib/adapters
Publishing and Automation
- Post routes
src/app/api/posts - Publisher
src/lib/publisher.ts - Automation routes and worker
src/app/api/automations
Analytics
- Analytics view
src/components/opensocial/analytics-view.tsx - Analytics aggregation
src/app/api/analytics/route.ts - Live metrics sync
src/app/api/metrics/sync/route.ts
AI Assistant
- AI chat view
src/components/opensocial/ai-chat.tsx - Streaming chat route
src/app/api/ai/chat/route.ts - AI provider service
src/lib/ai.ts - Settings route
src/app/api/settings/route.ts
Other components
- Creator
- Social platforms
- Workspace database
src/lib/db.ts - AI providers
Connections 35
- Creator → Workspace shell: opens workspace
README.md - Workspace shell → Composer: offers composing
- Creator → Composer: writes post
README.md - Composer → Post routes: submits post
- Post routes → Publisher: publishes immediately
src/app/api/posts/route.ts - Post routes → Workspace database: stores posts
src/app/api/posts/route.ts - Publisher → Workspace database: updates delivery state
src/lib/publisher.ts - Publisher → Adapter registry: dispatches delivery
src/lib/publisher.ts - Adapter registry → Platform connectors: selects connector
src/lib/adapters/index.ts - Platform connectors → Social platforms: verifies and publishes
README.md - Creator → Accounts view: links accounts
README.md - Accounts view → Account routes: requests account actions
- Account routes → Account verification: verifies connection
src/app/api/accounts/route.ts - Account verification → Adapter registry: verifies profile
src/lib/account-service.ts - Account verification → Workspace database: stores verified account
src/lib/account-service.ts - Account verification → Platform configuration: checks platform
src/lib/account-service.ts - Accounts view → OAuth routes: starts authorization
- OAuth routes → OAuth flows: handles authorization
src/app/api/oauth/callback/[platform]/route.ts - OAuth routes → Account verification: creates verified account
src/app/api/oauth/callback/[platform]/route.ts - OAuth flows → Workspace database: stores OAuth state
src/lib/oauth.ts - Creator → Posts and schedule: manages posts
README.md - Automation routes and worker → Publisher: publishes due posts
- Creator → Analytics view: reviews performance
README.md - Analytics view → Analytics aggregation: requests analytics
- Analytics aggregation → Workspace database: reads metrics and posts
src/app/api/analytics/route.ts - Creator → Live metrics sync: syncs live metrics
README.md - Live metrics sync → Adapter registry: fetches platform metrics
src/app/api/metrics/sync/route.ts - Creator → AI chat view: asks for a draft
README.md - AI chat view → Streaming chat route: sends chat
- Streaming chat route → AI provider service: resolves provider
src/app/api/ai/chat/route.ts - Streaming chat route → Workspace database: persists conversation
src/app/api/ai/chat/route.ts - Streaming chat route → AI providers: streams completion
src/app/api/ai/chat/route.ts - Settings view → Settings route: configures providers
- Settings route → Workspace database: stores settings
src/app/api/settings/route.ts - AI provider service → Workspace database: reads API keys
src/lib/ai.ts