Development/Summer of Code/BookBrainz

From MusicBrainz Wiki

This page will discuss the current list of suggested ideas for students to develop proposals for for Google's Summer of Code. If you're a student, feel free to base your proposal on one of these ideas, or pick and entirely new idea that you think might be useful to us.

Getting Started

The first thing to do to get started with BookBrainz is to clone the bookbrainz-site GitHub repository, and follow the README.md file to get the site up and running. An internet connection will be required to get all features of the site working, since it communicates with the webservice at http://bookbrainz.mbsandbox.org/ws.

Once you've done this, and had a little look around the directory structure and explored some of the files, you can also set up a local copy of the BookBrainz webservice. You'll need to have PostgreSQL 9+ installed, and a recent version of Redis.

Then, download the following four database dumps: Structure Core Derived Editor

Clone the bookbrainz-schema GitHub repository and follow the instructions in README.rst to install the package and create a new BookBrainz database, with data from the dumps. Then, clone the bookbrainz-ws GitHub repository and follow the instructions in the README.md to get a running webservice.

Come and speak to us in the MetaBrainz IRC (freenode/#metabrainz) if you finish all of that, or get stuck at any point!

Ideas

Data Importing

Proposed mentors: LordSputnik or Leftmost
Languages/skills: Browser JS, Node.js or Python, SQL/PostgreSQL
Forum for discussion

At last year's summit, the two BookBrainz lead developers, Leftmost and LordSputnik worked on a plan for importing third party data into BookBrainz. This plan has several stages. First, data sources need to be identified, including mass import sources with freely available data, such as libraries, and manual import sources, such as online book stores and other user-contributed databases. The next stage is to update the database to introduce an "Import" object, which can be used to distinguish mass imported data from (usually better quality) user contributions. Then, actual import bots for mass import and userscripts for manual import will need to be written. Finally, it would desirable (but not necessary if time is short) to introduce an interface to the BookBrainz site to allow users to review automatically imported data, and approve it.

Web API

Proposed Mentors: LordSputnik/Leftmost
Languages/skills: Node.js, ES6, Python, Redis, OAuth
Forum for discussion

We’re currently in the process of switching to using Node.js for all server side code. As part of this, our schema has been redesigned, and the current Python-based web API will no longer work.

We'd like a new and improved JSON web API to be designed and implemented. The design would clearly describe the result of each different query to the web API, and give examples of output. It would also describe the workings of any additional features to be implemented - for example, authentication, caching and rate limiting. Authentication in the web API is a particular challenge, since the current MB OAuth setup requires a GUI.

The web API should be written using the koa.js Node.js server framework, so that the resulting code is as clean and minimal as possible. Tests should be written in parallel with the implementation, adapting and expanding on the tests for the existing Python web API. The priority for this task is a solid plan and quality code, not a complete implementation (although that would be nice!)

Gamification

Proposed Mentors: LordSputnik/Leftmost
Languages/skills: Node.js, PostgreSQL
Forum for discussion

Gamification involves adding reward to an activity to make it more fun and interesting for the participants by giving them something to aim for. In the context of BookBrainz, it could also help to ensure that editors are exposed to all the features of the site. We’d really like to introduce an achievement/badge system into BookBrainz, to complement our planned editor reputation system.

Some examples of possible achievements: adding X entities, leaving X comments on revisions, sending a message through the MeB messaging system, filling out profile bio, logging in/editing for X consecutive days.

To implement this, you'd need to introduce several database tables to store the types of achievement and the list of achievements earned by each editor. You’d also need to implement the site logic for unlocking badges, and code for displaying progress towards these on a user's profile. Unit tests for the new site code would also be beneficial.