New Community Plugin: Content Versioning
Tags: strapi, strapimarket, javascript, jamstack
Published: 2022-02-25 17:11:50

---

canonical_url: https://strapi.io/blog/new-community-plugin-content-versioning?utm_source=dev.to&utm_medium=post&utm_id=blog

---

Author: Ondřej Janošík, Martin Čapek

NOTUM Technologies is an official Strapi Partner and a custom software development agency based in Czech Republic. Our speciality is web and mobile app development. We provide our service for both startups and corporate clients across more than 10 countries and our apps are used by more than 5 000 000 users every month.
 
## 🚀 About the plugin

The “[strapi-plugin-content-versioning](https://market.strapi.io/plugins/@notum-cz-strapi-plugin-content-versioning)” allows you to:

- Have multiple draft versions of one entity ✅
- Keep a history of all changes (with time travel) ✅
- Have different published and draft data ✅

## Why we built it?

We really love STRAPI (as you might have guessed) but one thing that we were missing across a variety of projects was content versioning - especially the ability to have a different version of a draft and published data and to keep history of all the data.  

We developed this plugin during the development of a new site based on [Strapi v4](https://strapi.io/v4) for a Czech insurance company called [Direct](https://www.direct.cz). With the permission of the client, we released it as an open-source plugin and we are going to further continue with its development. 🎉
 
## How does it work under the hood?

Our plugin is inspired by the [Strapi Content Internationalization](https://strapi.io/blog/announcing-content-internationalization-v3-6) (i18n) feature. The i18n plugin works the same way on a low level when creating localized versions. Therefore, we created a specific id of the versions concerned that groups all versions of the same entry and also creates a relation between entries. 

Since we can leverage the power of the [Draft and Publish system](https://docs.strapi.io/user-docs/latest/content-manager/saving-and-publishing-content.html#saving-publishing-content), your controllers should work without any additional coding or changes. A big help in creating our plugin is the new [Plugin API](https://docs.strapi.io/developer-docs/latest/developer-resources/plugin-api-reference/server.html#entry-file) that is useful when working with Strapi’s core code without needing to rewrite files.

The whole plugin is composed of 3 main parts:

1. Custom controller that manages saving and creating new versions.
2. Middleware that filters only relevant versions on the list.
3. Components placed on the side panel that are injected into ‘informations zone’.

## What’s next on the roadmap?

Given the fact that we are intensively collaborating with Strapi we will be updating the project based on feature requests from our client and the community. Features coming up next are:

✨ One command installation
✨ Extension of functionality also for single types
✨ Autosave
✨ Update of the current version without creating a new history item
✨ Auto preview mode for getting draft entry

But first, we would like to release a stable version. The plugin is not easy to release and we expect many edge cases in different usages.

### How can others contribute

We would love to hear your feedback! Please use [GitHub issues for feature requests/bug reports and questions](https://github.com/notum-cz/strapi-plugin-content-versioning). Also, you are more than welcome to contribute to the project!

## Install now

```shell
npm install @notum-cz/strapi-plugin-content-versioning
```