beatql icon indicating copy to clipboard operation
beatql copied to clipboard

BeatQL - Synthesized Beats powered by react-music, GraphQL and PostgreSQL

BeatQL

Demo app that combines react-music, GraphQL and PostgreSQL.

It also shows off GraphQL mutations and subscriptions, based on Apollo Client.

Full background story: https://speakerdeck.com/lfittl/graphql-postgresql-p-dot-s-aka-beatql

Getting started

First things first:

git clone https://github.com/lfittl/beatql
cd beatql
npm install

Then, boot up a PostgreSQL database and load the data structure:

docker-compose up -d db
psql -h `docker-machine ip` -U beatql -f data/sql/00_schema.sql

Next, lets load the song from the react-music demo:

psql -h `docker-machine ip` -U beatql -f data/sql/01_sample_song.sql

In addition, run the following to enable LISTEN/NOTIFY for powering GraphQL subscriptions:

psql -h `docker-machine ip` -U beatql -f data/sql/02_notify.sql

Start the server:

npm start

You can then visit http://localhost:5000/ and should hear the demo song :-)

Authors

Hacked together by Lukas Fittl.

None of this would have been possible without react-music made by Ken Wheeler.

LICENSE

Copyright (c) 2016, Lukas Fittl [email protected]
Licensed under the MIT license.

Demo code used from react-music is licensed under the MIT license.

Code taken from relay-starter-kit is licensed under the BSD license.
Copyright (c) 2013-2015, Facebook, Inc. All rights reserved.

See LICENSE file for details.