Introduction

Introduction

Frolic is a fast and performance backend infrastructure to create customer facing dashboards. It provides ready made API endpoints which can be used to query data directly from the front end. This removes the need to write multiple APIs for different dashboard components and their database queries.

You can also use frolic-react (opens in a new tab) along with Frolic for your dashboard UI components along to create full stack dashboards much faster.

Architecture

Frolic acts as the backend infrasctructure for your dashboard helping you query data much faster and easier in the front end.

Frolic Architecture

Frolic provides single endpoint to query data using simple JSON queries. For example you can use the following request to query the data.

curl --location 'http://localhost/api' \
--header 'Content-Type: application/json' \
--data '{
      "metrics": [
        {
          "field": "products.price",
          "aggregate_operator": "sum"
        }
      ],
      "dimensions": [
        {
          "field": "products.category"
        }
      ]
}
'

Frolic's query engine converts the above request to the database query and executes it. The response of the above query is returned as follows:

{
    "data": [
        {
            "products.price": "51",
            "products.category": "Gizmo"
        },
        {
            "products.category": "Doohickey",
            "products.price": "42"
        },
        {
            "products.category": "Gadget",
            "products.price": "53"
        },
        {
            "products.category": "Widget",
            "products.price": "54"
        }
    ]
}

Checkout API documentation to learn more about API parameters.

Key Features

Frolic provides number of features to make production ready dashboards much easier

  • Query engine to generate database queries
  • Handle complex table relationships
  • Caching of APIs