mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-18 16:46:17 +00:00
Commit history from `7204e619decc48df5dee91d18470934b50e389ac` to `f9b5ad3129831086b02bdf20a197ff4e2d098e2d`: https://github.com/gesellix/Bose-SoundTouch-API/compare/7204e619decc48df5dee91d18470934b50e389ac...f9b5ad3129831086b02bdf20a197ff4e2d098e2d * f9b5ad3 - Tobias Gesellchen, 2026-02-07 : Rename module to gesellix/bose-soundtouch-api and update related files * 5b3dbbb - Tobias Gesellchen, 2026-02-07 : docs: translate PLAN.md to English and fix preferredLanguage typo in marge.go * 696b9c9 - Tobias Gesellchen, 2026-02-07 : feat(discovery): fetch serial number from speaker info if missing in discovery and update datastore tests * 8ed78f0 - Tobias Gesellchen, 2026-02-07 : Consolidate proxy and main service on port 8000 and update related tests and UI * 0e3abbb - Tobias Gesellchen, 2026-02-07 : feat(go): lowercase guessed hostnames for URL consistency * ca1091f - Tobias Gesellchen, 2026-02-07 : feat(health): add health endpoint with VCS build information * a432d53 - Tobias Gesellchen, 2026-02-07 : Rename mock token to soundcork-local-token and add documentation * 3b5ee2f - Tobias Gesellchen, 2026-02-07 : Implement Phase 10: Stats API, Device Event Log, and advanced Marge functions * bc96033 - Tobias Gesellchen, 2026-02-06 : chore * c77864b - Tobias Gesellchen, 2026-02-06 : Document Golang header normalization behavior and ensure generic header casing preservation in proxy * a54e7e7 - Tobias Gesellchen, 2026-02-06 : Ensure ETag header preserves casing (uppercase 'T') for case-sensitive devices * 6265fbe - Tobias Gesellchen, 2026-02-06 : update dockerfile to be in sync with go.mod * 5290bad - Tobias Gesellchen, 2026-02-06 : Implement proxy logging settings UI and complete Phase 8 quick wins (ETags, DataStore initialization) * d7aa7f7 - Tobias Gesellchen, 2026-02-06 : Update PLAN.md with recent features and Phase 8 Upstream Parity tasks * c8ae5e2 - Tobias Gesellchen, 2026-02-06 : Enhance Bose SoundTouch migration with proxying, remote services persistence, and improved diagnostics * c53fa00 - Tobias Gesellchen, 2026-02-06 : Implement remote services persistence check and UI improvements for Bose SoundTouch migration * ea5c348 - Tobias Gesellchen, 2026-02-02 : Ignore soundcork-go/data directory and include recent datastore fixes * d162892 - Tobias Gesellchen, 2026-02-02 : Complete Phase 7: Automated Setup & UI refactoring. Implemented programmatic SSH/migration logic, added device discovery endpoints, created Web UI for speaker management, and refactored UI to use external HTML with Go embed. * b528016 - Tobias Gesellchen, 2026-02-01 : Add GitHub workflow to publish Docker image to GHCR and update Dockerfile * 2ee03da - Tobias Gesellchen, 2026-02-01 : Add GitHub Actions workflow for Go CI and update PLAN.md * 439e2a9 - Tobias Gesellchen, 2026-02-01 : Refactor Go implementation: extract handlers and tests into dedicated files, add comprehensive unit and HTTP tests * c0698fb - Tobias Gesellchen, 2026-02-01 : Add Docker telnet example and update IP consistency in documentation * 028a02e - Tobias Gesellchen, 2026-02-01 : Fix older port number in README * 264829d - Tobias Gesellchen, 2026-02-01 : Add setup-speaker.sh and update documentation to match issue #59 * 64306f9 - Tobias Gesellchen, 2026-02-01 : Implement device presets endpoint in Go * b98a602 - Tobias Gesellchen, 2026-02-01 : Implement Phase 4: Datastore and Marge logic in Go * b6e1bc9 - Tobias Gesellchen, 2026-02-01 : Implement Phase 3: BMX Streaming and Service Registry in Go * f1b3dcf - Tobias Gesellchen, 2026-02-01 : Port core models and constants to Go * 9eae655 - Tobias Gesellchen, 2026-02-01 : Implement static file serving for /media in Go * cc73e50 - Tobias Gesellchen, 2026-02-01 : Fix Go service accessibility and improve Docker configuration * e356bdd - Tobias Gesellchen, 2026-02-01 : Initialize Go migration: Phase 1 infrastructure, proxy-first routing, and root endpoint
3.8 KiB
3.8 KiB
Merging Bose-SoundTouch-API into Bose-SoundTouch
This document outlines the plan to merge the Bose-SoundTouch-API project into this repository. The actual Go implementation in that repository is located in the soundcork-go subdirectory. The goal is to provide both a CLI (soundtouch-cli) and a service (soundtouch-service) from a single codebase.
Goals
- Maintain the existing
soundtouch-clifunctionality. - Introduce
soundtouch-serviceas a new command (based on thesoundcork-goproject). - Consolidate shared logic (models, clients, discovery) into the
pkg/directory. - Simplify maintenance by having a single Go module and shared CI/CD pipeline.
Current Directory Structure
.
├── cmd/
│ ├── soundtouch-cli/ # Existing CLI implementation
│ │ └── main.go
│ └── soundtouch-service/ # New service implementation (REST API / Websocket)
│ └── main.go
├── pkg/
│ ├── client/ # Shared SoundTouch API client
│ ├── models/ # Shared data models
│ ├── discovery/ # Shared device discovery logic
│ └── service/ # Service-specific logic (from Bose-SoundTouch-API)
│ ├── bmx/ # BMX service logic
│ ├── marge/ # Marge service logic
│ ├── datastore/ # Device and configuration storage
│ ├── proxy/ # Logging proxy logic
│ ├── setup/ # Device setup and migration logic
│ └── handlers/ # HTTP handlers (adapted from soundcork-go/soundcork-go)
│ └── soundcork/ # Embedded resources (index.html, media/, etc.)
├── docs/
│ └── MERGE_PROJECTS.md # This document
├── go.mod
└── go.sum
Step-by-Step Merge Status
1. Preparation
- Review
go.modin both projects to identify dependency overlaps and conflicts.
2. Code Integration
- Models & Client: Merged missing functionality from
soundcork-go/internal/modelsintopkg/models. Renamed overlapping models toService*(e.g.,ServiceContentItem,ServicePreset). - Service Logic: Adapted internal packages from
soundcork-go/internal/topkg/service/. - Handlers: Moved and adapted HTTP handlers into
pkg/service/handlers/. - New Command: Created
cmd/soundtouch-service/main.goas the service entry point usingchirouter. - Embedded Resources: Integrated
index.html,bmx_services.json,swupdate.xml, andmedia/folder into the binary using//go:embed.
3. Dependency Management
- Update
go.modto include:github.com/go-chi/chi/v5github.com/srwiley/oksvgandgithub.com/srwiley/rasterxgolang.org/x/crypto
- Run
go mod tidyto clean up dependencies.
4. Shared Logic Refactoring
- Identify common code between
soundtouch-cliand the new service. - Move shared logic into
pkg/to ensure both commands use the same underlying implementation.
5. Documentation & Examples
- Update
README.mdto mention the newsoundtouch-servicecommand. - Add service-specific documentation in
docs/SOUNDTOUCH-SERVICE.md. - Provide examples of how to run and interact with the service in
examples/service-demo/.
6. CI/CD Updates
- Update
.github/workflows/release.ymlto build and release thesoundtouch-servicebinary alongsidesoundtouch-cli. - Update any test workflows to include tests for the service logic.
Verification
go build ./cmd/soundtouch-cliworks as expected.go build ./cmd/soundtouch-serviceworks as expected.- All tests pass:
go test ./.... - Resources are correctly served from the embedded filesystem.