DEV Community

Cover image for #006 | Backend Database : Discovery
Jian
Jian

Posted on

#006 | Backend Database : Discovery

Table Of Contents

    * Overview
* Xano: An Easy-to-use Database System
* Building a Table
* Building an API
* Next Steps
Enter fullscreen mode Exit fullscreen mode




Overview

I built a Python code to extract data from Custodian Statement PDFs and output the data into three CSV files.

Comma Separated Value ("CSV") files are a great tool for non-technical users who need to store and perform basic data analysis.

However, a more scalable storage solution is needed to handle larger datasets and complex data queries. Another drawback of a CSV file is that it is a single-user storage format.

Xano: An Easy-To-Use Backend System

I have been experimenting with Xano, a cloud-based low-code backend platform, since coming to know about it from this company's blog.

Xano is great for non-technical users because it offers a user-friendly, low-code user interface ("UI") on top of PostgreSQL. The latter is a popular open-source object-relational database system.

Xano also has a low-code API builder UI that helps you design and build APIs to connect your database to other systems.

After replacing the CSVs as a storage medium with Xano, the MVP's workflow looks like this:

Workflow

To familiarise myself with Xano, I did the following:

  1. Built a database table
  2. Built a user signup API

Building A Table

Creating a table & adding fields

Xano's UI makes table creation a simple process. Users have the option to either import their own data (via CSV or Airtable) or enter data manually.

Create Table

Create Table

Adding a table field and specifying its type is also straightforward. It is also easy to make changes later on.

Add fields

Generating random data for testing

This is very helpful when you want dummy data to test your application.

Generate Data

Generate Data

Exporting data

Should you wish to migrate your data, Xano lets you export your table data to CSV.

Export Data

Building an API

An Application Programming Interface ("API") is needed to send the data extracted from Custodian Statement PDFs to Xano for storage purposes. Vice-versa, the data stored in Xano can also be retrieved later on via an API.

Xano has a pretty nifty low-code API builder that makes it easy to setup an API and add functions to determine the endpoints functionality.

For example, I created a user signup API that lets the Back Office Team create accounts. I added functions to limit the number of created accounts to 3 (to block unauthorised spam accounts from being created) and prevent a signup if an existing username exists.

Building the API's functionality

Functionality

Successful user account creation

API creation

Precondition 1: Block creation of more than three user accounts

API precondition

Precondition 2: Block creation of duplicate user accounts

API precondition

Next Steps

I think I now have the basic knowledge to create APIs in Xano to:

  1. Create user accounts
  2. Login to a user account and return an Authentication Token
  3. Store Securities Holdings data in securities_pdf
  4. Store Fund Holdings data in funds_pdf
  5. Store Cash Holdings data in cash_pdf

I also need to write code in my Python backend to send corresponding requests to these Xano APIs.

--Ends

Top comments (0)