Skip Navigation
Tyrone Williams

Snapmusic

Summary

Snapmusic is a snapchat-like website, but instead of pictures, users share music with other users, and can discover new music from the music charts based on popularity.

Objectives

The main objective with building this site was to get use trying to gain a better understanding of issues faced during development of social media type websites. From a technical side, it was a chance to use Firebase Storage to store and retrieve audio files.

Technologies and Tools

Front-end

  • React for front-end framework with Redux for state management.
  • Cypress for E2E testing.

Back-end

  • NodeJS with express for running the server.
  • MongoDB for database..
  • Redis for caching requests such as chart lists or feeds.
  • Firebase for storing user's images (profile and track covers) and audio files.

Challenges

Approaching the website from the thought process of it being used by a significant number of users, the main challenges were caching and file storage.

If many of the same requests were made, like getting charts or following activity, caching would need to be used in order to prevent the server or database from being overloaded. With the use of Redis, the chart data is about to be cached for 5 minutes at time to allow for easier and quicker retrieval. For profile data, a similar process is used, however the cache is cleared on upload, deletion (24 hours since upload), or removal of the track.

Storing files can quickly become an issue if the server's hard drive becomes full. Storing with Firebase off server does add a bit of latency during some actions (like upload), but allows for easier scaling of the project if needed.