8.3 KiB
Architecture: Karaoke Frontend & StemEngine Integration
Date: April 3, 2026
Status: Documentation Organization Guide
Purpose: Clarify Phase A, B, C scope and relationship to StemEngine
Important Clarification
Phase A, B, C Documentation in this folder are for building the Karaoke Frontend Application (React UI), NOT the StemEngine backend service.
Architecture Overview
┌─────────────────────────────────────────────────────────┐
│ KARAOKE FRONTEND (React) │
│ │
│ Phase A: Subsonic Library Browser │
│ Phase B: Audio Playback & Queue Management │
│ Phase C: Conversion Job Management │
└────────────────────┬────────────────────────────────────┘
│ HTTP/JSON API Calls
│
┌────────────────────▼────────────────────────────────────┐
│ STEMENGINE BACKEND │
│ │
│ - Audio Processing/Conversion Engine │
│ - Conversion Job Queue Management │
│ - Audio Stream Processing │
│ - Format Conversion Pipeline │
└─────────────────────────────────────────────────────────┘
What Each Phase Does
Phase A: Subsonic Library Browser (Frontend)
Location: Phase A documentation in this folder
Type: Frontend React Components
Components:
- FeishinShell (navigation/layout)
- SubsonicContext (state management)
- SubsonicAPI (Subsonic server connection)
- SubsonicBrowser (UI for browsing music library)
- SubsonicSetup (connection configuration)
Purpose: Allow users to browse their Subsonic music library in the Karaoke frontend
Connects To: Subsonic servers (for music metadata), NOT directly to StemEngine
Phase B: Audio Playback & Queue (Frontend)
Location: Phase B documentation in this folder
Type: Frontend React Components
Components:
- QueueContext (queue state management)
- AudioPlayer (HTML5 audio playback)
- PlaybackService (playback utilities)
Purpose: Allow users to queue tracks and play audio in the frontend
Connects To: Subsonic servers (for audio streams), NOT directly to StemEngine
Phase C: Conversion Job Management (Frontend + Backend)
Location: Phase C documentation in this folder
Type:
- Frontend: React components for UI
- Backend: API specification for StemEngine integration
Frontend Components:
- ConvertButton (trigger conversions)
- ConversionQueue (display job status)
- SingBrowser (browse karaoke projects)
- KaraokePage (main layout)
- ConversionService (API client)
Purpose:
- Frontend: Allow users to submit tracks for conversion
- Backend: Actually perform the conversion using StemEngine
Connects To:
- Frontend submits jobs to StemEngine via
/api/karaoke/processendpoint - StemEngine processes and returns status
- Frontend polls for progress
Phase C: The Bridge Between Frontend & StemEngine
Phase C is where the Frontend talks to StemEngine:
Frontend Flow (Phase C)
- User clicks "Convert" button in Karaoke frontend
- ConvertButton component submits to
/api/karaoke/process - ConversionService polls
/api/karaoke/process/queuefor status - ConversionQueue displays real-time progress
Backend Flow (StemEngine)
- Receives POST
/api/karaoke/processfrom frontend - Creates conversion job in database
- Processes audio using conversion pipeline
- Returns job status on GET
/api/karaoke/process/queue
Documentation Organization
In This Folder (StemEngine Docs)
Phase A Docs (Frontend)
PHASE_A_SUMMARY.md- Overview of Subsonic browser componentsPHASE_A_COMPLETION_GUIDE.md- How to integrate Phase APHASE_A_FILE_LISTING.md- Files created in Phase A- etc.
Note: These are frontend components, but documented here because they're part of the overall Karaoke/StemEngine system.
Phase B Docs (Frontend)
PHASE_B_SUMMARY.md- Overview of audio/queue componentsPHASE_B_INTEGRATION_GUIDE.md- How to integrate Phase B- etc.
Note: These are frontend components for playback, documented here as part of the system.
Phase C Docs (Frontend + Backend)
PHASE_C_SPECIFICATION.md- Feature requirementsPHASE_C_QA_TEST_EXECUTION.md- QA testing proceduresPHASE_C_BACKEND_IMPLEMENTATION.md- Backend API implementation guide ⭐PHASE_C_API_REFERENCE.md- API specification for StemEngine endpoints ⭐- etc.
Note: Phase C has both frontend (already created) and backend (StemEngine) components. The starred files are specifically for StemEngine backend development.
Other Docs in This Folder
KARAOKE_FRONTEND_STEMENGINE_CONNECTIVITY_PLAN.md- Architecture and connectivity- Integration guides
- API specifications
Where the Code Actually Lives
Frontend Code (Phases A, B, C)
Location: /home/translator/docker/karaokemugen-app/kmfrontend/src/frontend/
Files:
- Phase A:
components/FeishinShell.tsx,components/SubsonicBrowser.tsx, etc. - Phase B:
components/QueueContext.tsx,components/AudioPlayer.tsx, etc. - Phase C:
components/ConvertButton.tsx,components/ConversionQueue.tsx, etc.
StemEngine Backend Code
Location: /home/translator/docker/appdata/stemengine/
What Needs to Be Built (from Phase C Backend Implementation guide):
- Database schema (4 tables)
- 9 API endpoints
- Authentication & authorization
- Conversion pipeline integration
How to Use This Documentation
If You're a Frontend Developer
- Read Phase A, B, C docs in this folder
- Navigate to
/home/translator/docker/karaokemugen-app/kmfrontend/src/frontend/ - Integrate the components documented in Phase A, B, C
- Use
KARAOKE_FRONTEND_STEMENGINE_CONNECTIVITY_PLAN.mdfor API endpoints to call
If You're a Backend Developer
- Read Phase C Backend Implementation in this folder
- Read Phase C API Reference in this folder
- Navigate to
/home/translator/docker/appdata/stemengine/ - Implement the 9 API endpoints specified in Phase C docs
- Implement the 4 database tables from Phase C docs
If You're a DevOps/Integration Engineer
- Read
KARAOKE_FRONTEND_STEMENGINE_CONNECTIVITY_PLAN.md - Understand how Phase A, B, C (frontend) communicates with StemEngine (backend)
- Plan networking, authentication, and deployment strategy
Next Steps
For Phase C QA Testing & Backend Implementation
As documented in Phase C files:
-
QA Testing (10-15 hours)
- See:
PHASE_C_QA_TEST_EXECUTION.md - Test the frontend components (ConvertButton, ConversionQueue, etc.)
- These are already created and integrated
- See:
-
Backend Implementation (13-21 hours)
- See:
PHASE_C_BACKEND_IMPLEMENTATION.md - See:
PHASE_C_API_REFERENCE.md - Implement the 9 API endpoints in StemEngine
- Create the database schema
- Wire frontend API calls to backend
- See:
Summary
| Phase | What | Type | Location |
|---|---|---|---|
| A | Subsonic Library Browser | Frontend | This folder (docs) + /karaokemugen-app/kmfrontend/src/frontend/ (code) |
| B | Audio Playback & Queue | Frontend | This folder (docs) + /karaokemugen-app/kmfrontend/src/frontend/ (code) |
| C | Conversion Management | Frontend + Backend | This folder (docs) + /karaokemugen-app/kmfrontend/src/frontend/ (code) + /appdata/stemengine/ (backend to implement) |
All documentation is in this folder (/home/translator/docker/appdata/stemengine/docs/) for centralized reference.
Architecture Status: Clearly documented
Next Action: QA test Phase C frontend, then implement Phase C backend in StemEngine
Date: April 3, 2026