OpenMusic is a backend service that implements CRUD operation. It allows you to add song, playlist, albums, collaborate a playlist, with authentication and authorization feature.
Here's the link to the consumer source code
- This version introduces a "cleaner" way to create a RESTful API using the Hapi plugin.
- Validation is done using
Joi. - Using
node-postgresto interact with PostgreSQL in a Node app. - Implements the migration technique to manipulate table structures using
pgm.
- Mandatory criteria
- CRUD
/albumsendpoint (use plugin) - CRUD
/songsendpoint (use plugin) - Data validation on both endpoints using
Joi - Error handling (use
onPreResponseevent extension from Hapi) - Use database and
dotenv
- CRUD
- Optional criteria
- Display a list of songs in an album
- Query parameter for song search
- Fulfill all Postman requests (API testing)
- Use
ESLintand one of the style guides - Clean code
- To avoid
bindingerrors:- Use arrow functions in route files (preferred, lighter, no need to install any packages)
- Use the
auto-bindpackage.
OpenMusic V1 implements hapi plugin, validation and database.
- Implements authentication and authorization using token based schema, JWT specifically.
- Learn how to normalize a database.
- Implements foreign key
- Introduces a way to implement collaboration feature.
- Mandatory Criteria
- Implements user registration and authentication
- Playlist management feature
- Implements foreign key in tables
- Data validation
- Error Handling
- Maintain the OpenMusic V1 features
- Optional Criteria
- Playlist collaboration feature
- Playlist activities history
- Maintain the OpenMusic V1 features
For references, follow the ERD provided by dicoding. This is optional tho.
OpenMusic V2 implements authentication & authorization using jwt, normalize and use foreign key in a database, also learn how to create simple collaboration feature.
To create a new account (sign up), clients should use the POST /users endpoint. To log in to an existing account, they should use the POST /authentications endpoint.
- Implements message broker using rabbitmq to decouple services and reduce server workload.
- Use FS or Amazon S3 Bucket to store object.
- Implements server-side caching with Redis or Memurai.
This time, there's no optional criteria, everything are mandatory.
- Export songs in playlists
- Upload album cover
- Ability to like/favorites a specific album
- Implements server-side caching.
- Maintain OpenMusic V1 & V2
- For reference, they provides ERD to follow. It is students choice to use the ERD they've provided.
- Run postman tests sequentially and exclude
Uploadtests before running a collection. ForUploadtests tho, it has to run without collections, it will always be failed otherwise. - Create an object to only store sensitive information. So, it will replace the
process.env.XXXsyntax.
OpenMusic V3 implements a message broker using RabbitMQ to decouple services and reduce server workload. It allows the use of either FS or Amazon S3 Bucket to store objects and introduces server-side caching with Redis or Memurai.