ibratabian17/lyricsplus

The source code of the YouLy+ API implementation. Built with Golang. It’s a lightweight, high-performance lyrics scraper and provider.

Go

41

49 commits

updated Oct 14, 2026

See the code

README

LyricsPlus Backend

This is the backend service for LyricsPlus, primarily functioning as a lyrics scraper and provider for Youly+. Its main purpose is to fetch platform-specific lyrics timelines for users.

Features

  • Multi-Source Scraping: Aggregates lyrics from various sources (e.g., Apple Music, Musixmatch, Spotify, QQ Music).
  • Platform-Specific Timelines: Provides synchronized lyrics tailored for specific platforms.
  • User Submissions: Supports user contributions for synchronized lyrics.
  • Song Catalog Search: Provides a search functionality for the song catalog.
  • Advanced Similarity Matching: Matches songs across different services.
  • Caching: Caches lyrics on Google Drive to optimize response times.

How It Works

The backend operates by exposing a set of API endpoints that allow clients to fetch lyrics, metadata, and interact with the song catalog. It intelligently queries various supported sources, processes the retrieved data, and returns the most accurate and synchronized lyrics available. To optimize performance and reduce redundant scraping, uncached lyrics are stored on Google Drive after their initial retrieval.

API Endpoints

For a detailed list and explanation of all API endpoints, please refer to docs/endpoints.md.

Quick start

Requires Go 1.27+ and (optionally) make / Docker.

# local
make build          # -> bin/server
make run            # http://localhost:3000

# docker
make docker-up      # build + run via docker-compose (healthcheck attached)

Smoke test:

curl "localhost:3000/v1/lyrics/get?title=Hello&artist=Adele"
curl localhost:3000/health

Configuration

All configuration is environment-driven with sensible defaults (see internal/config/config.go). Notable variables:

VariableDefaultDescription
PORT3000HTTP listen address
DISABLE_LOGGINGfalseSet true to turn the logger off entirely
LOG_LEVELinfodebug | info | warn | error
LOG_FORMATtexttext | json
RATE_LIMIT_REQUESTS20Sliding-window requests per IP
RATE_LIMIT_WINDOW_MS10000Window length in ms
MAX_CONCURRENCY15000Global in-flight requests before 503
MAX_URL_BYTES4096Reject longer request URLs with 414
MAX_QUERY_PARAMS20Reject requests with too many query params
MAX_QUERY_VALUE_LEN500Reject query values longer than this
PROVIDER_TIMEOUT_MS8000Per-provider fetch timeout
ALLOW_SUBMISSIONStrueEnable/disable the UGC submit endpoint
JWT_SECRETdev defaultHMAC secret for PoW challenge tokens
LYRICSPLUS_POW_DIFFICULTY5Leading-zero bits required for nonce
LYRICSPLUS_CHALLENGE_TTL_MS600000Challenge token lifetime
MAX_BODY_BYTES1048576Submit body limit (413)
SQLITE_PATHdatabase/lyrics_cache.dbLyric cache DB location
GDRIVE_ENABLEDtrueGoogle Drive caching/sync on start
DAILY_DUMP_ENABLEDfalsePeriodic DB snapshot + GDrive upload

Provider credentials (Spotify, Musixmatch, Apple, QQ, Deezer) are read from their matching *_COOKIE / _TOKEN / _ID environment variables; leave unset to rely on the built-in defaults.

API surface

MethodPathPurpose
GET/v1/lyrics/getLegacy flat V1 lyrics
GET/v2/lyrics/getCanonical V2 lyrics
GET/v1/ttml/getApple Music TTML output
GET/v1/raw/getUntouched upstream payload
GET/v1/songlist/searchCatalog search across providers
GET/v1/metadata/getApple Music track metadata
GET/v1/lyricsplus/challengeIssue PoW challenge token
POST/v1/lyricsplus/submitSubmit UGC lyrics (PoW-gated)
GET/healthLiveness probe
GET/readyzReadiness probe (DB ping)
GET/openapi.yamlOpenAPI 3.0.3 spec
GET/docsSwagger UI viewer
GET/Service banner

See docs/endpoints.md for parameter and response details and docs/architecture.md for the component model.

Development

make test-race      # unit + black-box HTTP tests with the race detector
make lint           # golangci-lint (falls back to go vet if not installed)
make fmt-check      # gofmt gate (CI enforces this too)
make hooks-install  # enable the pre-commit hook (.githooks/pre-commit)

Build version injection:

VERSION=v1.2.3 make build

The version is reported by /health and /readyz.

Documentation

For codebase details, architecture, and contribution guidelines, refer to the docs/ directory.

Contributing

We welcome contributions to the LyricsPlus Backend. Please refer to the docs/contributing.md for detailed guidelines on how to contribute, including code structure, style, and submission process.

License

This project is licensed under the Apache License 2.0.

ibratabian17/lyricsplus

The source code of the YouLy+ API implementation. Built with Golang. It’s a lightweight, high-performance lyrics scraper and provider.

Go

41

49 commits

updated Oct 14, 2026

See the code

README

LyricsPlus Backend

This is the backend service for LyricsPlus, primarily functioning as a lyrics scraper and provider for Youly+. Its main purpose is to fetch platform-specific lyrics timelines for users.

Features

  • Multi-Source Scraping: Aggregates lyrics from various sources (e.g., Apple Music, Musixmatch, Spotify, QQ Music).
  • Platform-Specific Timelines: Provides synchronized lyrics tailored for specific platforms.
  • User Submissions: Supports user contributions for synchronized lyrics.
  • Song Catalog Search: Provides a search functionality for the song catalog.
  • Advanced Similarity Matching: Matches songs across different services.
  • Caching: Caches lyrics on Google Drive to optimize response times.

How It Works

The backend operates by exposing a set of API endpoints that allow clients to fetch lyrics, metadata, and interact with the song catalog. It intelligently queries various supported sources, processes the retrieved data, and returns the most accurate and synchronized lyrics available. To optimize performance and reduce redundant scraping, uncached lyrics are stored on Google Drive after their initial retrieval.

API Endpoints

For a detailed list and explanation of all API endpoints, please refer to docs/endpoints.md.

Quick start

Requires Go 1.27+ and (optionally) make / Docker.

# local
make build          # -> bin/server
make run            # http://localhost:3000

# docker
make docker-up      # build + run via docker-compose (healthcheck attached)

Smoke test:

curl "localhost:3000/v1/lyrics/get?title=Hello&artist=Adele"
curl localhost:3000/health

Configuration

All configuration is environment-driven with sensible defaults (see internal/config/config.go). Notable variables:

VariableDefaultDescription
PORT3000HTTP listen address
DISABLE_LOGGINGfalseSet true to turn the logger off entirely
LOG_LEVELinfodebug | info | warn | error
LOG_FORMATtexttext | json
RATE_LIMIT_REQUESTS20Sliding-window requests per IP
RATE_LIMIT_WINDOW_MS10000Window length in ms
MAX_CONCURRENCY15000Global in-flight requests before 503
MAX_URL_BYTES4096Reject longer request URLs with 414
MAX_QUERY_PARAMS20Reject requests with too many query params
MAX_QUERY_VALUE_LEN500Reject query values longer than this
PROVIDER_TIMEOUT_MS8000Per-provider fetch timeout
ALLOW_SUBMISSIONStrueEnable/disable the UGC submit endpoint
JWT_SECRETdev defaultHMAC secret for PoW challenge tokens
LYRICSPLUS_POW_DIFFICULTY5Leading-zero bits required for nonce
LYRICSPLUS_CHALLENGE_TTL_MS600000Challenge token lifetime
MAX_BODY_BYTES1048576Submit body limit (413)
SQLITE_PATHdatabase/lyrics_cache.dbLyric cache DB location
GDRIVE_ENABLEDtrueGoogle Drive caching/sync on start
DAILY_DUMP_ENABLEDfalsePeriodic DB snapshot + GDrive upload

Provider credentials (Spotify, Musixmatch, Apple, QQ, Deezer) are read from their matching *_COOKIE / _TOKEN / _ID environment variables; leave unset to rely on the built-in defaults.

API surface

MethodPathPurpose
GET/v1/lyrics/getLegacy flat V1 lyrics
GET/v2/lyrics/getCanonical V2 lyrics
GET/v1/ttml/getApple Music TTML output
GET/v1/raw/getUntouched upstream payload
GET/v1/songlist/searchCatalog search across providers
GET/v1/metadata/getApple Music track metadata
GET/v1/lyricsplus/challengeIssue PoW challenge token
POST/v1/lyricsplus/submitSubmit UGC lyrics (PoW-gated)
GET/healthLiveness probe
GET/readyzReadiness probe (DB ping)
GET/openapi.yamlOpenAPI 3.0.3 spec
GET/docsSwagger UI viewer
GET/Service banner

See docs/endpoints.md for parameter and response details and docs/architecture.md for the component model.

Development

make test-race      # unit + black-box HTTP tests with the race detector
make lint           # golangci-lint (falls back to go vet if not installed)
make fmt-check      # gofmt gate (CI enforces this too)
make hooks-install  # enable the pre-commit hook (.githooks/pre-commit)

Build version injection:

VERSION=v1.2.3 make build

The version is reported by /health and /readyz.

Documentation

For codebase details, architecture, and contribution guidelines, refer to the docs/ directory.

Contributing

We welcome contributions to the LyricsPlus Backend. Please refer to the docs/contributing.md for detailed guidelines on how to contribute, including code structure, style, and submission process.

License

This project is licensed under the Apache License 2.0.