Bedrock-API is the engine under the hood of the Bedrock streaming app. It's a high-performance gRPC server that talks to multiple music platforms at once, so you don't have to.
Instead of juggling different APIs for Spotify, SoundCloud, and Deezer, Bedrock gives you one clean, normalized interface. It handles the heavy lifting parallel searches, metadata normalization, and even "bridging" non-streamable tracks by finding playable alternatives on other platforms automatically.
It includes a built-in HTTP Streaming Proxy that handles seeking and caching, so you can use stream/cover urls regardless of the country you live in.
- Multi-Provider Aggregation: Search and fetch tracks, albums, artists, and playlists from Spotify, SoundCloud, Deezer, and more.
- Cross-Platform Bridge: Automatically resolve non-streamable tracks (Spotify/Deezer) to playable SoundCloud streams.
- Built-in Streaming Proxy: High-performance HTTP proxy with support for range requests and true
io.Copystreaming. - Lyrics Integration: Synced and plain-text lyrics via LrcLib (Genius support in progress).
- Concurrent Performance: Fans out requests to providers in parallel using Go's high-concurrency primitives.
- Normalized Schema: Unified gRPC/Protobuf models for all music entities, regardless of source.
- Go 1.24+
- PostgreSQL 13+
- Docker (optional)
- Git (for submodule initialization)
Create a .env file in the root directory and add your provider credentials:
# Database (REQUIRED)
DATABASE_URL=postgres://user:password@localhost:5432/bedrock
# JWT (REQUIRED)
JWT_SECRET=your_secret_key_here
# Spotify (needed for metadata)
SPOTIFY_CLIENT_ID=your_id
SPOTIFY_CLIENT_SECRET=your_secret
# SoundCloud (comma-separated list of client IDs for rotation)
SOUNDCLOUD_CLIENT_IDS=id1,id2
# YouTube (optional, for age-restricted content)
YOUTUBE_COOKIES=your_cookies_here# Initialize submodules (if cloning for the first time)
git submodule update --init --recursive
# Install dependencies
go mod download
# Set up database (run migrations)
# Make sure DATABASE_URL is set in your .env file
# Run the server
go run ./bedrock_serverThe gRPC server will be available at localhost:50052 and the HTTP proxy at localhost:8080.
# Build the image
docker build -t bedrock-api .
# Run the container
docker run -p 50052:50052 -p 8080:8080 --env-file .env bedrock-apiBedrock is designed to be highly modular. Each provider (Spotify, SoundCloud, YouTube, etc.) is implemented as a separate adapter that satisfies a common interface. The Resolver automatically bridges non-streamable tracks (from Spotify, Deezer, YouTube) to playable SoundCloud streams.
graph TD
Client[gRPC Client] --> Server[Bedrock gRPC Server]
Server --> Resolver[Stream Resolver]
Server --> Spotify[Spotify Provider]
Server --> SoundCloud[SoundCloud Provider]
Server --> Deezer[Deezer Provider]
Server --> YouTube[YouTube Provider]
Resolver --> SoundCloud
Proxy[HTTP Proxy :8080] --> Resolver
Bedrock automatically handles non-streamable tracks through its resolver:
- Spotify tracks: Resolved to playable SoundCloud URLs when direct streaming is unavailable
- Deezer tracks: Similarly bridged to SoundCloud
- YouTube Music: Resolved via Innertube; optionally bridges to SoundCloud for broader compatibility
| Provider | Metadata | Search | Streaming | Playlist | Bridge Support |
|---|---|---|---|---|---|
| Spotify | ✓ | ✓ | ✗ (bridged) | ✓ | SoundCloud |
| SoundCloud | ✓ | ✓ | ✓ | ✓ | — |
| Deezer | ✓ | ✓ | ✗ (bridged) | ✓ | SoundCloud |
| YouTube Music | ✓ | ✓ | ◐ (limited) | ✓ | SoundCloud |
| Yandex | ◐ | ◐ | — | — | — |
| VK | ◐ | ◐ | — | — | — |
✓ = Fully supported | ◐ = Partial/Limited | ✗ = Not supported | — = Not implemented
Bedrock uses PostgreSQL for persistent user storage and JWT tokens for authentication:
- User Registration & Login: gRPC methods handle secure account creation and authentication
- JWT Tokens:
- Access tokens: 15 minutes (for API requests)
- Refresh tokens: 7 days (for obtaining new access tokens)
- Password Security: Passwords are hashed using bcrypt (
golang.org/x/crypto/bcrypt) - Enforcement: gRPC interceptor (
server/middleware/auth_interceptor.go) enforces JWT viaauthorization: bearer <token>header - Database: Migrations in
db/migrations/initialize the user schema. Use yourDATABASE_URLto connect.
Bedrock includes the spotify-wrapper as a git submodule — a local replacement for the public github.com/spotapi/spotapi-go module. This allows us to maintain a custom version of the Spotify client.
After cloning the repository, initialize submodules:
git submodule update --init --recursiveTo pull the latest changes from the submodule:
git submodule update --recursive --remoteAfter updating the submodule, test the changes:
go run ./tests/spotifygo.mod includes a local replace directive:
replace github.com/spotapi/spotapi-go => ./spotify-wrapperThis tells Go to use the local ./spotify-wrapper directory instead of the remote module.
Run integration tests to verify provider functionality:
# Full integration test suite
go run ./tests/
# Per-platform entrypoints
go run ./tests/spotify
go run ./tests/youtube
go run ./tests/auth
go run ./tests/soundcloudRun the linter (PowerShell) before committing:
.\linter.ps1It checks comment patterns and automatically skips generated protobuf files (*pb.go).
Distributed under the MIT License. See LICENSE for more information.

