Homepage

Manage database using the pos-cli GUI

Last edit: May 21, 2024

This guide introduces our database management tool, which is part of pos-cli.

The pos-cli gui serve command is an efficient way to preview your current database state. It also allows you to modify data easily via the UI. However, it is not recommended for use in a production environment. For modifying production data, consider writing a migration for a small amount of data or a one-time script that you can invoke in a staging environment first.

Requirements

To follow the steps in this tutorial, ensure you have pos-cli installed and your environment configured.

Starting the GUI

To start Database UI locally, run the pos-cli gui serve [environment] command.

For example:


$ pos-cli gui serve staging
[18:05:01] Connected to https://documentation.platformos.com/
[18:05:01] Admin: http://localhost:3333
[18:05:01] ---
[18:05:01] GraphiQL IDE: http://localhost:3333/gui/graphql
[18:05:01] Liquid evaluator: http://localhost:3333/gui/liquid

Note

Replace staging with the environment name you want to develop on. To list all available environments use pos-cli env list

Do not close your terminal, do not end the command - pos-cli gui serve has to be running in the background for GUI to work correctly.

To start using it go to the link with graphql in it: http://localhost:3333/database

UI and features overview

Here is an example of how the UI looks like for our e-Commerce Marketplace Solution

Screenshot of Database UI

The ui allows you to:

  • List all of the existing tables
  • Browse data in each of the table with filtering and sorting support (behind the scenes the UI just builds records GraphQL query query with the proper arguments)
  • Edit existing record
  • Delete existing record
  • Create a new record
  • Browse soft-deleted records and undelete them

Questions?

We are always happy to help with any questions you may have.

contact us