Giter Site home page Giter Site logo

spectralliaisons / patchbae Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 1.84 MB

Like tracking your synth and drum machine patches in a spreadsheet, but filter by tags, categories.

License: GNU General Public License v3.0

HTML 0.12% Elm 7.00% JavaScript 92.81% Shell 0.07%

patchbae's Introduction

patchbae

Like tracking your synth and drum machine patches in a spreadsheet, but filter by tags, categories.

see it in action

https://spectralliaisons.github.io/patchbae/

Enter credentials to modify an existing table of patches or continue as guest to rely only on localStorage

an image examplar

Table of patches

an image examplar

Authentication

Amazon Cognito authenticates the provided user login and password to have read/write access to DynamoDB, which stores a table of user patches. There is currently no ability for users to "sign up" or create their own accounts.

Users can bypass authentication by selecting "continue as guest," which will cache their data to localStorage.

Usage

User patches are organized into a single table with the following columns:

Columns supported in the current implementation:

Instrument: Which device?

Category: What type of sound is this? (e.g. "lead", "pad", "kick", "snare", etc.)

Address: Where is it stored on the device? (e.g. "U4-P86")

Name: What is its saved name?

Columns to support in future versions:

Supporting the following columns will require a system for filtering rows to display by tags. The implementation must ensure that when a row is deleted, any rows that reference it as Family or Friend remove it.

Family: Variations of one root patch (list of Names for this Instrument)

Friends: What sounds good together? (list of Names for this Instrument)

e.g.

Filter: [# ]

Instrument Category Address Name Rating Tags Projects Family Friends
Prophet Rev2 #pad U4-P86 Cine4 * * * #mellow #smooth #tinny #warble #SongA #Buum #
Roland TR-8S #kick Kit-97 Buum * * #deep #broad #SongA #SongB #Cine4 #Snak
Roland TR-8S #snare Kit-97 Snak * * * * #deep #broad #SongC #SongD # #Buum

development

  1. Install Elm

Setting up a table for user data via Amazon DynamoDB

  1. In AWS Services > DynamoDB, select "Create table" with Table name "Patchbae" and Primary key "UID". Use default settings. Click Create.

Setting up Amazon Cognito to authenticate user access to data

This was a long trial & error process of piecing together different information, and I'm not 100% certain this works but it's very nearly the process that got it to work for me...

Helpful resources:

  1. In AWS Services > Cognito, create a User Pool and make sure "Generate client secret" is UNCHECKED.

  2. Create the pool and in Federated Identities > App integration > App client settings > Enabled Identity Providers, ensure "Cognito User Pool" is checked.

  3. In Federated Identities > Identity Pool > Authentication providers > Cognito, set the appropriate User Pool ID and App client id.

  4. In Authenticated Roles, select "Choose role from token" and Role resolution to "Use default Authenticated role", then click Save Changes.

  5. Attach the AmazonDynamoDBFullAccess policy to your Auth and Unauth Roles.

  6. In General settings > Users and groups > Users, select "Create user" and create a user you with to authenticate with when logging in to Patchbae.

  7. You'll need to change the password for the user you just created; to do this, you'll need to ensure aws cli is available in your Terminal: brew install awscli

  8. Configure aws with your AWS admin, replacing XXX with your values:

aws configure
aws cognito-idp admin-set-user-password --user-pool-id XXX --username XXX --password XXX --permanent

./src/js/elm-buddy.js authenticate() will now be able to retrieve an authentication token for the username and password entered in the command above!

  1. Install Amazon Cognito with Node JS: npm install amazon-cognito-identity-js

  2. Modify awsConfig() in ./src/js/client.js to return your Amazon Cognito Credentials by filling in your Identity, User Pool, & Client Ids with the values you just created:

var awsConfig = function() {
    return {
        region: XXX,
        IdentityPoolId: XXX,
        UserPoolId: XXX,
        ClientId: XXX,
        TableName: XXX
    };
};

compiling

  1. Compile the Elm code into JavaScript with live editing: elm-live src/Main.elm --open --start-page=index.html -- --output=elm.min.js

  2. Navigate to http://localhost:8000

production

Compile the project with optimization:

sh optimize.sh src/Main.elm

patchbae's People

Contributors

spectralliaisons avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

patchbae's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.