Cover image for JSONsty - Creating a Secure Cloud Storage Solution for JSON

JSONsty - Creating a Secure Cloud Storage Solution for JSON

m4cs profile image Max Bridgland ・2 min read

One day I was sitting at work and my friend contacted me on Discord. He wanted an easy solution to host JSON data remotely for a Raspberry Pi project. He had used my service psty.io for a while and brought the idea to implement it into the service myself. I thought it was a great idea and hopped on it that night.

I decided I would write it in Python with Flask and using mongoDB as the main database. I wanted this to be secure, fast, and able to handle a lot of connections at once. I have been able to do so with this stack in the past and I was most comfortable with it so I gave it a shot.

The first part I wrote was the RESTful API. I knew it would be easiest with Flask since it's just JSON and that means no need to write a web front-end. This was done in a night and I had a very basic API for users. It simply allowed you to create JSON stores, edit them, delete them, and grab them. By the time this was done I showed a couple friends and they were concerned with the fact I was able to see all the data on the database. I wanted to look for a solution.

After that I decided it would be better to offer a panel to users so I decided I would just write an entire web front-end. These are very simple Jinja2 templated, server side rendered pages. I plan on making a React app once I get better with Javascript but since the main idea of this is the API I am not too worried since the frontend gets the job done. You can edit Account Settings, create stores, edit stores, and delete stores. The API is extremely simple and you are given an API key immediately when you signup!

I have been working with another developer the past couple weeks on an encryption/steganography technology called Pixcryption. We were working on adding the AES layer of security to it and I brought up JSONsty to him. He has been wanting to learn as much as possible so he took it as an opportunity to study Flask, MongoDB, Unit Testing, and more about AES.

We spent the past couple days working together on securing the system with AES OCB and Base64. Now it encrypts all the JSON data in the database and decrypts when the user requests their store. Each user has an object on the db and that controls which stores belong to them through ObjectIds which map a relationship between the collections.

Now JSONsty is ready for the public to start using in my eyes and I plan to make it even better over time. Psty.io has been doing well and I want to build it out into a family of software that provides tools for developers to make sharing and developing easier. Below you can find the source to JSONsty and you can also signup now here! We also would love any contributors who would like to harden the security or just make it a better service.

GitHub logo M4cs / jsonsty

☁️ Free Cloud JSON Storage Written in Python 🐍

Made with Python and Flask


What is JSONsty? JSONsty is a service provided by psty.io that allows you to store JSON data in the cloud for free using an extremely simple API or web panel frontend. The source code here includes everything running on the website as we speak. It should always be 1:1 up-to-date on the master branch compared to the website.

How Does It Work?

JSONsty is a Flask application that includes a REST API and dynamically rendered Website using the Jinja2 module. It interfaces and stores all data on a remote mongoDB cluster that acts as the master database. Users have an account which links the data, known as stores, on the database, and then link said store to the user.

When you create an account you receive an API Key which allows you to communicate with our API. The API allows you to create…


Editor guide