Development Guide
Development Tools
Jira Links - 2024-06-24 (16 words)
- Status: ✅ CURRENT - Active project management
- Summary: Centralized Jira board links for issue tracking across all projects.
- Jira Boards:
- All Boards: https://jamtools.atlassian.net/jira/boards?contains=
- "Jam Tools - All" Board: Shows issues from all projects - https://jamtools.atlassian.net/jira/software/c/projects/JT/boards/6
- Project Management: Atlassian Jira Software for agile development, cross-project visibility
Testing Strategy
Testing Approach
Based on the comprehensive technical planning, testing includes:
Unit Testing
- Component-level tests for UI components
- Module-level tests for business logic
- State management testing with Redux DevTools integration
Integration Testing
- API integration tests
- File upload/download workflows
- DAW integration testing
- Mobile share extension testing
End-to-End Testing
- Cross-platform workflows (mobile → desktop)
- Collaboration scenarios (multi-user)
- Passive data entry validation
Performance Testing
- Large data set handling
- Waveform generation performance
- Virtual scrolling efficiency
- Search query performance
Development Workflow
Local Development
Desktop Development
- Set up local development environment
- Install dependencies
- Run desktop app in development mode
- Test DAW integration locally
- Test file system sync
Mobile Development
- Set up Expo development environment
- Install mobile dependencies
- Run on iOS simulator / Android emulator
- Test share extension workflow
- Test push notifications (requires backend)
Web Development
- Set up web development environment
- Install dependencies
- Run local development server
- Test in browser
- Integrate with local/staging backend
Build Process
Desktop Builds
- Platform: Mac M1 (Apple Silicon) currently supported
- Packaging: Tauri/native packaging
- Distribution: Self-hosted DMG files
- Code Signing: Not currently implemented (requires manual security bypass)
- Build Command: TBD (not specified in docs)
Mobile Builds
iOS:
- Platform: Expo development builds
- Distribution: Beta testing via Expo device registration
- OTA Updates: Supported via Expo
- Build Command:
expo build:ios(or equivalent)
Android:
- Platform: Expo development builds
- Distribution: Direct APK sideloading
- Build Command:
expo build:android(or equivalent)
Web Builds
- Standard React build process
- Hosted on Cloudflare Pages (based on preview URLs in docs)
- CI/CD via GitHub Actions (implied)
Deployment
Distribution Channels
Desktop:
- Self-hosted at
https://assets.songdrive.app/builds/desktop/ - Direct DMG downloads
- Manual installation required
- Security bypass command needed:
xattr -cr "/Applications/SongDrive.app"
Mobile iOS:
- Expo beta testing platform
- Device registration required: https://expo.dev/register-device/224e8110-87c1-4975-b59e-44175aa07dfb
- Over-the-air updates supported
Mobile Android:
- Self-hosted APK at
https://assets.songdrive.app/builds/mobile/ - Direct sideloading installation
- No Google Play Store presence yet
Web:
- Preview environments on Cloudflare Pages
- Example: https://new-dashboard.songdrive.pages.dev
- Production URL: https://private-beta.songdrive.app
CI/CD Pipeline
Continuous Integration
Based on documentation references:
- GitHub Actions for automated builds
- Pull request previews (PR #208 mentioned with preview URL)
- Automated testing (implied but not detailed)
Continuous Deployment
- Cloudflare Pages for web deployments
- Self-hosted asset server for desktop/mobile builds
- Expo OTA updates for mobile
Development Environment Setup
Prerequisites
- Node.js (version TBD)
- npm or yarn package manager
- Git version control
- Platform-specific tools:
- Desktop: Tauri dependencies (Rust, system libraries)
- Mobile: Expo CLI, iOS/Android development tools
- Web: Modern browser for testing
Environment Variables
(Not detailed in available docs - likely includes:)
- Backend API endpoint
- Storage credentials (BackBlaze S3)
- Expo configuration
- Authentication secrets
Code Quality
Linting and Formatting
(Not detailed in available docs - likely includes:)
- ESLint for JavaScript/TypeScript
- Prettier for code formatting
- Pre-commit hooks
Code Review Process
- Pull request workflow via GitHub
- Jira integration for issue tracking
- PR previews for visual review
- Example: PR #208 for dashboard redesign
Module Development
Module System Framework
From Module System architecture docs:
Creating a New Module
- Implement module interface (e.g.,
ConfigurableModule) - Define module routes for navigation
- Set up key-value store for persistence
- Implement module-specific UI components
- Register module with core framework
Module Conventions
- Code Location: Module-specific code outside
corefolder - Storage: Use agnostic KV store package
- State Management: Redux-style with DevTools integration
- UI Generation: Auto-generated with optional custom views
Developer Experience
- Easy Integration: OpenTelemetry-style instrumentation pattern
- Package:
fullcirclefor framework integration - Debugging: Redux DevTools for state inspection
- Testing: Module-level unit tests
Deployment Contexts
Local-Browser Mode
- MIDI always "ready" locally in browser
- Local storage for user preferences
- No server required for basic functionality
Raspberry Pi Mode
- Pi acts as browser client OR cloud server replacement
- MIDI integration for JamScribe hardware
- Local network connectivity
Cloud Workspace Mode
- Data saved in cloud workspace
- Shared access based on membership
- BackBlaze S3 storage backend
Self-Hosted Mode
- User preferences in local storage
- Guest access configuration required
- Hybrid local/cloud functionality
Documentation
User Documentation
- POC: VitePress implementation
- Live: https://songdrive-docs.pages.dev
- GitHub: https://github.com/jamtools/songdrive-docs
- Status: In progress, needs expansion
Developer Documentation
- Module system architecture docs
- API documentation (TBD)
- Integration guides (TBD)
Debugging and Monitoring
Development Debugging
- Redux DevTools: State inspection and time-travel debugging
- Browser DevTools: Standard web debugging
- React Developer Tools: Component inspection
- KV Store Visibility: Key-value operations visible in dev tools
Production Monitoring
(Not detailed in current docs - future considerations:)
- Error tracking (Sentry, etc.)
- Performance monitoring
- User analytics
- Backend API monitoring
Related Resources
- Jam Tools Comprehensive Planning: Extensive technical doc covering React Native, monorepo structure, deployment strategies
- Module System Architecture: Detailed framework design
- Raspberry Pi Deployment: Infrastructure automation framework
- Jira Project Management: Issue tracking boards
- Feedback Server: User feedback collection
Getting Started
Quick Start (Desktop Development)
- Clone repository
- Install dependencies:
npm install(oryarn install) - Run development server:
npm run dev - Access at
http://localhost:PORT
Quick Start (Mobile Development)
- Clone repository
- Install dependencies:
npm install - Install Expo CLI:
npm install -g expo-cli - Start Expo dev server:
expo start - Scan QR code with Expo Go app
Quick Start (Web Development)
- Clone repository
- Install dependencies:
npm install - Run development server:
npm run dev - Access at
http://localhost:PORT
(Note: Specific commands may vary - refer to package.json scripts)
Contributing
Pull Request Process
- Create feature branch from main
- Implement changes with tests
- Submit pull request
- Link to related Jira issue
- Await code review
- Address feedback
- Merge after approval
Code Style
- Follow existing code patterns
- Use consistent naming conventions
- Write clear commit messages
- Add comments for complex logic
Testing Requirements
- Add unit tests for new features
- Ensure existing tests pass
- Test cross-platform functionality
- Document manual testing steps