The Fluttify Backend is a robust Node.js application powering the Fluttify platform's intelligent playlist management system. It provides a sophisticated API layer for automated playlist generation, social features, and seamless Spotify integration.
- Automated Refresh System: Scheduled playlist updates using Agenda.js
- Smart Track Selection:
- Algorithmic selection from users' top tracks across multiple time ranges
- Genre-based filtering with hierarchical genre mapping
- Deduplication Engine: Intelligent handling of duplicate tracks across multiple contributors
- Secure OAuth Flow: Robust Spotify authentication implementation
- JWT-based Security: Secure token management and request authorization
- Session Management: MongoDB-based session storage with secure cookie handling
- Scalable Endpoints: Well-structured API for playlist management and social features
- Real-time Updates: Efficient playlist synchronization system
- Rate Limiting: Smart handling of Spotify API rate limits with automatic retry logic
- Runtime: Node.js with Express framework
- Database: MongoDB for metadata and session storage
- Job Scheduling: Agenda.js for automated tasks
- Caching: Redis for performance optimization
spotify-web-api-node: Official Spotify Web API integrationagenda: Advanced job schedulingjsonwebtoken: Secure authentication handlingexpress-session: Session managementmongodb: Database operations
- CORS protection
- Secure session handling
- Environment-based configuration
- HTTPS enforcement
- Clone the repository
- Install dependencies:
npm install
- Configure environment variables:
SPOTIFY_API_ID=your_spotify_client_id SPOTIFY_CLIENT_SECRET=your_spotify_secret MONGODB_CONNECTION=your_mongodb_uri JWT_SECRET=your_jwt_secret
- Start the server:
npm run dev
POST /auth/login: Initiate Spotify OAuth flowGET /auth/callback: Handle Spotify OAuth callback
GET /fluttify/myplaylists: Retrieve user's playlistsPOST /fluttify/playlist: Create new playlistPUT /fluttify/playlist: Update playlist settingsDELETE /fluttify/playlist: Remove contributor from playlist
GET /fluttify/community: Browse community playlistsPUT /fluttify/like: Like a playlistDELETE /fluttify/like: Unlike a playlist
The application follows a service-based architecture with clear separation of concerns:
- Routes: API endpoint definitions and request handling
- Services: Core business logic implementation
- Jobs: Background task management
- Middleware: Request processing and authentication
This project is licensed under the MIT License - see the LICENSE file for details.
- Fluttify Frontend: Flutter-based frontend application
