Kinto is a minimalist JSON storage service with synchronisation and sharing abilities. It is meant to be easy to use and easy to self-host.
Kinto is used at Mozilla and released under the Apache v2 licence.
Why use Kinto?¶
Don’t build silos. Redecentralize the Web!
It’s hard for frontend developers to respect users privacy when building applications that work offline, store data remotely, and synchronise across devices. Existing solutions either rely on big corporations that crave user data, or require a non-trivial amount of time and expertise to setup a new server for every new project.
We want to help developers focus on the frontend, and we don’t want the challenge of storing user data to get in their way. The path between a new idea and deploying to production should be short!
Also, we believe data belong to the users, and not necessarily to the application authors. Applications should be decoupled from the storage location, and users should be able to choose where their personal data are stored.
The backend can often be universal, generic and resuable. We envision mutualisation of services and self-hosting: the backend is deployed, secured and scaled only once for several applications.
A generic Web database: JSON store for mobile and Web apps, games, or IoT…
Quickly prototype frontend applications: don’t lose time with server stuff, the backend for your next single page app is already there.
Applications as static files: just host your apps on GitHub pages, your storage backend is elsewhere!
Offline-first applications: data can also be stored locally and published later.
Build collaborative applications with real time updates and fine-grained permissions.
Synchronise application data between different devices.
Content delivery: manage remote content or configuration for your apps via an administration UI
Data collection: easily collect structured data from surveys, forms, analytics.
Store encrypted data at a location users can control, ensuring better privacy and security.
At Mozilla, Kinto is used in Firefox for global synchronization of frequently changed settings like blocklists, and the Web Extensions storage.sync API. It is also used in Firefox for Android for A/B testing and delivering extra assets like fonts or hyphenation dictionaries.
Kinto is an HTTP API in front of a database. Interactions with the server are simple HTTP requests rather than complex SQL or map-reduce queries. It is meant to be minimalist and simple.
Permissions can be set on the stored objects, making it possible to share data between users.
We provide a demo server to start immediately, a one-click installer on Heroku for long term hosting and a Docker image to even run it yourself. (Let me start now! <tutorials/install>)
It’s even possible for data to be encrypted on the client to keep user data safe on the server.
The ecosystem is growing and plugins already provide advanced features like history tracking, push notifications, file attachments, schema validation…
HTTP best practices
Configuration via a INI file or environment variables
Optional JSON schema validation
Live Push notifications
Learn from examples
(See our roadmap)
Bi-directional synchronisation of records is a very hard topic.
Kinto takes some shortcuts by only providing the basics for concurrency control and polling for changes, and not trying to resolve conflicts automatically.
Basically, each object has a revision number which is guaranteed to be incremented after each modification. Unless the history plugin is activated, Kinto does not keep old revisions of objects.
Clients can retrieve the list of changes that occurred on a collection of records since a specified revision. Kinto can also use it to avoid accidental updates of objects.
Kinto synchronisation was designed and built by the Mozilla Firefox Sync team.
Kinto can execute some code when a particular event occurs. For example, when a record is created or updated in a particular collection.
See our tutorials for more in-depth information on these topics.