Architecture Overview
This document provides a high-level overview of the Sidechain plugin architecture. For a comprehensive guide covering modern C++26 patterns, reactive state management, and implementation patterns, see Backend Architecture.
System Overview
The Sidechain plugin is built using the JUCE framework and follows a modular architecture:
┌─────────────────────────────────────────────────────────────┐
│ Plugin Editor (UI Layer) │
│ ┌─────────────────────────────────────────────────────────┐
│ │ UI Components & Components Management │
│ │ (Feed, Messages, Profile, Recording, Stories) │
│ └─────────────────────────────────────────────────────────┘
└──┬──────────────────────────────────────────────────────────┘
│ dispatch actions
▼
┌─────────────────────────────────────────────────────────────┐
│ Store Layer (State) │
│ (PostsStore, ChatStore, UserStore, etc.) │
└──┬──────────────────────────────────────────────────────────┘
│ network calls
▼
┌─────────────────────────────────────────────────────────────┐
│ Network Layer │
│ ┌──────────────────┐ ┌──────────────────┐ │
│ │ Network Client │ │ WebSocket Client │ │
│ │ (HTTP API) │ │ (Real-time) │ │
│ └──────────────────┘ └──────────────────┘ │
└──┬──────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Backend Services │
│ (Go Server + GetStream.io + Audio CDN) │
└─────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────┐
│ Plugin Processor (Audio Layer) │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Audio Capture│ │ MIDI Capture │ │ Audio Player │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
└─────────────────────────────────────────────────────────────┘
Core Components
Plugin Editor
The SidechainAudioProcessorEditor class is the main UI component that manages:
View navigation and state
User authentication
Component lifecycle
WebSocket connections
Notification handling
See Reactive Components for detailed UI component patterns.
Plugin Processor
The SidechainAudioProcessor class handles:
Audio processing pipeline
Audio capture from the DAW
MIDI capture
Audio playback
Network Layer
The network layer consists of:
NetworkClient: HTTP API client for REST endpoints
WebSocketClient: Real-time WebSocket connections
StreamChatClient: GetStream.io chat integration
FeedDataManager: Feed data management and caching
Audio System
The audio system includes:
AudioCapture: Captures audio from the DAW
MIDICapture: Captures MIDI events
HttpAudioPlayer: Streams audio from URLs
BufferAudioPlayer: Plays audio from memory buffers
KeyDetector: Detects musical key from audio
UI Components
The UI is organized into functional components:
AuthComponent: Login and signup
PostsFeedComponent: Social feed display
MessageThreadComponent: Chat interface
ProfileComponent: User profiles
RecordingComponent: Audio recording interface
StoryRecordingComponent: Story creation interface
Data Models
The plugin uses several data models:
FeedPost: Represents a post in the feed
Story: Represents a story (24-hour expiring content)
User: User profile data
Message: Chat message data
Storage
User data is stored locally using:
UserDataStore: Centralized user data management
JUCE’s
PropertiesFilefor persistent storage
Build System
The plugin uses CMake for building:
Cross-platform support (macOS, Windows, Linux)
JUCE integration
Dependency management (ASIO, websocketpp, libkeyfinder)
Test framework integration (Catch2)
For more details, see the Development Guide guide.
See Also
For comprehensive architecture documentation:
Backend Architecture - Complete architecture guide with reactive patterns
Store Pattern - Store pattern and state management
Observable Pattern - Observable collections reference
Threading Model - Threading model and safety constraints
Data Flow Patterns - Data flow diagrams and patterns