The image is from the official website sanity.io
What is Sanity.io
Sanity is a host server for structured content with a real-time API, it provides us with two main products:
- Content Lake is a real-time database with a powerful but simple query language GROQ (Query Cheat Sheet) and globally distributed CDN
- Sanity Studio is a flexible open source content editing environment written in React, which can be customized and personalized using basic JavaScript
You can use them separately as well as in combination with each other.
Example of defining a content schema and displaying it in Sanity Studio
The image is from the official website sanity.io
What are the main advantages and disadvantages of Sanity.io?
Sanity.io has a number of advantages over its alternatives, such as GraphCMS, Storyblok, Contentful, etc.The main ones are:
- Automatic project setup in one line of code (simple Sanity CLI)
- Excellent documentation and a huge community
- Massive library of official and custom plugins
- Excellent integration with all popular programming languages and frameworks (with ready-made templates)
- User-friendly and intuitive content management board. Custom React UI Components.
- Sanity comes with a powerful image pipeline that does image metadata . All served from a global CDN. Extraction on upload transformations in front-end usage
- GraphQL support
- Version control
- Free forever:
- 500k API CDN Requests per month
- 100k API Requests per month
- 5GB Assets
- Unlimited admin users
- 3 Non-admin users
- GROQ (Graph-Relational Object Queries) is a declarative language designed to query collections of JSON documents. At Sanity, the goal was expressive filtering, combining multiple documents into one response and shaping the response according to the client application.
Example of a GROQ request
The image is from the official website sanity.io
Of course there are also disadvantages:
- There is no multi language in the main assembly (only with the help of plugins)
- Attachment to a specific platform (Sanity) when developing data for a website
- With a large number of requests and responses, you need to switch to a paid tariff (but it is not expensive)
The conclusion is simple - Sanity is the best choice.
Why Sanity.io is not a CMS like a Wordpress
The image is from the official website sanity.io
CMS ( Content Management System) is a site content management system. In professional jargon, CMS is also called the "site engine". For example, Drupal, Joomla, WordPress and others.
CMS is, in fact, a set of hundreds of plugins and libraries in one place. So that the user can independently perform basic manipulations with appearance and data. And for more advanced features, you need to buy new extensions (often by subscription), which sometimes conflict with each other. Such an approach nowadays is a relic of the past and with each new project more and more companies stop using them.
Sanity, in turn, preaches a different approach to information processing. We only specify the data schemas that we need. Based on this scheme, Sanity creates a user interface for creating content. This gives us the opportunity to fully concentrate on business logic and not engage in unnecessary optimizations. Sanity will do everything instead of us. It remains for us to get the data in our application using the API.
Why do we choose Sanity.io?
High performance, easy scaling, code base reuse and ease of use - allows us to provide many of our customers with a simple and at the same time high-quality user interface for data management. We really like the simple integration of Sanity with Netlify, as well as, thanks to additional datasets, easy setup among the development. Sanity also has access control for users and easy connection to the API from any platform (web applications, mobile applications, and even desktop).
In one of the last projects, thanks to the official (free) add-ons, we implemented multilingualism in a couple of clicks. Many other systems often have problems with that.
Example of an internal user interface
Bravelab.io has been repeatedly convinced that Sanity.io is the best option not only for large commercial applications but also for small projects. We see how Sanity.io develops in move with the times, giving us more opportunities with each update.