feat(migrate-tool): add track migration tool#14392
Open
dylanjeffers wants to merge 1 commit into
Open
Conversation
A small Vite + React SPA backed by Vercel functions + Supabase that lets an artist request migration of tracks from an old Audius account they've lost access to onto a new account they control. Every migration sits in a pending queue until an Audius team member approves it via an admin route gated by a bearer token — the README spells out that identity verification of the requester has to happen out-of-band. The frontend uses the SDK's PKCE OAuth flow with apiKey only; on approval the backend re-uploads each track via createSdkWithServices using the dev app's API key + bearer token, acting on behalf of the new owner. Designed for migrate.audius.co. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Contributor
🌐 Web preview readyPreview URL: https://audius-web-preview-pr-14392.audius.workers.dev Unique preview for this PR (deployed from this branch). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A small Vite + React SPA + Vercel-functions tool that helps artists move tracks from an old Audius account they've lost access to onto a new account they control. Intended to live at migrate.audius.co.
apiKeyonly). User signs in with new account, enters old handle, previews the tracks, submits.migration_requeststable, exposes admin endpoints gated byADMIN_BEARER_TOKEN.apiKey + bearerTokenviacreateSdkWithServices) fetches each old track's audio + artwork and re-uploads it as the new owner using the OAuth grant. Per-track results are written back to the DB.Approval flow
The README is explicit that identity verification of the requester happens out-of-band (support ticket, Discord DM, etc.). The admin step in this tool is just a gate so nothing executes automatically; the team is responsible for confirming ownership before they click "Approve & execute."
Known limitations (documented in the README)
maxDuration: 300set in vercel.json. For artists with many tracks this should be moved to a queue/cron worker.Verification
npx tsc -bpasses for the SPA and the API functions (no type errors).vite buildwas not verified locally — there's a pre-existingvite-plugin-node-polyfillsresolver issue in this worktree's install that also breakspackages/web/examples/upload, so it isn't specific to this change. A fresh install on Vercel should build cleanly.Test plan
VITE_AUDIUS_API_KEY,AUDIUS_API_KEY,AUDIUS_BEARER_TOKEN,ADMIN_BEARER_TOKEN,SUPABASE_URL,SUPABASE_SERVICE_ROLE_KEY.npm run dev+ sign in with a test account, enter another artist's handle, preview shows tracks.status = 'pending'./admin, unlock withADMIN_BEARER_TOKEN, click Reject — confirm status flips torejected.🤖 Generated with Claude Code