GSoC 2018: Add support for Reviewing and Rating more entities

Tags: #<Tag:0x00007f0508308a18> #<Tag:0x00007f05083088d8> #<Tag:0x00007f0508308798>


Personal information

Name: Divya Prakash Mittal
IRC nick: dpmittal
GitHub: dpmittal
Personal Blog:
LinkedIn: Divya Prakash Mittal
Time Zone: UTC+05:30

Project Overview

After the rating system being implemented in CritiqueBrainz, it is being planned to migrate the ratings which already existed on MusicBrainz to CB. This change will be more effective when all the entities existing on MB can be rated/reviewed on CB.

Presently, on CB, a user can review/rate only three entities i.e. Release Groups, Events and Places. By allowing them to rate/review more entities like Recordings, Works, Labels and Artists, not only it will help to migrate the ratings of MB to CB but it will also target the interest of more people and engage them to use CB.

Being related to music which is an art in itself, I feel that the current UI needs to be more vibrant which will keep the existing reviewers engaged as well as attract the interest of new users.

As my Google Summer of Code project, I aim to extend the functionality of CB by adding support of reviewing more entities i.e. Artists, Recordings, Works and Labels as well as improve the current UI system.

The following implementation is in accordance with the issue CB-270 and discussion on IRC.


My proposed idea is divided into two major objectives:-

  1. Implementation of CB-270. - Adding support Artists, Recordings, Works and Labels in the current review/rating system.

  2. Improving the UI - The way of listing reviews is very much cluttered. The UI needs to be changed to something like a list of reviews with each review’s excerpt.


1. Implementation of CB-270 :-

Database Queries

The database of MusicBrainz is already present in the docker-image musicbrainz_db.

Database Query functions have to be written for getting entity info from the database for artists, labels, work and recordings. This can be done using joins on the various tables like it is being currently implemented for the existing entities. Other relationships and related entities can be retrieved by separate query functions.

In frontend/external/musicbrainz/ the following files will be added to access data from DB:-

  • -
    • get_label_by_id(): To fetch data of the label such as name and other details using its mbid.
    • get_release_rels(): To fetch the releases by the label.
    • get_multiple_rels(): To fetch various artists, work, places related to the label.
  • - Functions like
    • get_work_by_id(): To fetch data of the place such as name and other details using its mbid.
    • get_multiple_rels(): To fetch various artists, work, places related to the work.
  • - Functions like
    • get_recording_by_id(): To fetch data of the recording such as name, length using its mbid.
    • get_multiple_rels(): To fetch various artists, work, places related to the recording.

In frontend/external/musicbrainz/tests/ folder various tests will be added to test the above functions.

Making changes to the UI for the new entities

Note:- The entities recording and work will have similar pages as shown above.

2. Improving the UI:- The current UI needs improvement. For example - Presently, all the reviews are being shown in a cluttered manner. This can be replaced by a list of all reviews with their ratings(if any) and with a short excerpt.

Note:- All the UI mock-ups depicted in the proposal are mere representations of how I envision the changes to be incorporated that suits the current design of the site. There may well be a better suggestion and final implementation at the completion of the project could be different.

Proposed Timeline

Community Bonding (April 24 – May 13):-
In this period, getting myself familiar with the environment, I will fix existing bugs of CB. I will be in constant touch with the mentor discussing and finalizing the roadmap for the project.

Phase 1 (May 14 - June 11):-
In this period, I aim to complete the database access functions for artist entity type, and make necessary changes to the UI allowing users to review Artists. After completing the implementation of Artists, I will start on with implementing review system for Labels on CB.

Phase 2 (June 12 - July 9):-
In this period, I will complete the implementation of the Label and Work entities on CB and will discuss and finalize the improvements to be made on the current UI system.

Phase 3 (July 10 - August 6):-
In this period, I will implement the review system for Recordings and will be making changes to the UI as per decided before. I will be working on improving user experience and I will be also spending time documenting stuff and fixing bugs.

After GSoC:-
Will continue to work on CritiqueBrainz and on other MeB projects too. Planning to make a Statistics Page for CB based on user reviews using Data Visualization and the project will be based on d3.js.

Detailed Analysis of my Timeline:-

Week 1:- Will be fixing existing bugs of CB and be setting up the environment.
Week 2:- Complete writing database query functions for artists and tests for them.
Week 3:- Will make necessary changes to the UI so that the review system for Artists is ready. Also start writing the DB query functions for Labels.
Week 4:- CUSHION WEEK: Will be completing all the stuff and fixing the bugs if any, and prepare for the Phase 1 evaluations.

Phase 1 evaluations

Week 5:- Working on the feedback of the mentors and complete the Database query functions along with their tests for Labels and Works.
Week 6:- Complete integrating Frontend and Backend of the Labels entity type.
Week 7:- Complete integrating Frontend and Backend of the Works entity type so that both the entity types can be integrated into the current review system on production server.
Week 8:- CUSHION WEEK: Fixing all the bugs if any, and start discussing and finalizing with mentors about the New UI by making wireframes and mockups and prepare for Phase 2 evaluations.

Phase 2 evaluations

Week 9:- Complete the database access functions for Recordings and start integrating it with the Frontend.
Week 10:- Complete adding support for the review system for works and start working on the Finalized UI mockups/wireframes as per discussed with the mentor.
Week 11:- Finish all the work on proposed UI and fix existing bugs if any.
Week 12:- Finish Documentation and start working on Optional ideas.
Week 13:- Pencils down week. Prepare for final submission making sure that everything is OK.

About Me

I am a first-year Electronics undergrad at Thapar Institute of Engineering & Technology, Patiala. I came across the world of open-source during Google Code-in 2014. In 2015, I came across MetaBrainz due to my love for music and since then, I have been contributing to various projects of this organization. I was also selected as a finalist in both Google Code-in 2015 & 2016 for my contributions. Here is my list of PRs to MusicBrainz, BookBrainz and CritiqueBrainz. I also have a blog on which I seldomly post but I plan to use it regularly through the programme blogging about my progress with the project.

Question: Tell us about the computer(s) you have available for working on your SoC project!
Answer: I have an HP laptop with Intel i3 processor with 8GB Ram and 1TB HDD running a dual boot of Windows 10 and Ubuntu 16.04 LTS.

Question: When did you first start programming?
Answer: I was introduced to QBASIC in my 6th Grade in school and to JAVA in my 9th Grade. I started on with Python mostly in 10th Grade and since then I am trying to make small projects and Web applications.

Question: What type of music do you listen to?
Answer: I mostly listen to romantic Indian tracks. Arijit Singh and Atif Aslam are my favorite singers.
I also like Ed Sheeran and The Chainmokers. Here are some of my favorite albums/songs:-

Question: What aspects of CritiqueBrainz interest you the most?
Answer: I like to watch movies, read books and mostly I love to listen to music. But most of the time I find out that a person’s review about something is different from the famous critics. Here, CB makes me interested. In CB, one can write his own reviews and browse reviews written by people who have similar taste in music and this makes me love it.

Question: Have you ever used MusicBrainz to tag your files?
Answer: No, but I will definitely try it out.

Question: Have you contributed to other Open Source projects? If so, which projects and can we see some of your code?
Answer: I have made code contributions to MetaBrainz Foundation only till now about which I have written earlier but I also did some contributions to Sahana Software Foundation by reporting bugs on their tracker and by making changes to their wiki.

Question: What sorts of programming projects have you done on your own time?
Answer: I have made a small quiz game in Java and was working on a Flask based website for my school.

I also made a website which translates a webpage when its link is entered in various Indian languages in a hackathon. This project was based on Flask, BeautifulSoup of Python. Here’s the link (there may be some glitches in it).

I am also in the team working on the college’s computing society’s Flask based website. Here’s the link (This is in its initial stages).

Question: How much time do you have available, and how would you plan to use it?
Answer: I have my summer holidays during most of my GSoC period and I plan to work full time(40-50 hrs per week) on the project.

Question: Do you plan to have a job or study during the summer in conjunction with Summer of Code?
Answer: No, if selected for GSoC.


This is an initial draft of my application. Open to any kind of feedback/suggestions! :slight_smile:


I have made improvements to my proposal as per @iliekcomputers tips on IRC :smiley:


Hi @dpmittal, sorry for being a bit late on making reviews to your proposal. First of all, thanks for the proposal, this is a important project for CB. I’ve given your proposal a read through and it seems solid in intentions, BUT it lacks a bunch of implementation details. You should try to include as many details as possible. Right now, you’re only talking in generic terms, which makes it hard for us to estimate your understanding of what the project entails exactly.

I’ve made a few general comments but all of them share the same theme, to be honest.

This is one of the more important part of the proposal and needs a lot more detail. What data exactly will you need to find? What tables exactly will you query? What tables will you need to join? Will you cache the data somewhere? You should provide as many examples as possible and make everything as explicit as possible.

Again, a lot more detail is needed here to show that you understand this part of the codebase and the changes that you’ll need to make. You should explain what views you’ll add etc.

What changes exactly? Remember, we want to ensure that you know what problems you’re proposing to solve and how to solve them. The more details you have in your proposal, the easier it makes for us to do that.

This requires a LOT more detail. What improvements are needed? Why are they needed? How do we plan to improve the UX exactly? Is this anything other than personal preference? In general, UX changes should go through the community before being made. You should take a look at how @chhavi’s workflow for UX design work and see if you can incorporate it here somehow.

Also, what page is the llast mockup representing?

Ideally this should be done in the community bonding period. The coding period should be spent writing actual code which pushes the project ahead.

you don’t list any optional ideas.

Another thing I’m not sure about is whether adding these four entities would be enough work for a full time developer working for three months. Maybe we should consider extending the project a bit to include more entities OR somehow importing the ratings from MB into CB?


First of all Thanks for the review. I will update the proposal soon. :slight_smile: