How postbasehq/postbase works
Postbase is a social-media scheduler with a dashboard, an AI drafting agent, and API/MCP access. The main workflow is to connect channels, compose or import posts, schedule them, and publish them to social platforms; users can then review analytics and manage workspaces, plans, and integrations. The graph also preserves the documented developer, bot, and marketing capabilities. Several routes and publishing modules were not excerpted, so their runtime links are shown only where documented or left unverified.
Main entry points: api-core.ts Post API Core · route.ts MCP Endpoint · layout.tsx Scheduler Dashboard · DeveloperClient.tsx Developer Settings
Components 22
Workspace App
- Scheduler Dashboard
app/(app)/layout.tsx
Post Lifecycle
- Post Composer
components/PostForm.tsx - Media Library
components/MediaLibrary.tsx - Post API Core
lib/api-core.ts - Post Persistence
lib/publish/save-post.ts - Publishing Runtime
lib/publish/run.ts - Publish Scheduler
app/api/cron/publish/route.ts
Social Channels
- Channel Connections
app/api/connect - Platform Adapters
lib/publish/adapters.ts
AI And Developer Access
- Built-in Agent
app/api/agent/chat/route.ts - Agent Runtime
lib/agent/tools.ts - MCP Endpoint
app/api/mcp/route.ts - MCP OAuth
lib/oauth.ts - REST API
app/api/v1 - Developer Settings
components/DeveloperClient.tsx - Postbots
app/(bots)/bots
Plans And Insights
- Analytics
lib/analytics/report.ts - Plans And Billing
lib/billing-guard.ts - Workspace Database
lib/supabase/admin.ts
Other components
- User
- Social Networks
- MCP Clients
Connections 22
- User → Scheduler Dashboard: uses
README.md - Scheduler Dashboard → Post Composer: composes
README.md - Post Composer → Post API Core: creates posts
- Post API Core → Post Persistence: saves posts
lib/api-core.ts - Media Library → Post API Core: supplies media
- Publish Scheduler → Publishing Runtime: runs publishing
- Publishing Runtime → Platform Adapters: dispatches posts
- Platform Adapters → Social Networks: publishes to
- User → Channel Connections: connects channels
README.md - Channel Connections → Social Networks: authorizes
- Scheduler Dashboard → Analytics: reviews results
- User → Built-in Agent: asks agent
README.md - Built-in Agent → Agent Runtime: runs agent
app/api/agent/chat/route.ts - Agent Runtime → Post API Core: creates posts
- MCP Clients → MCP Endpoint: calls tools
README.md - MCP Endpoint → MCP OAuth: resolves tokens
app/api/mcp/route.ts - MCP Endpoint → Post API Core: creates posts
app/api/mcp/route.ts - REST API → Post API Core: uses API core
- Developer Settings → MCP Endpoint: configures access
README.md - Developer Settings → Postbots: configures bots
- Post API Core → Plans And Billing: checks access
lib/api-core.ts - Plans And Billing → Workspace Database: reads plan data
lib/billing-guard.ts