How folty7/lyra works
Lyra turns a Spotify library into user-curated playlists: users authenticate, load library and listening data, ask Gemini to group tracks by selected criteria, review and save suggestions, then create playlists in Spotify. The map includes the dashboard’s analytics and settings as supporting capabilities. API routes and several screens were not sampled; their paths and responsibilities are supported by the tree and README, so uncertain internal wiring is omitted.
Main entry points: DashboardLayout.jsx Dashboard shell · axios.js API client · server.js Express server · useTracksStore.js Library cache
Components 17
Frontend experience
- App routes
fe/src/App.jsx - Dashboard shell
fe/src/layouts/DashboardLayout.jsx - Library overview
fe/src/pages/dashboard/Overview.jsx - Library browser
fe/src/pages/dashboard/Library.jsx - AI sort
fe/src/pages/dashboard/Sort.jsx - Settings
fe/src/pages/dashboard/Settings.jsx - Library cache
fe/src/store/useTracksStore.js - Saved suggestions
fe/src/store/useStore.js - API client
fe/src/api/axios.js
Backend API
- Express server
be/server.js - Session auth
be/middleware/auth.js - API endpoints
be/routes/api.js
Domain services
- Spotify operations
be/services/spotifyService.js - AI grouping
be/services/geminiService.js
External services
- Spotify API
- Google Gemini
Other components
- Spotify user
Connections 27
- Spotify user → App routes: navigates
- App routes → Dashboard shell: routes dashboard
- Dashboard shell → Library overview: renders
- Dashboard shell → Library browser: routes library
- Dashboard shell → AI sort: routes sorting
- Dashboard shell → Settings: routes settings
- Dashboard shell → API client: loads profile
- Dashboard shell → Library cache: loads library
- Library overview → Library cache: reads analytics
- Library overview → Saved suggestions: reads saved playlists
- Library browser → Library cache: reads tracks
- AI sort → Library cache: uses tracks
- AI sort → API client: requests grouping
- AI sort → Saved suggestions: saves suggestions
- Saved suggestions → API client: submits playlists
- Settings → API client: uses API key
- Library cache → API client: fetches library and top data
- API client → Express server: sends API requests
- Express server → Session auth: applies auth
- Express server → API endpoints: dispatches API
- Session auth → Spotify API: refreshes tokens
- API endpoints → Spotify operations: requests track and playlist operations
- API endpoints → AI grouping: requests track grouping
- Spotify operations → Spotify API: reads tracks and creates playlists
- AI grouping → Google Gemini: generates groups
- Spotify user → Express server: starts OAuth
- Express server → Spotify API: authorizes and exchanges code