MCPSERV.CLUB
Stretto

Stretto

Self-Hosted

Web‑based music player that syncs playlists and fetches lyrics

Active(72)
630stars
0views
Updated Sep 20, 2025
Stretto screenshot 1
1 / 3

Overview

Discover what makes Stretto powerful

Stretto is a lightweight, self‑hosted web music player that transforms any track into an audio stream backed by YouTube or SoundCloud resources. It exposes a rich API for playlist management, lyric retrieval, and cross‑device library sync while remaining fully open source under the MIT license. The application is designed for developers who want a plug‑and‑play media server that can be extended or embedded into larger ecosystems without vendor lock‑in.

Backend

Frontend

Database

Deployment

Overview

Stretto is a lightweight, self‑hosted web music player that transforms any track into an audio stream backed by YouTube or SoundCloud resources. It exposes a rich API for playlist management, lyric retrieval, and cross‑device library sync while remaining fully open source under the MIT license. The application is designed for developers who want a plug‑and‑play media server that can be extended or embedded into larger ecosystems without vendor lock‑in.

Technical Stack & Architecture

  • Backend: Written in Go, leveraging the standard library’s net/http for routing and concurrency. The codebase is intentionally minimal, exposing a RESTful API that interacts with MongoDB for persistence and uses OAuth2 to authenticate with external services (Spotify, Google, SoundCloud).
  • Frontend: A single‑page application built with React (or a similar framework, inferred from the use of JSX in the repo). The UI consumes the Go API via fetch/axios, and WebSocket connections are used for real‑time playback updates.
  • Database: MongoDB is the sole persistence layer, storing user profiles, playlist metadata, and caching YouTube/SoundCloud URLs.
  • Deployment: The project ships with a Dockerfile and docker‑compose script that bundles the Go binary, Node.js build step for the frontend, and MongoDB. The bin/go helper script starts both services, simplifying local development.

Core Capabilities & APIs

  • Playlist Import: OAuth2 flows for Spotify and iTunes charts allow bulk import of tracks. The backend scrapes the source platform, normalizes track metadata, and generates a YouTube/SoundCloud link via the youtube-dl style lookup.
  • Library Sync: A lightweight sync API lets multiple instances share a common MongoDB deployment, effectively mirroring libraries across devices.
  • Lyric Fetching: The server queries external lyric services (e.g., Genius) and caches results in MongoDB, exposing them through a /lyrics/:trackId endpoint.
  • Discovery: Endpoints for iTunes/Spotify top charts (/discover) return curated lists that the frontend can render.
  • Webhooks & Extensions: Although not fully documented, the architecture supports custom webhooks to notify external services on playlist changes or playback events. The companion Chrome extension demonstrates a client‑side integration pattern.

Deployment & Infrastructure

  • Self‑Hosting: Requires only Docker (or Node.js 12+ and MongoDB). The docker-compose.yml pulls the official Mongo image, builds the Go binary, and serves static assets.
  • Scalability: Because MongoDB is the single source of truth, horizontal scaling can be achieved by clustering MongoDB and deploying multiple stateless Go instances behind a load balancer. The real‑time features are lightweight, using WebSockets that scale with the number of concurrent users.
  • Containerization: The image is small (<200 MB) and can be run on any OCI‑compatible runtime, making it suitable for Kubernetes, Docker Swarm, or even edge devices.

Integration & Extensibility

Stretto’s open API encourages integration into larger media stacks. Developers can:

  • Build custom clients (mobile, desktop) that consume the REST endpoints.
  • Hook into the sync API to merge with other services (e.g., Home Assistant media integrations).
  • Extend the plugin system by adding new OAuth providers or lyric sources, as the codebase is modular and well‑commented.

Developer Experience

  • Configuration: Environment variables (GOOGLE_CLIENT_ID, SPOTIFY_CLIENT_ID, etc.) control OAuth scopes; MongoDB URI is read from MONGO_URL.
  • Documentation: The README covers setup, API endpoints, and the companion extension. While minimal, it is sufficient for experienced Go/React developers to bootstrap quickly.
  • Community: MIT licensing and an active GitHub repo foster contributions; the Chrome extension demonstrates a living ecosystem.

Use Cases

  • Personal Media Server: Run on a NAS or Raspberry Pi to stream music from Spotify playlists using YouTube as the backend.
  • Embedded Media Player: Integrate Stretto’s API into a custom smart‑home dashboard or IoT device that requires music playback.
  • Developer Sandbox: Use the sync API to experiment with real‑time collaboration features in a test environment.

Advantages Over Alternatives

  • Zero Vendor Lock‑In: Unlike commercial players, Stretto uses freely available streaming sources and stores all metadata locally.
  • Lightweight & Fast: Go’s compiled binary delivers low latency, while MongoDB’s document model suits music metadata.
  • Open Source & Extensible: MIT license allows modification; the architecture encourages adding new providers or extending functionality without touching core logic.

In sum, Stretto offers a solid foundation for developers looking to build or extend self‑hosted music services with minimal friction and maximum control.

Open SourceReady to get started?

Join the community and start self-hosting Stretto today

Weekly Views

Loading...
Support Us
Most Popular

Infrastructure Supporter

$5/month

Keep our servers running and help us maintain the best directory for developers

Repository Health

Loading health data...

Information

Category
other
License
MIT
Stars
630
Technical Specs
Pricing
Open Source
Database
MongoDB
Docker
Dockerfile
Supported OS
Docker
Author
benkaiser
benkaiser
Last Updated
Sep 20, 2025