Overview

_images/overview-use-cases.png

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.

Use cases

  • 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.

Note

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 dictionnaries.

How?

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>)

The JavaScript and Python development kits (SDK) provide basic abstractions to store and retrieve data from your applications. Our JavaScript client for browsers leverages IndexedDB to work completely offline and synchronise data when online.

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…

Key features

https://thenounproject.com/search/?q=syncing&i=31170 Synchronisation https://thenounproject.com/search/?q=permissions&i=23303 Fined grained permissions
https://thenounproject.com/search/?q=quality+control&i=170795 JSON Schema validation https://thenounproject.com/search/?q=community&i=189189 Universal and multi clients
https://thenounproject.com/search/?q=free&i=669 Open Source and Self-hostable https://thenounproject.com/search/?q=community&i=189189 Designed in the open

Also

Ecosystem

JavaScript HTTP API client Python HTTP API client
https://thenounproject.com/search/?q=offline&i=90580 Offline-first JavaScript client control panel by Gregor Črešnar from the Noun Project Web Admin UI
restore by Francesco Terzini from the Noun Project History of changes and authorship https://thenounproject.com/search/?q=refresh&i=110628 Live Push notifications
https://thenounproject.com/search/?q=attachment&i=169265 File attachments on records approved by Gregor Črešnar from the Noun Project Digital signature and review workflows
Mobile Cloud by Thays Malcher from the Noun Project Storage quotas https://commons.wikimedia.org/wiki/File:React.js_logo.svg Kinto+React boilerplate

Learn from examples

https://thenounproject.com/search/?q=tutorial&i=24313 Check out the list of example applications, or our tutorials!

Elsewhere

Coming soon

(See our roadmap)

Synchronisation

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.

_images/overview-synchronisation.png

Note

Kinto synchronisation was designed and built by the Mozilla Firefox Sync team.

Notifications

Kinto can execute some code when a particular event occurs. For example, when a record is created or updated in a particular collection.

It can send a notification to clients using WebSockets or fill a queue of messages in Redis or execute any custom code of your choice, like for sending emails or pinging a third-party.

See our tutorials for more in-depth information on these topics.