Homepage

Manage the database using the pos-cli GUI

Last edit: Jun 19, 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 the 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 and do not end the command, as pos-cli gui serve has to be running in the background for the GUI to work correctly.

To start using the GUI, navigate to http://localhost:3333/databasewith GraphQL in it.

UI and Features Overview

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

Screenshot of Database UI

The UI allows you to:

  • List all existing tables
  • Browse data in each table with filtering and sorting support (the UI builds records GraphQL queries with the proper arguments behind the scenes)
  • 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