{"id":17829644,"url":"https://github.com/guidefari/spotify-effect","last_synced_at":"2026-04-04T23:04:16.171Z","repository":{"id":177416591,"uuid":"656367498","full_name":"guidefari/spotify-effect","owner":"guidefari","description":null,"archived":false,"fork":false,"pushed_at":"2026-04-02T16:22:44.000Z","size":504,"stargazers_count":0,"open_issues_count":8,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-02T18:39:16.100Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/guidefari.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2023-06-20T20:07:07.000Z","updated_at":"2026-04-02T06:39:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"8ae95d65-0f2b-474c-99d3-a5a41813def6","html_url":"https://github.com/guidefari/spotify-effect","commit_stats":null,"previous_names":["txndai/spotify-effect","guidefari/spotify-effect"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/guidefari/spotify-effect","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guidefari%2Fspotify-effect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guidefari%2Fspotify-effect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guidefari%2Fspotify-effect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guidefari%2Fspotify-effect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guidefari","download_url":"https://codeload.github.com/guidefari/spotify-effect/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guidefari%2Fspotify-effect/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31418288,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T20:09:54.854Z","status":"ssl_error","status_checked_at":"2026-04-04T20:09:44.350Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-27T19:16:53.669Z","updated_at":"2026-04-04T23:04:16.144Z","avatar_url":"https://github.com/guidefari.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# spotify-effect\n\nA TypeScript SDK for the Spotify Web API built with [Effect](https://effect.website/) — a functional, type-safe approach to handling async operations, errors, and observability.\n\n## What is this?\n\nThis is an **isomorphic** (works in both Node.js and browser environments) Effect-based wrapper around the Spotify Web API, inspired by [spotify-web-api-ts](https://github.com/inferrinizzard/spotify-web-api). It provides:\n\n- **Type-safe API calls** with full TypeScript support\n- **Functional error handling** using Effect's composable error management\n- **Built-in retries \u0026 batching** via Effect's request resolvers\n- **OpenTelemetry tracing** for observability (optional, via `SPOTIFY_EFFECT_TRACE=1`)\n- **PKCE OAuth flow** support for browser-based authentication\n- **Comprehensive test coverage** with Vitest\n\n## Packages\n\n- **`@spotify-effect/core`** — Core SDK with API clients, auth flows, and shared helpers\n- **`@spotify-effect/browser`** — Browser-focused package with PKCE/session helpers and `SpotifyBrowser`\n- **`@spotify-effect/otel-node`** — Node OpenTelemetry integration\n\n## Examples\n\n- **`examples/basic`** — Node.js example with tracing\n- **`examples/browser`** — Browser-based PKCE authentication flow\n- **`examples/otel`** — Ready-to-run OpenTelemetry collector stack\n\n## Quick Start\n\n```typescript\nimport { makeSpotifyLayer, Tracks } from \"@spotify-effect/core\";\nimport { Effect } from \"effect\";\n\nconst program = Effect.gen(function* () {\n  const tracks = yield* Tracks;\n  const track = yield* tracks.getTrack(\"4iV5W9uYEdYUVa79Axb7Rh\");\n\n  return track;\n}).pipe(Effect.provide(makeSpotifyLayer({}, { accessToken: \"your-access-token\" })));\n\nEffect.runPromise(program);\n```\n\n## Learning Resources\n\n- [Intro To Effect, Part 1: What Is Effect?](https://ybogomolov.me/01-effect-intro)\n- [Effect Introduction](https://github.com/antoine-coulon/effect-introduction)\n- [Generic batching \u0026 retries examples](https://gist.github.com/mikearnaldi/4a13fe6f51b28ad0b07fd7bbe3f4c49a)\n\n## Observability\n\nRequest and auth flows emit Effect tracing spans at shared boundaries. Enable local tracing with `SPOTIFY_EFFECT_TRACE=1`. See `docs/tracing/otel.md` for setup notes and `examples/otel/` for a ready-to-run collector stack.\n\n## Additional Notes\n\nSee `docs/` for more detailed documentation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguidefari%2Fspotify-effect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguidefari%2Fspotify-effect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguidefari%2Fspotify-effect/lists"}