Skip to content

Architecture & Stack

Platform & Build System

SongDrive Desktop and Mobile Builds - Date unknown (91 words)

  • Status: ✅ CURRENT - Active distribution builds
  • Summary: Direct download links and installation instructions for all platforms. Desktop builds use Tauri/native packaging, mobile builds use Expo for iOS/Android.
  • Desktop Builds:
  • Mobile Builds:
  • Distribution Strategy: Self-hosted assets at assets.songdrive.app, no App Store/Play Store presence yet
  • Key Technical Details:
    • Desktop app enables DAW integration and automated file system import/sync
    • Mobile app handles imports from other mobile apps and push notifications
    • Expo-based mobile builds allow over-the-air updates without store approval

Technical Architecture

SongDrive comprehensive document - Date unknown (673 words)

  • Status: 📋 REFERENCE - Complete technical feature overview
  • Summary: Central document describing complete feature set across all platforms. Links to specialized technical docs for specific implementations.
  • Platform Architecture:
    • Server: Backend API and storage management
    • Browser: Web application (primary interface)
    • Desktop app: DAW integration, automated file system import/sync, local folder mapping
    • Mobile app: Mobile-specific imports (voice memo apps), push notifications, share extensions
    • JamScribe: Raspberry Pi integration for MIDI recording sessions

Database & Storage

Backend Storage (from comprehensive document)

  • Storage Backend: BackBlaze S3-compatible storage at $6/TB/month (from pricing docs)
  • No transfer costs if downloads don't exceed 3x storage amount
  • File Handling:
    • Audio files with waveform generation for visual commenting
    • MIDI files with playback using different instrument sounds
    • Project files (DAW projects, stems, bounces)
    • Voice memos and mobile recordings
    • Lyrics, notes, chords (text data)
  • Revision Control: Automatic versioning for projects and files through desktop sync
  • Passive Data Entry: Automated background syncing from monitored folders (desktop) and directories (Android)

Module System Architecture

Module System - 2024-08-01 (394 words)

  • Status: 🏗️ ARCHITECTURE - Jam Tools modular framework design
  • Summary: Plugin-based module architecture for Jam Tools with key-value persistence, scoped storage, and framework conventions. Designed for multi-device musical collaboration with Raspberry Pi as optional server.
  • Core Architecture Principles:
    • Modular Design: Each module (e.g., guitar representation, song structures) is independent
    • Key-Value Stores: Each module has dedicated persistence layer
    • Transparent Backend Scoping: Data automatically scoped to current user on backend
    • Cloud-First Storage: Data primarily stored in cloud for multi-device recall
    • Multiple Storage Patterns:
      • Global (per user across all contexts)
      • Per setlist (jam session specific)
      • Per arbitrary config (swappable module configurations within jam/setlist)
  • Development Conventions:
    • Core Code Location: Everything written in core folder except module-specific code
    • Module Interfaces: Modules implement expected interfaces (e.g., ConfigurableModule interface for main config module)
    • Route Configuration: Modules can register routes with config to appear in navigation bar
    • Agnostic KV Store: Separate package for key-value storage (context-aware: cloud vs local storage)
  • Deployment Contexts:
    • Local-Browser Mode: MIDI always "ready" locally in browser
    • Raspberry Pi Mode: Pi acts as another browser OR as cloud server replacement
    • Cloud Workspace Mode: Data saved in workspace for shared access based on membership (Soundtown memberships)
    • Self-Hosted Mode: User preferences stored in local storage, must allow guest access in cloud
  • State Management:
    • Redux-Style Recording: All state changes recorded like Redux
    • Redux DevTools Integration: Hook into Redux DevTools for debugging
    • KV Store Visibility: Key-value store operations visible in dev tools
  • Module Configuration UI:
    • Auto-generated UI for module actions
    • Modules can add custom views below generated UI (example: chord family data entry with status feedback)
  • Developer Experience:
    • Framework should be easy to hook into existing codebase (inspired by OpenTelemetry Node package instrumentation)
    • Package: fullcircle for easy integration
  • Technical Roadmap:
    • Create types for KV store and state for musical modules
    • Package agnostic KV store independently
    • Online hackathon planned once app/framework ready (prizes for high-quality modules)
  • Related Technologies:

Technology Stack

Platform Stack

  • Frontend: React (web/desktop), React Native (mobile)
  • Desktop: Tauri/native packaging for DAW integration and file system access
  • Mobile: Expo for cross-platform development and OTA updates
  • Backend: Node.js API server
  • Storage: BackBlaze S3-compatible storage at $6/TB/month
  • State Management: Redux-style with DevTools integration

Development Tools

  • Module Framework: fullcircle package for OpenTelemetry-style instrumentation
  • Key-Value Store: Agnostic KV store package (cloud vs local storage aware)
  • Build Tools: Modern JavaScript build pipeline
  • Version Control: Git with GitHub

Infrastructure

  • Hosting: Self-hosted builds at assets.songdrive.app
  • Distribution:
    • Desktop: Direct DMG downloads (unsigned)
    • iOS: Expo beta testing workflow
    • Android: Direct APK sideloading
  • Future Considerations: Raspberry Pi (JamScribe) integration for MIDI recording

Data Models & Hierarchy

Current Data Hierarchy

Workspaces (offline/online, invite-only access control)
  └── Projects (flat structure, no sub-projects yet)
      └── Files (no revisions, no nested structure yet)
          └── Comments (attached to files only, not projects)

Future Data Hierarchy (Planned)

Workspaces
  └── Projects/Folders (nested hierarchy, unlimited depth)
      ├── Sub-projects (artist → album → song structure)
      ├── Folders (organization without project overhead)
      └── Files (with revisions, matching DAW project structure)
          ├── Revisions (version history, compare/revert)
          └── Comments (on files AND projects AND folders)

Data Models (from original vision document)

  • Projects: Container for audio files, clips, attachments
  • Audio Files: Primary media type with waveform generation
  • Clips: Extracted from audio files, become independent (planned)
  • Attachments: Any entity can attach to any other (planned)
  • Comments: Attach to files, clips, projects
  • Tags: Categorize projects, files, clips (planned)
  • Folders: Hierarchical organization (planned)
  • Teams/Workspaces: Grouping and access control
  • Ratings: Per-user ratings on files and clips (future)
  • Playlists: Custom collections (planned, lower priority)

Key Features & Technical Implementation

Audio Playback & Commenting

  • Waveform Generation: Server-side processing for visual commenting
  • Timestamp Comments: Real-time playhead position capture
  • Region-Based Comments: Planned feature for time range annotations
  • Click-to-Seek: Waveform visualization with interactive seeking

Browsing & Navigation

  • React-arborist Library: Consideration for nested tree view implementation
  • Grid/List Views: Google Drive-inspired dual-view system
  • Virtual Scrolling: Performance optimization for large data sets

Voice Memo Integration

  • iOS Share Extension: Private app storage access via system share sheet
  • Android Directory Selection: Auto-import with passive data entry
  • Expo Network API: WiFi-based automatic import triggers

Desktop Syncing - Passive Data Entry

  • Project Folder Mapping: User-selectable local directories
  • Automatic Versioning: Background sync with change detection
  • DAW Integration: One-click project opening in GarageBand, Ableton Live

Asynchronous Communications

  • Mobile Push Notifications: Real-time collaboration alerts (current)
  • Desktop Push Notifications: Planned
  • Email Notifications: Planned with thread context options
  • WebSocket Connections: Real-time activity feed updates (planned)

Performance & Scalability

Large Data Milestone

From Large Data Milestone - 2025-05-10:

  • Goal: Pleasant UX for users with large amounts of data
  • Key Features:
    • Tags and saved searches for relevant search results
    • Recent activity tracking (recently listened, collaborator actions)
    • Compact view with waveform thumbnails
    • Auto-expand recent activity (smart defaults for new vs old content)
  • Technical Considerations:
    • Virtual scrolling for large lists
    • Lazy loading and pagination
    • Optimized waveform thumbnail generation
    • Efficient search indexing