diff --git a/README.md b/README.md index dc0d009..f7bc259 100644 --- a/README.md +++ b/README.md @@ -6,4 +6,9 @@ Repository for team IT2810-H26-T11 in IT2810-H26. Read [docs/CONTRIBUTING.md](/docs/CONTRIBUTING.md) for details on how to contribute to the repository. -For using the NixOS direnv functionality, refer to [docs/direnv.md](/docs/direnv.md) for more information. \ No newline at end of file +For using the NixOS direnv functionality, refer to [docs/direnv.md](/docs/direnv.md) for more information. + +## Documentation + +For documentation in this repository, check the `docs` folder. +Each file will contain a short description of what it documents. diff --git a/docs/PRD.md b/docs/PRD.md index e16239f..95349ab 100644 --- a/docs/PRD.md +++ b/docs/PRD.md @@ -1,53 +1,77 @@ # Product Requirement Document ## Overview + A community-driven platform for users to review, rate, and discover music albums and songs. The "Letterboxd" for music. ## Problem + Music review platforms primarily aggregate professional criticism, but lack a community-driven space where fans can share their own reviews and discover music socially through peer ratings and recommendations. ## Target User + Casual listeners, music enthusiasts, and collectors. ## Core Features + ### Display info on songs and albums + Users should be able to view song name, album, artist, and release year of a song. In addition, users should be able to view album name and songs in that album when viewing an album. ### Review an item + Users should be able to add a rating on a scale of 1–10 and optionally write a short text review. Reviews are persisted in the database. ### View other users' reviews + Users should be able to view the average rating of an item, as well as individual reviews sorted by date. ### Create a list of songs, albums, or artists + Users should be able to create an empty list with a name, then add or remove songs, albums, or artists. ### Search and filter catalog + Users should be able to search by artist name, release year, and song name (or album name), and filter results by artist. ### Sort the catalog + Users should be able to sort by release year, song name, or album name. ## Optional Features + ### Integration with music services + Enable music playback through integrations with services such as Spotify. ## Non-functional/Technical requirements + Defined further in the technical specification: + - Accessibility: 100% on Lighthouse audit for accessibility - Testing: Vitest (components), E2E, API tests - Frontend: React, TypeScript, Vite - Backend: GraphQL, TypeScript +## Questions and answers -## Open Questions (Unresolved requirements) - Should users be identified per machine or through registered accounts? + - This is something for the backlog. To start, reviews will be anonymous and not tied to user accounts. - What should the primary review unit be: songs or albums? + - The priority is to get song reviews working. If time allows, we would like to add reviews for whole Albums. An edgecase here is singles (EPs), which we will handle as albums. - What are the data sources for songs and albums? + - We will be using the Datacogs dataset available here: + - Primary focus is on adding a small set of albums and artists, before adding more later on. The limiting factor, is the storage space on the VM. - Should all lists and reviews be public, or should users have the option to add friends and set access to public, private, or link-shareable? + - All reviews should be public. Access control is out of scope - Pagination or infinite scroll? + - Pagination. Allowing for 25, 50 or 100 items per page. + - Sort items by artist (by default), and when filtering go to a custom filter. Might need to be reviewed later. - Should ratings allow for half-stars? + - Stars on scale 1 - 10. Present with a star icon, with a number next to it. - Should reviews support Markdown? + - Only sanitised text may be stored. Need to sanitise the input both in the frontend and backend to prevent abuse ## Success Metrics + - 90% of searches return results in <500ms for a catalog of 10K items. diff --git a/docs/technical-choices.md b/docs/technical-choices.md new file mode 100644 index 0000000..6321b0c --- /dev/null +++ b/docs/technical-choices.md @@ -0,0 +1,20 @@ +# Technical decisions made + +This document will detail the technical choices and decisions made throughout the project. We will note both the decisions, and the reasoning behind it + +## Local and session storage + +In local and session storage we will store the following. + +### Localstorage + +In local storage, we will be storing the following: + +- **Favourites** - Users can store their favourite albums for later filtering. + +### Session storage + +We want to store: + +- **Current page number** - For user experience in case of page reloads +- **Current filter** - For user experience in the case of page reloads