Backend service to build customer facing dashboards 10x faster. Written in Rust.

Overview

Frolic Logo

Frolic is an open source backend service (written in Rust) to build customer facing dashboards 10x faster. You can directly connect your database to the project and use ready made APIs to query data. You no longer have to write custom APIs for different dashboard components and create/maintain SQL queries for them.

You can also use frolic-react for your UI along with frolic to create full stack dashboards much faster.

GitHub contributors GitHub issues GitHub stars GitHub closed issues GitHub pull requests GitHub commit activity GitHub license Twitter Follow

Web App Reference Architecture-2

Use single API to query data for all your dashboard components

You can use a single API endpoint provided by this project to query data for your dashboard.

Sample API Request:

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

You can pass the metrics you require in the metrics field as an array. The field of the metric is written in <table_name>.<column_name> format. The aggregate_operator can be used to specifiy what operation you want to apply on the specified <table_name>.<column_name>.

The dimensions field allows you to categorize the metrics returned by the API. To specify the column by which you want to categorize the metrics, use the field operator and specify the column name in <table_name>.<column_name> format.

The data returned by the API will be a list of JSON which contains the dimensions and the attributes specified in the request.

The output of the above request will be 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"
        }
    ]
}

Running Project

1. Configure your database

Configure your database in config.toml.

2. Run the Project

Use docker to run the database

docker-compose up --build

You can start using the docker container path to query your data.

Features

  • 🚀 Fast and Scalable APIs with Rust
  • Single API for all your dashboard requirements
  • Automatically generates and execute SQL queries on your database
  • Automatically handles complex table relationships
  • Caching of API Calls (using memcached)

Integrations

We currently support MySQL database. We will add integrations with other databases in the future.

Why Rust?

Rust is much faster and performant compared to other web frameworks. We have build this project using actix-web, which is one of the fastest web frameworks in the world. Checkout the comparison between ExpressJS and Actix-Web here.

Support and Community

Issues are inevitable. When you have one, our entire team and our active developer community is around to help.

💬 Ask for help on Discord

⚠️ Open an issue right here on GitHub

How to Contribute

We ❤️ our contributors. We're committed to fostering an open, welcoming, and safe environment in the community.

📕 We expect everyone participating in the community to abide by our Code of Conduct. Please read and follow it.

🤝 If you'd like to contribute, start by reading our Contribution Guide.

Lets build great software together.

License

This project is available under the Apache License 2.0

You might also like...
A reasonable web framework. Others are faster, but this is likely to be more economical.

intercity A web framework for people wanting to build microservices good and build other stuff good too. Intercity is a reasonable web framework. Othe

Scriptable tool to read and write UEFI variables from EFI shell. View, save, edit and restore hidden UEFI (BIOS) Setup settings faster than with the OEM menu forms.
Scriptable tool to read and write UEFI variables from EFI shell. View, save, edit and restore hidden UEFI (BIOS) Setup settings faster than with the OEM menu forms.

UEFI Variable Tool (UVT) UEFI Variable Tool (UVT) is a command-line application that runs from the UEFI shell. It can be launched in seconds from any

A drop-in replacement for std::time::Instant that is faster and more accurate.

Fastant A drop-in replacement for std::time::Instant that measures time with high performance and high accuracy powered by Time Stamp Counter (TSC). U

🛠️ An experimental functional systems programming language, written in Rust and powered by LLVM as a backend.
🛠️ An experimental functional systems programming language, written in Rust and powered by LLVM as a backend.

An experimental functional systems programming language, written in Rust, and powered by LLVM as a backend. 🎯 Goal: The intent is to create a program

Infino - Fast and scalable service to store time series and logs - written in Rust

Infino 〽️ 🪵 — 🔍 📊 — ⚖️ 💰 Ingest Metrics and Logs — Query and Insights — Scale and Save $$ Infino is an observability platform for storing metrics

Authentication and authorization service, written in Rust

auth-rs auth-rs provides a simple authentication and authorization service for use in other services. The service is written in Rust and uses the acti

This rust compiler backend emmits valid CLR IR, enambling you to use Rust in .NET projects

What is rustc_codegen_clr? NOTE: this project is a very early proof-of-concept This is a compiler backend for rustc which targets the .NET platform an

This is the data collector that gets your system's state and sends it to the backend
This is the data collector that gets your system's state and sends it to the backend

⚡ Installation Linux curl -s https://raw.githubusercontent.com/xornet-cloud/Reporter/main/scripts/install.sh | sudo bash Windows Invoke-Command -Scrip

a (soon to be) calculator frontend and a (soon to be optimizing) toy IR backend

Zach-Calc Zach-Calc is a pet project for me to try and better understand pattern matching, optimization, IRs, and the likes. ./libs/* contains librari

Comments
  • Add Order Parameter to the API to sort response data

    Add Order Parameter to the API to sort response data

    Our API currently returns all the data after being processed from the database. When want to give users an option to order the response data based on a column.

    Current API

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

    Updated API

    curl --location 'http://localhost/api' \
    --header 'Content-Type: application/json' \
    --data '{
        "metrics": [
            {
                "field": "orders.subtotal",
                "aggregate_operator": "count"
            },
            {
                "field": "orders.total",
                "aggregate_operator": "sum"
            }
        ],
        "dimensions": [
            {
                "field":"products.category"
            }
        ],
       "order": {
             "field":"orders.subtotal",
             "order":"asc"
        }
    }
    '
    
    good first issue 
    opened by arihantparsoya 2
  • Add Limit Parameter to the API to limit the number of responses

    Add Limit Parameter to the API to limit the number of responses

    Our API currently returns all the data after querying the database. We want to give our users the option to limit the number of responses if he wants.

    Current API

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

    New API

    curl --location 'http://localhost/api' \
    --header 'Content-Type: application/json' \
    --data '{
        "metrics": [
            {
                "field": "orders.subtotal",
                "aggregate_operator": "count"
            },
            {
                "field": "orders.total",
                "aggregate_operator": "sum"
            }
        ],
        "dimensions": [
            {
                "field":"products.category"
            }
        ],
       "limit": 100
    }
    '
    
    good first issue 
    opened by arihantparsoya 2
  • Request: Support for ClickHouse & Postgres DB Support

    Request: Support for ClickHouse & Postgres DB Support

    Awesome work on this project! I'd like to recommend support for ClickHouse and Postgres DBs. By supporting these two databases, I think you will support most of the data analytics field who would be interested in trying this project out.

    opened by tomtom215 0
Owner
Frolic
Developer tools to create customer facing dashboards
Frolic
Build terminal dashboards using ascii/ansi art and javascript

blessed-contrib Build dashboards (or any other application) using ascii/ansi art and javascript. Friendly to terminals, ssh and developers.

Yaron Naveh 15k Jan 2, 2023
Faster and better alternative to Vtop written in Rust.

Rtop Faster and better alternative to Vtop written in Rust. Work in Progress Features Lightweight < 1MB Responsive UI Sort Process by Memory, CPU Usag

Squitch 7 Nov 18, 2022
png_defringe_rs is a port of Immorpher's PNG Defringe program written in Rust to achieve easier installation and faster performance.

png_defringe_rs png_defringe_rs is a port of Immorpher's PNG Defringe program written in Rust to achieve easier installation and faster performance. U

null 2 Nov 17, 2022
Build Java applications without fighting your build tool. Drink some espresso.

Espresso Build Java applications without fighting your build tool. Drink some espresso. Features Modern Look & Feel Command line interface inspired by

Hunter LaFaille 5 Apr 2, 2024
Recompile Rust faster. Good for your flow state.

plonk Plonk is a development-time build tool for Rust projects. cargo install cargo-plonk # fn main() { # lib::say_hello(); # } $ cargo build -p exam

Divy Srivastava 16 Dec 12, 2023
fcp is a significantly faster alternative to the classic Unix cp(1) command

A significantly faster alternative to the classic Unix cp(1) command, copying large files and directories in a fraction of the time.

Kevin Svetlitski 532 Jan 3, 2023
A zero-dependency crate for writing repetitive code easier and faster.

akin A zero-dependency crate for writing repetitive code easier and faster. Check Syntax for information about how to use it. Why? Example Syntax NONE

LyonSyonII 36 Dec 29, 2022
Provide CRUD CLI for Moco Activities with Jira Cloud Sync Option for faster time tracking.

Moco CLI Provide CRUD CLI for Moco Activities with Jira Cloud Sync Option for faster time tracking. Available commands Login Jira Must be called befor

Emanuel Vollmer 7 Nov 18, 2022
A Faster(⚡) formatter, linter, bundler, and more for JavaScript, TypeScript, JSON, HTML, Markdown, and CSS Lapce Plugin

Lapce Plugin for Rome Lapce-rome is a Lapce plugin for rome, The Rome is faster ⚡ , A formatter, linter, compiler, bundler, and more for JavaScript, T

xiaoxin 7 Dec 16, 2022
Technically, this does exactly what sleep does but completes much faster!

hypersleep Technically does everything that sleep does but it is "blazingly fast!" For example, $ time sleep 1 real 0m1.005s user 0m0.001s sys

Nigel 4 Oct 27, 2022