[READ-ONLY] Mirror of https://github.com/takeruhukushima/Shirabe. Shirabe:個人の音楽のリストを記録するアプリ。Spotify URLからMusicBrainのデータをPDSにあげるATProtocolアプリ takeruhukushima.github.io/Shirabe
README.md

Shirabe #

Public alpha: https://takeruhukushima.github.io/Shirabe/

Spotify URLを入口にMusicBrainzまたはユーザー入力から音楽recordを作り、AT Protocol上の利用者自身のPDSへ保存する個人利用向け実験アプリです。

Status #

Shirabe v0.10はExperimental Alphaです。Lexiconとデータ構造の互換性は保証されません。PDSのrecordは公開取得・複製される可能性があります。

Architecture #

  • Astro static frontend for GitHub Pages
  • @atproto/oauth-client-browser public OAuth client
  • Five fm.shirabe.* Lexicons
  • Cloudflare Worker + one SQLite-backed Durable Object
  • MusicBrainz core metadata only
  • No Spotify Web API, YouTube API, or catalog API credentials

Development #

pnpm install
pnpm dev

AT Protocol OAuthのlocal loopback要件に合わせ、http://127.0.0.1:4321/で開いてください。/Shirabe/などの追加パスは不要です。pnpm devはfrontendとローカルMusicBrainz gatewayを同時に起動し、開発時はhttp://127.0.0.1:8787へ自動接続します。

pnpm check
pnpm test
pnpm build
pnpm worker:dev

Deployment #

GitHub PagesとWorkerは別workflowでdeployします。

  • Pages: .github/workflows/deploy-pages.yml
  • Worker: .github/workflows/deploy-worker.yml
  • Worker runtime: worker/wrangler.toml

公開前に次を実環境へ合わせてください。

  • public/client-metadata.jsonのclient_idとredirect_uris
  • astro.config.mjsのsite/baseまたは対応する公開環境変数
  • worker/wrangler.tomlのALLOWED_ORIGINS
  • MUSICBRAINZ_USER_AGENTの実在するproject URL
  • frontendのPUBLIC_MUSICBRAINZ_GATEWAY

Current gateway: https://shirabe-musicbrainz-gateway.takeruf.workers.dev

Cloudflare credentialはGitHub ActionsのWorker deploy jobだけで使用し、frontendやWorker runtimeへ渡しません。

Implemented Alpha Slice #

  • AT Protocol OAuth login, restore, and logout
  • Spotify artist / album / track canonical URL validation
  • MusicBrainz URL lookup, candidate selection, name search, and manual fallback
  • Field provenance and external identifier mapping
  • Spotify transient values excluded from persisted DTOs
  • createRecord for artist and applyWrites + swapCommit for related artist/entity creation
  • PDS library listing, local filtering, and JSON backup export
  • App/schema/migration status display
  • Seven-route MusicBrainz gateway with strict validation and global 1 req/sec serialization

リスト編集、画像、ZIP import/export、保存後のMusicBrainz差分採用、完全なIndexedDB索引は後続alpha作業です。