Skip to content

LeviHassel/mystify-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Logo

 
Overview Demo System Architecture Example Workflow / Sample Code Database Design

Overview

Preview

Mystify is a Flutter app that builds smart Spotify playlists from custom filters, updating them daily using Firebase Functions.
 

Background

My massive collection of Liked Songs (4,500 and counting) ranges across countless genres and moods, so shuffling it has always been messy and unpredictable. I wanted a way to filter those songs down to the perfect match for each setting, whether that's background music at work or a road trip with friends. While Spotify has some solutions for this, none are customizable or comprehensive... so I decided to build my own.
 

Features

Mystify unlocks the power of your Spotify library. It allows you to create deeply customizable playlists for the right mood and moment based on rules you specify. These playlists automatically update as your library evolves.

Mystify's playlist "recipes" allow you to filter based on a song's sound (e.g. genre, energy, instrumentalness or happiness), its metadata (e.g. release date, title, duration or popularity), and so much more. You can combine any of these filters to create hyper-specific playlists like "Recently Released Popular Danceable Acoustic Songs".
 

Development

This project was largely born from my desire to learn Flutter. Along the way, it's taught me a ton about Dart, Firebase, mobile app development, handling async streams and experimenting with countless state management solutions. It's been really fun and rewarding to work on, and although it's not finished yet, I wanted to share what I've built so far. This README includes a video demo, an overview of the system/database design and some code snippets.


Demo

Mystify Demo


System Architecture

Mystify is built with Flutter, a Dart framework for multi-platform app development, which makes it easy to release on iOS, Android and web.

Because I didn't want the client dealing with long-running API operations, I built out a serverless component with Firebase Functions. These functions, written in Typescript and running on Node.js, handle things like updating playlists in Spotify and generating authentication tokens. Mystify also uses Firebase for its NoSQL DB (Firestore), Authentication, Remote Config and more.

Mystify connects to Spotify over OAuth 2 and performs operations using both its Web API and the spotify-dart package, which I've made some contributions to.


Mystify Architecture


Example Workflow: Create Playlist

Sample Code

Example Workflow

Flutter Flutter app

 

Firebase Firebase Functions

 

Database Design

Below are some example Firestore database entries used in the video demo. They showcase a variety of Playlists and Filters.

A Playlist "recipe" in Mystify today is comprised of Filters that are ANDed together to narrow down your Liked Songs, in order. In the future, I plan to expand Playlists to include:

  • Sources other than Liked Songs (like any playlist, artist or your top played tracks)
  • Tweaks (like sorting by any song attribute and limiting the song count)
  • More flexible options for combining Filters (like OR and XOR)
     

New & Undiscovered

Sad Songs About "You"

New & Undiscovered Sad Songs About You

Party Anthems (CLEAN)

Hidden Gems From the '90s

Party Anthems (CLEAN) Hidden Gems From the '90s