My Largest Solo Project

Someone asked me recently: "What's the largest project you've ever done?" The answer is easy: My year-long Node.JS capstone I wrote back when I was in school. I not-so-cleverly called it "BoomBox".

BoomBox is a Node.JS media server meant to run on a Rasperry Pi. I started by outlining the basic functionality of the system:

  1. What would it do, and
  2. How would it work?

I wanted the server to store audio and stream it to a Bluetooth speaker. I also wanted full control over the playlist from any phone. These basic requirements morphed slightly throughout the project, but at least my main goal was defined and eventually achieved.

I chose Mongo for data storage and Node.JS for its simple event-based architecture. I spent a ton of time researching audio metadata and wrestling with different audio recognition npm packages until I settled for recording the audio via a separate python program, python-discid.

Next I began designing and building the API which served audio metadata - artists, albums, and song names; this would be used for to the frontend web app / remote control. While I was not initially a fan of Node.JS (I prefer coding ON a server as opposed to coding THE server), I found my ultimate joy creating the API for this project. I documented the API via APIBlueprint which allowed me to dynamically generate an API documentation website with no added hassle. To date, I still consider that API (all four endpoints! ;) as the coolest thing I've ever done.

* ### Manage tracks ###
* GET          /track
* POST         /track/:id
* PUT          /track/:id
* DELETE       /track/:id
* Routes for getting, creating, updating, and deleting song tracks by ID.
* ID is required for all except GET.
app.get(api.urlVersion+"/track(/:id)?", function(req, res) {

The final piece of this project was the remote control. I built a web page into boombox which and allowed users to browse the stored audio files and play/pause skip through the music just like any other music app.

* play a track, artist, or album by ID
* @param {string} type - one of "track","album","artist"
* @param {string} id - unique ID of the item to play
* @param {playResponse} callback - result of the play action
* @see Playlist#play
this.playStream = function(type, id, callback) {

I can't overstate how much I learned on this project. I purposely chose technologies I was unfamiliar with; this forced me to grow out of my comfort zone and learn new things. The most surprising aspect to me was how much time this capstone consumed due to its high research level. I spent a full year working on this, totalling over 200 commits and 100+ hours. Wow!

Jul 03, 2022