How vitorhasilva/trikatuka works
Trikatuka migrates playlists and saved Spotify items between two accounts. The principal flow authenticates source and destination users, lists transferable content, then transfers selected or all items; playlist transfer preserves order. The graph includes the documented collaborative/public/private/subscribed playlist behavior and album support. Server and client excerpts establish authentication and representative transfer calls; unsampled client wiring and several item-transfer implementations limit which links can be asserted directly.
Main entry points: Spotify.js Spotify requests · RequestHelper.js Sequential action helper · MainCtrl.js Main controller · PlaylistListCtrl.js Playlist transfer UI
Components 23
Server and authentication
- Web and auth server
server.js - Auth callback page
webapp/afterLogin.html
Account and UI
- Angular app routes
webapp/app/app.js - Login controller
webapp/app/controllers/LoginCtrl.js - Main controller
webapp/app/controllers/MainCtrl.js - Account sessions
webapp/app/factories/User.js - Playlist transfer UI
webapp/app/controllers/PlaylistListCtrl.js - Saved tracks UI
webapp/app/controllers/TrackListCtrl.js - Saved albums UI
webapp/app/controllers/AlbumListCtrl.js - Followed artists UI
webapp/app/controllers/ArtistListCtrl.js
Transferable libraries
- Playlist operations
webapp/app/services/PlaylistService.js - Playlist transfer model
webapp/app/factories/Playlist.js - Saved track operations
webapp/app/services/TrackService.js - Saved album operations
webapp/app/services/AlbumService.js - Artist operations
webapp/app/services/ArtistService.js - Spotify requests
webapp/app/services/Spotify.js - Sequential action helper
webapp/app/services/RequestHelper.js
Client runtime
- Angular socket adapter
webapp/js/socket.js - Socket.IO client
webapp/js/socket.io-1.4.5.js - Collection utilities
webapp/js/underscore-min.js
Other components
- User
- Browser
- Spotify API
Connections 36
- User → Browser: uses
README.md - Browser → Angular app routes: opens
webapp/app/app.js - Browser → Web and auth server: requests pages
server.js - Angular app routes → Main controller: routes to
webapp/app/app.js - Angular app routes → Account sessions: initializes
webapp/app/app.js - Login controller → Account sessions: updates accounts
- Login controller → Angular socket adapter: uses
- Angular socket adapter → Socket.IO client: wraps
webapp/js/socket.js - Socket.IO client → Web and auth server: socket events
- Web and auth server → Spotify API: exchanges tokens
server.js - Web and auth server → Auth callback page: serves
server.js - Auth callback page → Browser: returns after login
- Main controller → Playlist transfer UI: shows
- Main controller → Saved tracks UI: shows
- Main controller → Saved albums UI: shows
- Main controller → Followed artists UI: shows
- Playlist transfer UI → Playlist operations: loads playlists
webapp/app/controllers/PlaylistListCtrl.js - Playlist transfer UI → Playlist transfer model: transforms items
webapp/app/controllers/PlaylistListCtrl.js - Playlist transfer UI → Sequential action helper: dispatches transfer
webapp/app/controllers/PlaylistListCtrl.js - Playlist transfer model → Playlist operations: delegates operations
- Saved tracks UI → Saved track operations: uses
- Saved albums UI → Saved album operations: uses
- Followed artists UI → Artist operations: uses
- Playlist operations → Spotify requests: requests playlist data
webapp/app/services/PlaylistService.js - Playlist operations → Sequential action helper: batches track adds
webapp/app/services/PlaylistService.js - Saved track operations → Spotify requests: reads and writes tracks
webapp/app/services/TrackService.js - Saved track operations → Sequential action helper: batches transfers
webapp/app/services/TrackService.js - Saved album operations → Spotify requests: reads and writes albums
webapp/app/services/AlbumService.js - Saved album operations → Sequential action helper: batches transfers
webapp/app/services/AlbumService.js - Artist operations → Spotify requests: reads and follows
webapp/app/services/ArtistService.js - Artist operations → Sequential action helper: batches transfers
webapp/app/services/ArtistService.js - Spotify requests → Spotify API: calls API
- Sequential action helper → Spotify requests: runs actions
- Saved track operations → Collection utilities: maps item IDs
- Saved album operations → Collection utilities: maps item IDs
- Artist operations → Collection utilities: maps artist IDs
webapp/app/services/ArtistService.js