feature: "add label management system" mode: full_auto finalized_at: "2025-12-18T17:42:00" # Include all expanded requirements analysis: problem_statement: | Record labels need a comprehensive management system to: - View and manage their label profile - Invite and manage signed artists - View statistics about their artists and music catalog - Browse and discover potential artists to sign target_users: "Record label owners and managers" core_value: "Centralized label management with artist roster control" scope: mvp_features: - Label profile page showing label info and signed artists - Label dashboard for label owners - Artist roster management (view signed artists) - Artist invitation system (invite artists to join label) - Label profile editing - Label statistics (total artists, songs, plays) data_model: entities: - name: LabelInvitation fields: [id, labelId, artistId, status, message, expiresAt, createdAt, updatedAt] relations: [label, artist] api_endpoints: - GET /api/labels/[id] - PUT /api/labels/[id] - GET /api/labels/[id]/invitations - POST /api/labels/[id]/invitations - DELETE /api/labels/[id]/invitations/[invitationId] - GET /api/artists/[id]/invitations - POST /api/artists/[id]/invitations/[invitationId]/respond - GET /api/labels/[id]/stats - DELETE /api/labels/[id]/artists/[artistId] ui_structure: pages: [LabelProfilePage, LabelDashboardPage, LabelEditPage, LabelInvitationsPage] components: [LabelCard, LabelHeader, LabelStats, ArtistRoster, InvitationCard, InviteArtistModal, LabelProfileForm] acceptance_criteria: - criterion: "Label profile page shows label info and artist roster" verification: "Navigate to /label/[id], verify label name, description, logo, and list of signed artists display correctly" - criterion: "Label dashboard accessible to label owners only" verification: "Login as label owner, navigate to /label/dashboard, verify dashboard loads with management tools" - criterion: "Label profile can be edited" verification: "Navigate to /label/settings, update name/description/logo, save, verify changes persist" - criterion: "Label can send invitation to artist" verification: "From dashboard, click invite artist, select artist, send invitation, verify invitation created" - criterion: "Artist can view received invitations" verification: "Login as artist, check invitations, verify pending invitation from label appears" - criterion: "Artist can accept invitation and join label" verification: "Accept invitation, verify artist now shows label affiliation, appears in label roster" - criterion: "Artist can decline invitation" verification: "Decline invitation, verify invitation removed from pending list, artist remains independent" - criterion: "Label can cancel pending invitation" verification: "From label dashboard, cancel invitation, verify invitation deleted" - criterion: "Label statistics display correctly" verification: "View label profile/dashboard, verify artist count, song count, total plays statistics" - criterion: "Label can remove artist from roster" verification: "From label dashboard, remove artist, verify artist no longer associated with label" - criterion: "TypeScript builds without errors" verification: "Run npm run build, exit code = 0"