Like tracking your synth and drum machine patches in a spreadsheet, but filter by tags, categories.
https://spectralliaisons.github.io/patchbae/
Enter credentials to modify an existing table of patches or continue as guest to rely only on localStorage
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.
User patches are organized into a single table with the following columns:
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?
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)
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 |
- In AWS Services > DynamoDB, select "Create table" with Table name "Patchbae" and Primary key "UID". Use default settings. Click Create.
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:
-
In AWS Services > Cognito, create a User Pool and make sure "Generate client secret" is UNCHECKED.
-
Create the pool and in Federated Identities > App integration > App client settings > Enabled Identity Providers, ensure "Cognito User Pool" is checked.
-
In Federated Identities > Identity Pool > Authentication providers > Cognito, set the appropriate User Pool ID and App client id.
-
In Authenticated Roles, select "Choose role from token" and Role resolution to "Use default Authenticated role", then click Save Changes.
-
Attach the AmazonDynamoDBFullAccess policy to your Auth and Unauth Roles.
-
In General settings > Users and groups > Users, select "Create user" and create a user you with to authenticate with when logging in to Patchbae.
-
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
-
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!
-
Install Amazon Cognito with Node JS:
npm install amazon-cognito-identity-js
-
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
};
};
-
Compile the Elm code into JavaScript with live editing:
elm-live src/Main.elm --open --start-page=index.html -- --output=elm.min.js
-
Navigate to http://localhost:8000
Compile the project with optimization:
sh optimize.sh src/Main.elm