Creating magic with create-triplit-app
TLDR
We make improvements to the `create-triplit-app` command, introduce a new demo environment, and make the CLI faster to install.
Improved create-triplit-app
We've made several changes to the create-triplit-app
to get you up and running with Triplit faster. Now you can choose between React and SvelteKit demo apps which come with predefined and pre-configured clients, schemas and environmental variables. You can do:
yarn create triplit-app
yarn
yarn dev
And in a separate terminal run:
yarn triplit dev
And you'll have a syncing Triplit app.
As a reminder, if you're adding Triplit to an existing app, you can run yarn triplit init
in your project to get started.
New Triplit demo environment
We've created a new demo environment that you can use to test Triplit from your browser. We've added simulated network conditions so you can see how an app using Triplit will sync in different conditions (spoiler: on the user's device, it always feels fast). You can also build a query to get a taste of our API. Check it out.
Faster CLI installs
We've changed how we build and bundle the CLI, which resulted in a significant improvement to its installation speed. Install the CLI with yarn add -D @triplit/cli
.
More secure token schemes for Triplit Dashboard projects
Triplit dashboard projects now use RSA-signed JWT tokens. We generate a new key pair for each project. The private key is used to sign your tokens and is then destroyed. The public key is stored and used to validate tokens. If you ever need to rotate your tokens, you can now regenerate with a new keypair from the dashboard in your projects settings. Your existing tokens will continue to work until you regenerate them.
Bug fix for relational filters in filter groupings
Triplit supports relational filters like
client.query('shows').where('characters.playedBy.name', '=', 'Anna Gunn')
We fixed a bug where relational filters in filter groupings like and([filterA, filterB])
or or([filterC,filterD])
were not working as expected.