Skip to content

Conversation

@holubba
Copy link

@holubba holubba commented Sep 22, 2025

Movie Track Licensing API

API for managing track licensing. Built with NestJS, TypeORM, and PostgreSQL.


Setup Instructions

Prerequisites

  • Docker installed
  • Environment variables configured (see .env.example)

Installation

git clone https://github.com/holubba/fullstack-engineer-music-licensing-workflow-challenge
cd fullstack-engineer-music-licensing-workflow-challenge
cp env.example ./.env
docker-compose up -d --build

Running test suite

npm run test:e2e

Tests are made following some guidelines seen in: https://github.com/goldbergyoni/nodejs-testing-best-practices


Assumptions

  • Scenes don't require timestamps, it would be easy to implement but it would overcomplicate the challenge taking more time implementing basically the same logic that I already implemented with the tracks timestamps.

  • CRUD operations for each entity were not required explicitly, so I didn't implement them. It would just take more time and they would basically prove nothing. The required endpoints are all implemented and tested.


Extras

  • I included a Swagger instance on http://localhost:PORT/docs since I wasn't required to make a frontend, but I wanted to make sure that whoever is reading this was going to be able to spin up the project in docker and be able to interact with it without a frontend.

  • I included a license-history feature that lets you track each change in licenses status for better traceablity.


Tech decisions and tradeoffs

  • At some point I considered using postgres intervals for the timestamps but TypeORM is really buggy when interacting with intervals so I ultimately decided to ditch the idea and store timestamps as seconds.

  • I decided to implement the entire challenge in NestJS because it was mentioned in the invitation email as the tech stack and I already had a somehow scaffolded project that I could use to save time. If I had more time available would implement this with DrizzleORM because i prefer it over TypeORM. TypeORM is considered abandonedware by today standards and its not a good package.

  • I implemented e2e tests with testcontainers to test the core logic of the application, this makes it a bit slow (each test suite has to spin up a temporal container and migrate the db). If I had more time I would just test it against a single db saving up time and resources, but since the app isnt that big its not a big deal.

  • I chose to implement a SSE endpoint for the sake of simplicity and because I considered that a Websocket was too much for just updating licenses status. It returns the updated license and its documented in Swagger.

  • I chose to only implement REST endpoint again for the sake of simplicity and also because I could make a good documentation with OpenAPI standards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant