Skip to content

Fluttify-App/fluttify-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

345 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fluttify Backend

Intelligent Playlist Management Engine

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.

🚀 Key Features

🎯 Intelligent Playlist Engine

  • 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

🔐 Advanced Authentication

  • 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

🌐 RESTful API Architecture

  • 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

🛠 Technical Stack

Core Technologies

  • 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

Key Dependencies

  • spotify-web-api-node: Official Spotify Web API integration
  • agenda: Advanced job scheduling
  • jsonwebtoken: Secure authentication handling
  • express-session: Session management
  • mongodb: Database operations

Security Features

  • CORS protection
  • Secure session handling
  • Environment-based configuration
  • HTTPS enforcement

🚀 Getting Started

  1. Clone the repository
  2. Install dependencies:
    npm install
  3. 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
  4. Start the server:
    npm run dev

🔧 API Endpoints

Authentication

  • POST /auth/login: Initiate Spotify OAuth flow
  • GET /auth/callback: Handle Spotify OAuth callback

Playlist Management

  • GET /fluttify/myplaylists: Retrieve user's playlists
  • POST /fluttify/playlist: Create new playlist
  • PUT /fluttify/playlist: Update playlist settings
  • DELETE /fluttify/playlist: Remove contributor from playlist

Community Features

  • GET /fluttify/community: Browse community playlists
  • PUT /fluttify/like: Like a playlist
  • DELETE /fluttify/like: Unlike a playlist

🏗 Architecture

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

👨‍💻 Development Team

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🔗 Related Projects

About

NodeJS Project for Fluttify App

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages