Restdb.io – Super Simple, Low Code CMS and Database Backend for Web Apps

If you need a quick and easy way to create a CMS (content management system) or a database backend for an app, then Restdb.io will amaze! Here are some features:

  • super developer-friendly with crystal clear documentation
  • affordable and even has a free plan
  • example code for popular programming languages, including client side JavaScript and server side NodeJS, which makes it quick to get up and running
  • webhooks whenever a record is created, updated or deleted
  • codehooks to run custom code before and after a record is created, updated or deleted, e.g. for data normalizing and validation. codehooks also support scheduled tasks like cron jobs.
  • auto-generate test data to seed a table
  • ability to import data from a CSV file
  • native and custom field validation
  • non-technical users can log in and add/edit/delete records using intuitive forms and controls without seeing any developer features
  • ability to upload and host images and files

Below is a tutorial on how to create a simple CRUD (Create, Read, Update, Delete) app using Restdb.io with a PHP backend.

1. Log in to Restdb.io account and create a table (collection)

After you log in, you’ll need to be in Developer Mode to create a table. When creating fields in the table, Restdb.io offers numerous field property options including native and custom field validation.

2. Add or import data

To populate the table, you can

  • Add data field by field, row by row
  • Import data from a CSV file
  • Auto-generate data by clicking on the Test Data tab

Using the Test Data option, I chose to generate 5 rows which gave me this.

3. Get sample CRUD code

Click on [Table] > API Docs and choose a language to see sample code for

  • getting records (using HTTP GET method)
  • creating a record (using HTTP POST method)
  • update a record (using HTTP PUT method)
  • delete a record using (HTTP DELETE method)

Below is a screenshot for PHP using the Pear HTTP_Request package.

Below is a screenshot using NodeJS using the Request library.

You can also perform CRUD actions using client-side JavaScript but you need to set up CORS (cross origin resource sharing). The example below shows JavaScript using jQuery AJAX.

4. Install PHP Pear HTTP_Request package

This example shows how to do it using GoDaddy shared web hosting in cPanel. In cPanel, click the PHP Pear Packages under SOFTWARE.

We’ll actually be installing the HTTP_Request2 package. Search for “HTTP_Request2” and in the search results, click “Install”. Here’s a partial list of my installed packages including HTTP_Request2.

5. Create a file to test reading from the database

I created a test file called read.php which the following code.

After uploading it to my web host, opening the file in a browser shows me the data in JSON format, as expected, which you can see live at http://zabuun.com/restdb.io/read.php

You can also test the API by installing Postman (free), entering a query in the form of a REST URL, and entering your API key as a HTTP header.

6. Auto-generate a web form

If you want to create a web form for public use, you can have restdb.io auto-generate one for you, complete with JavaScript validation and code to publish the data to your restdb.io database. See an example at

http://zabuun.com/restdb.io/form.html

7. Create users with editor access

If you work with other developers or editors, you can give them role-based access to your restdb.io account to manage data. An editor, for example, will not see the developer features and can simply add records using a user-friendly web form like shown below.