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.
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", // <table_name>.<column_name>
"aggregate_operator": "sum"
}
],
"dimensions": [
{
"field": "products.category" // <table_name>.<column_name>
}
]
}
'
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"
}
]
}
git clone https://github.com/frolicorg/frolic.git
Configure your database in config.toml.
Use docker to run the database
docker-compose up --build
You can start using the docker container path to query your data.
- 🚀 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)
We currently support MySQL, Postgres & Clickhouse database. We will add integrations with other databases in the future.
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.
Issues are inevitable. When you have one, our entire team and our active developer community is around to help.
💬 Ask for help on Discord
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.
This project is available under the Apache License 2.0