Skip to content

What Keyway is

Keyway is an interactive, 100% client-side tool for designing and teaching how to model your data into a NoSQL database, initially with DynamoDB as the destination. You write the model as plain text. The app projects it into the base table and its indexes, steps through the writes, shows the estimated cost of each, and lets you query it. The data is yours: your model is never sent to a server, and it lives nowhere but your browser tab.

The text is the single artifact

There's no separate schema file to keep in sync, and no database to connect to. The model is a short, readable DSL document, and everything else is a lens on that one string:

  • The base-table and index views are project(state, index) over the folded ops.
  • The cost bar is writeCost(...) over each op.
  • A shared link is just the same text, compressed into a URL fragment.
  • Access-pattern coverage runs your declared queries against that same folded state.

Because the text is the whole artifact, you can diff it in a pull request, edit it in vim, or paste it into Slack. That is the sharing mechanism. There is nothing else to move around.

100% client-side: your data stays in the browser

The app makes no network calls with your data:

  • Your model lives only in the browser tab. It is not written to a server, and it is not even saved to localStorage.
  • Shared links carry the model in the URL fragment (#m=…). Browsers never send the fragment to a server, so a link's contents stay on the two machines that hold it.
  • The only things counted are anonymous page-views and a few named UI events (via GoatCounter): no cookies, no personal data, no IP addresses stored, no profiling. A page-view records location.pathname only, so the #m=… model is never sent. The events are just labels — e.g. which example or learn path was opened (example:…, tour:…), so I can tell which ones people find useful — never anything you type. Everything is skipped on localhost. You can audit the whole surface in index.html and src/analytics.ts, and see the numbers yourself: the GoatCounter dashboard is public.

You can create your data model without anything leaving your machine. See Share links & examples for the details.

Quick start

  1. Open the app. It loads with a worked "Users & orders" example already in the editor.

  2. Read the left editor as a script. Each line is one operation and one step:

    text
    @table AppTable pk=PK sk=SK
    @gsi GSI1 pk=GSI1PK sk=GSI1SK projection=all
    
    u1: PK=USER#1  SK=PROFILE  name=Ada Lovelace  GSI1PK=EMAIL#ada  GSI1SK=USER#1  _type=user-profile
    o1: PK=USER#1  SK=ORDER#1  status=pending  GSI1PK=STATUS#pending  GSI1SK=2024-01-14  _type=order
  3. Edit an item and watch it project. Add an attribute, or repeat a label to update the same item: the base table and GSI panes update live.

  4. Change a GSI key (e.g. GSI1PK=STATUS#shipped) and watch the item hop partitions on the index, and the cost bar bills it as a reindex (a delete + a put), not one write.

  5. Declare an access pattern with @ap … -> GSI1 … and see whether the model actually serves it.

  6. Share it: the share button copies a link with the whole model inside.

From here, jump to:

Disclaimer

Personal project, not affiliated with AWS

Keyway is a personal project. The opinions and views expressed here and in the tool are my own and do not represent those of my employer, Amazon Web Services (AWS), or Amazon.com, Inc. Keyway is not an official AWS product and is not affiliated with, endorsed by, or supported by AWS or Amazon.

Amazon DynamoDB, AWS, and NoSQL Workbench are trademarks of Amazon.com, Inc. or its affiliates.

A personal project. Opinions are my own, not those of AWS or Amazon. Amazon DynamoDB, AWS, and NoSQL Workbench are trademarks of Amazon.com, Inc. or its affiliates.