# brightbeanxyz/brightbean-studio architecture

> Architecture diagram of the GitHub repository brightbeanxyz/brightbean-studio, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/brightbeanxyz/brightbean-studio
- Repository: https://github.com/brightbeanxyz/brightbean-studio

## Overview

BrightBean Studio is a multi-workspace social-media management platform. Its main workflow is connecting social accounts, creating and scheduling platform-specific posts, routing them through optional approvals, and publishing them through first-party provider integrations. The graph also includes the documented inbox, analytics, media, client-portal, and notification capabilities. Relationship evidence is limited to the README and the supplied SOURCE INDEX excerpts; unsampled subsystems are represented by their existing directories, without asserting unverified internal call chains.

Main entry points: [`apps/composer/services.py`](https://github.com/brightbeanxyz/brightbean-studio/blob/main/apps/composer/services.py) (Post services), [`apps/media_library/models.py`](https://github.com/brightbeanxyz/brightbean-studio/blob/main/apps/media_library/models.py) (Media library), [`apps/composer/models.py`](https://github.com/brightbeanxyz/brightbean-studio/blob/main/apps/composer/models.py) (Post composer), [`apps/calendar/services.py`](https://github.com/brightbeanxyz/brightbean-studio/blob/main/apps/calendar/services.py) (Calendar and queues)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Workspace and access"]
  node_teams[("Organizations and teams<br/>[models.py]")]
  node_members[("Workspace members<br/>[models.py]")]
  node_client["Client portal"]
end

subgraph group_content["Content workflow"]
  node_composer[("Post composer<br/>[models.py]")]
  node_compose_service["Post services<br/>[services.py]"]
  node_calendar["Calendar and queues<br/>[services.py]"]
  node_approvals["Approval workflows"]
  node_media[("Media library<br/>[models.py]")]
  node_media_storage["Media storage<br/>[storage.py]"]
end

subgraph group_platform["Platform operations"]
  node_connections[("Social connections<br/>[models.py]")]
  node_oauth["OAuth and tokens<br/>[views.py]"]
  node_publisher["Publishing engine<br/>[engine.py]"]
  node_providers["Platform providers<br/>[__init__.py]"]
end

subgraph group_insight["Engagement and insights"]
  node_inbox["Unified inbox"]
  node_analytics["Analytics<br/>[tasks.py]"]
end

subgraph group_shared["Shared services"]
  node_notifications[("Notifications<br/>[models.py]")]
  node_notify_engine["Notification delivery<br/>[engine.py]"]
  node_api["REST and agent API"]
  node_mcp["MCP tools<br/>[handlers.py]"]
  node_common["Shared utilities"]
end

node_user(("Studio user"))
node_social_networks{{"Social platforms"}}
node_storage_service[("Object storage")]

node_user -->|"manages workspaces"| node_teams
node_user -->|"creates content"| node_composer
node_user -->|"plans posts"| node_calendar
node_teams -->|"organizes members"| node_members
node_members -->|"enables client access"| node_client
node_user -->|"connects accounts"| node_oauth
node_oauth -->|"stores connections"| node_connections
node_connections -->|"authorizes access"| node_social_networks
node_user -->|"manages assets"| node_media
node_media -->|"stores media"| node_media_storage
node_media_storage -.->|"uploads objects"| node_storage_service
node_user -->|"composes posts"| node_compose_service
node_compose_service -->|"creates posts"| node_composer
node_compose_service -->|"attaches assets"| node_media
node_user -->|"reviews posts"| node_approvals
node_user -->|"schedules content"| node_calendar
node_calendar -->|"updates schedules"| node_composer
node_publisher -->|"reads scheduled posts"| node_composer
node_publisher -->|"dispatches posts"| node_providers
node_providers -->|"publishes content"| node_social_networks
node_user -->|"monitors interactions"| node_inbox
node_inbox -->|"syncs messages"| node_social_networks
node_user -->|"reviews performance"| node_analytics
node_analytics -->|"fetches metrics"| node_social_networks
node_user -->|"receives updates"| node_notify_engine
node_notify_engine -->|"records deliveries"| node_notifications
node_user -.->|"uses API"| node_api
node_user -.->|"uses agent tools"| node_mcp
node_mcp -->|"creates posts"| node_compose_service
node_common -->|"provides scoped managers"| node_media

click node_teams "https://github.com/brightbeanxyz/brightbean-studio/blob/main/apps/organizations/models.py"
click node_members "https://github.com/brightbeanxyz/brightbean-studio/blob/main/apps/members/models.py"
click node_client "https://github.com/brightbeanxyz/brightbean-studio/tree/main/apps/client_portal"
click node_connections "https://github.com/brightbeanxyz/brightbean-studio/blob/main/apps/social_accounts/models.py"
click node_oauth "https://github.com/brightbeanxyz/brightbean-studio/blob/main/apps/social_accounts/views.py"
click node_composer "https://github.com/brightbeanxyz/brightbean-studio/blob/main/apps/composer/models.py"
click node_compose_service "https://github.com/brightbeanxyz/brightbean-studio/blob/main/apps/composer/services.py"
click node_calendar "https://github.com/brightbeanxyz/brightbean-studio/blob/main/apps/calendar/services.py"
click node_approvals "https://github.com/brightbeanxyz/brightbean-studio/tree/main/apps/approvals"
click node_media "https://github.com/brightbeanxyz/brightbean-studio/blob/main/apps/media_library/models.py"
click node_media_storage "https://github.com/brightbeanxyz/brightbean-studio/blob/main/apps/media_library/storage.py"
click node_publisher "https://github.com/brightbeanxyz/brightbean-studio/blob/main/apps/publisher/engine.py"
click node_providers "https://github.com/brightbeanxyz/brightbean-studio/blob/main/providers/__init__.py"
click node_inbox "https://github.com/brightbeanxyz/brightbean-studio/tree/main/apps/inbox"
click node_analytics "https://github.com/brightbeanxyz/brightbean-studio/blob/main/apps/analytics/tasks.py"
click node_notifications "https://github.com/brightbeanxyz/brightbean-studio/blob/main/apps/notifications/models.py"
click node_notify_engine "https://github.com/brightbeanxyz/brightbean-studio/blob/main/apps/notifications/engine.py"
click node_api "https://github.com/brightbeanxyz/brightbean-studio/tree/main/apps/api"
click node_mcp "https://github.com/brightbeanxyz/brightbean-studio/blob/main/apps/mcp/handlers.py"
click node_common "https://github.com/brightbeanxyz/brightbean-studio/tree/main/apps/common"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_teams,node_members,node_client,node_user toneBlue
class node_composer,node_compose_service,node_calendar,node_approvals,node_media,node_media_storage,node_storage_service toneAmber
class node_connections,node_oauth,node_publisher,node_providers toneMint
class node_inbox,node_analytics toneRose
class node_notifications,node_notify_engine,node_api,node_mcp,node_common,node_social_networks toneIndigo
```

## Components

### Workspace and access

- [Organizations and teams](https://github.com/brightbeanxyz/brightbean-studio/blob/main/apps/organizations/models.py): `apps/organizations/models.py`
- [Workspace members](https://github.com/brightbeanxyz/brightbean-studio/blob/main/apps/members/models.py): `apps/members/models.py`
- [Client portal](https://github.com/brightbeanxyz/brightbean-studio/tree/main/apps/client_portal): `apps/client_portal`

### Content workflow

- [Post composer](https://github.com/brightbeanxyz/brightbean-studio/blob/main/apps/composer/models.py): `apps/composer/models.py`
- [Post services](https://github.com/brightbeanxyz/brightbean-studio/blob/main/apps/composer/services.py): `apps/composer/services.py`
- [Calendar and queues](https://github.com/brightbeanxyz/brightbean-studio/blob/main/apps/calendar/services.py): `apps/calendar/services.py`
- [Approval workflows](https://github.com/brightbeanxyz/brightbean-studio/tree/main/apps/approvals): `apps/approvals`
- [Media library](https://github.com/brightbeanxyz/brightbean-studio/blob/main/apps/media_library/models.py): `apps/media_library/models.py`
- [Media storage](https://github.com/brightbeanxyz/brightbean-studio/blob/main/apps/media_library/storage.py): `apps/media_library/storage.py`

### Platform operations

- [Social connections](https://github.com/brightbeanxyz/brightbean-studio/blob/main/apps/social_accounts/models.py): `apps/social_accounts/models.py`
- [OAuth and tokens](https://github.com/brightbeanxyz/brightbean-studio/blob/main/apps/social_accounts/views.py): `apps/social_accounts/views.py`
- [Publishing engine](https://github.com/brightbeanxyz/brightbean-studio/blob/main/apps/publisher/engine.py): `apps/publisher/engine.py`
- [Platform providers](https://github.com/brightbeanxyz/brightbean-studio/blob/main/providers/__init__.py): `providers/__init__.py`

### Engagement and insights

- [Unified inbox](https://github.com/brightbeanxyz/brightbean-studio/tree/main/apps/inbox): `apps/inbox`
- [Analytics](https://github.com/brightbeanxyz/brightbean-studio/blob/main/apps/analytics/tasks.py): `apps/analytics/tasks.py`

### Shared services

- [Notifications](https://github.com/brightbeanxyz/brightbean-studio/blob/main/apps/notifications/models.py): `apps/notifications/models.py`
- [Notification delivery](https://github.com/brightbeanxyz/brightbean-studio/blob/main/apps/notifications/engine.py): `apps/notifications/engine.py`
- [REST and agent API](https://github.com/brightbeanxyz/brightbean-studio/tree/main/apps/api): `apps/api`
- [MCP tools](https://github.com/brightbeanxyz/brightbean-studio/blob/main/apps/mcp/handlers.py): `apps/mcp/handlers.py`
- [Shared utilities](https://github.com/brightbeanxyz/brightbean-studio/tree/main/apps/common): `apps/common`

### Other components

- **Studio user**
- **Social platforms**
- **Object storage**

## Connections

- Studio user → Organizations and teams: manages workspaces (evidence: `README.md`)
- Studio user → Post composer: creates content (evidence: `README.md`)
- Studio user → Calendar and queues: plans posts (evidence: `README.md`)
- Organizations and teams → Workspace members: organizes members (evidence: `README.md`)
- Workspace members → Client portal: enables client access (evidence: `README.md`)
- Studio user → OAuth and tokens: connects accounts (evidence: `README.md`)
- OAuth and tokens → Social connections: stores connections (evidence: `README.md`)
- Social connections → Social platforms: authorizes access (evidence: `README.md`)
- Studio user → Media library: manages assets (evidence: `README.md`)
- Media library → Media storage: stores media (evidence: `apps/media_library/storage.py`)
- Media storage → Object storage: uploads objects
- Studio user → Post services: composes posts (evidence: `README.md`)
- Post services → Post composer: creates posts (evidence: `apps/composer/services.py`)
- Post services → Media library: attaches assets (evidence: `apps/composer/services.py`)
- Studio user → Approval workflows: reviews posts (evidence: `README.md`)
- Studio user → Calendar and queues: schedules content (evidence: `README.md`)
- Calendar and queues → Post composer: updates schedules (evidence: `apps/calendar/services.py`)
- Publishing engine → Post composer: reads scheduled posts (evidence: `apps/publisher/engine.py`)
- Publishing engine → Platform providers: dispatches posts (evidence: `apps/publisher/engine.py`)
- Platform providers → Social platforms: publishes content (evidence: `README.md`)
- Studio user → Unified inbox: monitors interactions (evidence: `README.md`)
- Unified inbox → Social platforms: syncs messages (evidence: `README.md`)
- Studio user → Analytics: reviews performance (evidence: `README.md`)
- Analytics → Social platforms: fetches metrics (evidence: `README.md`)
- Studio user → Notification delivery: receives updates (evidence: `README.md`)
- Notification delivery → Notifications: records deliveries (evidence: `apps/notifications/engine.py`)
- Studio user → REST and agent API: uses API (evidence: `README.md`)
- Studio user → MCP tools: uses agent tools (evidence: `apps/mcp/handlers.py`)
- MCP tools → Post services: creates posts (evidence: `apps/mcp/handlers.py`)
- Shared utilities → Media library: provides scoped managers (evidence: `apps/common/managers.py`)
