Below is a detailed document outlining the full feature list, backend architecture, and considerations for your app. This document is designed to help you and your team align on the vision, scope, and technical implementation of the MVP and potential future features. It also incorporates your tech stack (.NET, Spotify API, Supabase, React, Rive) and the inspiration from apps like Attics and Dustbunnies.
Project Document: "ShelfSpinner" (Working Title)
1. Project Overview
ShelfSpinner is a tool designed for power Spotify users with large saved album libraries. The app helps users rediscover forgotten albums, manage their listening "to-do list," and eventually share curated shelves with friends. Inspired by apps like Attics and Dustbunnies, the app uses a nostalgic, cozy aesthetic (e.g., a virtual shelf) to create an engaging user experience.
1.1 Goals
- Primary Goal: Help users rediscover saved Spotify albums they haven’t listened to in a while.
- Secondary Goal: Provide tools to organize and curate saved albums (e.g., themed shelves).
- Long-Term Goal: Introduce social features, such as shared shelves and recommendations.
1.2 Target Audience
- Power Spotify users with large saved album libraries.
- Music enthusiasts who enjoy curating and rediscovering music.
- Users who appreciate nostalgic, gamified, or visually engaging app experiences.
1.3 Tech Stack
- Frontend: React (with Rive for animations)
- Backend: .NET (C#) for API and business logic
- Database: Supabase (PostgreSQL) for user data and app state
- Third-Party APIs: Spotify Web API for authentication and music data
- Hosting: Supabase for database, .NET backend hosted on a cloud provider (e.g., Azure, AWS, or Vercel)
2. Feature List
Below is a comprehensive feature list, divided into MVP Features (required for the initial release) and Future Features (potential enhancements for later iterations).
2.1 MVP Features
2.1.1 Core Functionality
-
Spotify Authentication
- Users can log in to the app using their Spotify account (OAuth 2.0 via Spotify API).
- Store Spotify access and refresh tokens securely in Supabase.
- Allow users to unlink their Spotify account from the app.
-
Album Rediscovery ("Reroll")
- Fetch the user’s saved albums from Spotify (using the
GET /me/albums endpoint).
- Filter albums based on listening history (using the
GET /me/tracks and GET /me/player/recently-played endpoints to determine unlistened or "stale" albums).
- Present a single album to the user with key details (album art, title, artist, release year).
- Provide two primary actions:
- Listen: Redirect the user to the album on Spotify (web or app, depending on device).
- Reroll: Fetch a new unlistened album and display it.
-
Shelf Display
- Display a virtual shelf in the app UI, styled to match the nostalgic/cozy aesthetic.
- Allow users to "place" albums on the shelf manually (e.g., drag-and-drop or select from saved albums).
- Support basic shelf customization (e.g., name the shelf, such as "Jazz Classics" or "To Listen").
-
Settings
- Theme Toggle: Switch between light and dark modes.
- Spotify Account Management: View linked Spotify account, unlink account.
- Account Deletion: Allow users to delete their ShelfSpinner account and associated data (GDPR/CCPA compliance).
2.1.2 User Experience Enhancements
-
Onboarding Flow
- Welcome screen explaining the app’s purpose.
- Prompt for Spotify authentication.
- Brief tutorial on how to use the "Reroll" feature and shelf.
-
Loading States
- Display loading animations (using Rive) while fetching data from Spotify or Supabase.
- Handle errors gracefully (e.g., "Failed to fetch albums, please try again").
-
Responsive Design
- Ensure the app works seamlessly on desktop, tablet, and mobile devices (React with responsive CSS).
2.1.3 Data Privacy and Security
-
Secure Token Storage
- Store Spotify access and refresh tokens securely in Supabase (encrypted).
- Use HTTPS for all API communications.
-
GDPR/CCPA Compliance
- Provide clear privacy policy and terms of service.
- Allow users to delete their account and data.
2.2 Future Features (Post-MVP)
2.2.1 Enhanced Rediscovery
-
Advanced Filtering
- Allow users to filter albums by genre, release year, or artist.
- Add a "priority" system for albums (e.g., mark albums as "must listen soon").
-
Listening Streaks
- Gamify the experience by tracking how many rediscovered albums the user listens to in a row.
- Award badges or achievements (e.g., "Rediscovery Master").
2.2.2 Social Features
-
Shared Shelves
- Allow users to create public or private shelves that can be shared with friends.
- Enable collaborative shelves where multiple users can add albums.
-
Recommendations
- Suggest albums based on friends’ shelves or listening habits (requires Spotify API permissions).
2.2.3 Shelf Customization
-
Themed Shelves
- Allow users to create multiple shelves with different themes (e.g., "Summer Vibes," "Nostalgia").
- Add visual customization options (e.g., shelf styles, backgrounds).
-
Dynamic Shelves
- Automatically populate shelves based on criteria (e.g., "Recently Added," "Unlistened Classics").
2.2.4 Integrations
- Last.fm Integration
- Pull additional listening history data from Last.fm to enhance album rediscovery.
- Apple Music Integration
- Support for Apple Music users (requires Apple Music API integration).
2.2.5 Analytics
- User Insights
- Provide users with stats about their listening habits (e.g., "You’ve rediscovered 10 albums this month!").
- Display trends (e.g., most rediscovered genres).
3. Backend Architecture
The backend is responsible for handling user authentication, Spotify API interactions, data storage, and business logic. Below is a detailed breakdown of the backend architecture.
3.1 Components
3.1.1 .NET Backend (API)
- Purpose: Serve as the central API for the React frontend, handling authentication, Spotify API calls, and business logic.
- Framework: ASP.NET Core (RESTful API).
- Endpoints:
- Authentication:
POST /auth/spotify: Initiate Spotify OAuth flow (redirect to Spotify login).
GET /auth/spotify/callback: Handle Spotify OAuth callback, store tokens in Supabase.
POST /auth/unlink: Unlink Spotify account.
POST /auth/delete-account: Delete user account and data.
- Album Rediscovery:
GET /albums/reroll: Fetch a random unlistened album for the user.
GET /albums/saved: Fetch the user’s saved albums (paginated).
- Shelf Management:
GET /shelves: Fetch the user’s shelves.
POST /shelves: Create a new shelf.
PUT /shelves/{id}: Update a shelf (e.g., add/remove albums, rename).
DELETE /shelves/{id}: Delete a shelf.
- Settings:
GET /settings: Fetch user settings (e.g., theme preference).
PUT /settings: Update user settings.
3.1.2 Supabase (Database)
3.1.3 Spotify API Integration
- Purpose: Fetch user data (saved albums, listening history) and redirect users to Spotify for playback.
- Key Endpoints:
GET /me: Fetch user profile (Spotify user ID, email, etc.).
GET /me/albums: Fetch saved albums (paginated).
GET /me/tracks: Fetch saved tracks (to determine if an album has been listened to).
GET /me/player/recently-played: Fetch recently played tracks (to identify unlistened albums).
- Token Management:
- Use Spotify’s OAuth 2.0 flow to obtain access and refresh tokens.
- Store tokens in Supabase and refresh them as needed (handled by .NET backend).
3.2 Data Flow
- User Authentication:
- User clicks "Log in with Spotify" → React frontend redirects to Spotify OAuth.
- Spotify redirects back to .NET backend (
/auth/spotify/callback) → Backend stores tokens in Supabase and sets a session cookie for the user.
- Album Rediscovery:
- User clicks "Reroll" → React frontend calls .NET backend (
/albums/reroll).
- Backend fetches saved albums and listening history from Spotify API → Filters unlistened albums → Returns a random album to the frontend.
- Shelf Management:
- User adds an album to a shelf → React frontend calls .NET backend (
/shelves/{id}) → Backend updates Supabase database.
- Settings:
- User toggles theme → React frontend calls .NET backend (
/settings) → Backend updates Supabase database.
3.3 Error Handling
- Handle Spotify API rate limits (HTTP 429) by implementing exponential backoff.
- Handle token expiration by refreshing tokens automatically.
- Display user-friendly error messages in the frontend (e.g., "Failed to fetch albums, please try again").
3.4 Scalability Considerations
- Use pagination for Spotify API calls to handle users with large libraries.
- Cache frequently accessed data (e.g., saved albums) in Supabase to reduce API calls.
- Deploy the .NET backend on a scalable cloud provider (e.g., Azure App Service, AWS Lambda).
4. Frontend Architecture
4.1 React Components
- App Shell:
- Navigation bar (with links to Home, Shelves, Settings).
- Theme toggle (light/dark mode).
- Home Screen:
- "Reroll" button and album display (album art, title, artist, release year).
- "Listen" and "Reroll" action buttons.
- Shelves Screen:
- List of user shelves (clickable to view details).
- Shelf detail view (drag-and-drop or select albums to add/remove).
- Settings Screen:
- Theme toggle.
- Spotify account status (linked/unlink).
- Delete account button.
- Onboarding Screen:
- Welcome message, Spotify login button, tutorial.
4.2 Rive Animations
- Use Rive for loading animations (e.g., spinning vinyl record).
- Add subtle animations to the shelf (e.g., dust particles, album sliding into place).
4.3 State Management
- Use React Context or Redux for global state (e.g., user authentication, theme preference).
- Use local component state for transient UI state (e.g., drag-and-drop interactions).
5. Development Plan
5.1 Milestones
- Setup and Authentication (1-2 weeks):
- Set up .NET backend, Supabase database, and React frontend.
- Implement Spotify OAuth flow and token storage.
- Core Functionality (2-3 weeks):
- Implement album rediscovery ("Reroll") feature.
- Build basic shelf display and management.
- Settings and UX (1-2 weeks):
- Implement settings (theme toggle, account management).
- Add onboarding flow and loading states.
- Testing and Polish (1 week):
- Test app on multiple devices (desktop, tablet, mobile).
- Fix bugs and polish UI/animations.
- Deployment (1 week):
- Deploy backend to cloud provider.
- Deploy frontend to hosting service (e.g., Vercel, Netlify).
- Set up CI/CD pipeline for future updates.
5.2 Team Roles
- Frontend Developer: Build React components, integrate Rive animations, handle UI/UX.
- Backend Developer: Build .NET API, integrate Spotify API, manage Supabase database.
- Designer: Refine Figma mockups, create additional assets (e.g., icons, backgrounds).
- QA/Tester: Test app functionality, report bugs, ensure cross-device compatibility.
6. Risks and Mitigations
- Spotify API Rate Limits:
- Risk: Users with large libraries may hit rate limits.
- Mitigation: Implement pagination and caching, use exponential backoff for retries.
- Token Security:
- Risk: Improper storage of Spotify tokens could lead to security breaches.
- Mitigation: Use Supabase encryption and HTTPS, follow OAuth best practices.
- User Engagement:
- Risk: Users may not find the "Reroll" feature compelling enough to return.
- Mitigation: Add gamification (e.g., streaks) and social features in future updates.
- Scalability:
- Risk: Backend may struggle with many concurrent users.
- Mitigation: Use scalable cloud hosting, optimize database queries.
7. Next Steps
- Team Meeting:
- Present this document to the team.
- Assign roles and responsibilities.
- Finalize feature prioritization for MVP.
- Development Kickoff:
- Set up project repository (e.g., GitHub).
- Create initial project structure for .NET, Supabase, and React.
- Design Refinement:
- Update Figma mockups based on feedback.
- Create additional assets for animations and UI.
This document provides a solid foundation for your app development. Feel free to adjust the feature list, architecture, or timeline based on team discussions and feedback. Good luck with your meeting and project!