Overview

This is your guide to getting started with Blnk, pronounced as /blank/. If you are new to Blnk or open-source fintech developer tools, this is where you should start.
Here is your start kit: ✨

What is Blnk?

Blnk offers an open-source financial ledger database for building and scaling fintech products. With Blnk, you can:
  • Accurately record transactions in your system.
  • Correctly manage complex flow of funds and transaction data.
  • Reliably manage the size of your transactions as your product scales.

1. Launch Blnk

To install Blnk, make sure you have Docker and Compose installed and running on your machine. To get started with Blnk, first clone the repository into your machine:
bash
git clone https://github.com/blnkfinance/blnk && cd blnk
Next, create a configuration file, blnk.json:
bash
touch blnk.json
Then copy and save the following configuration:
blnk.json
{
  "project_name": "Blnk",
  "data_source": {
    "dns": "postgres://postgres:password@postgres:5432/blnk?sslmode=disable"
  },
  "redis": {
    "dns": "redis:6379"
  },
  "server": {
    "port": "5001"
  },
  "queue": {
    "monitoring_port": "5004"
  }
}
Finally, start your Blnk server with Docker compose:
bash
docker compose up
Your Blnk server is now running! You can verify it’s working by visiting http://localhost:5001 in your browser.

2. Create your first transaction

Now that Blnk is running, let’s create your first transaction. Blnk uses the double entry principle to record transactions, which means every transaction must have a source and destination.
curl -X POST 'http://localhost:5001/transactions' \
  -H 'Content-Type: application/json' \
  -d '{
    "amount": 1000,
    "reference": "first_transaction_001",
    "currency": "USD",
    "precision": 100,
    "source": "@FundingPool",
    "destination": "@MyBalance",
    "description": "My first Blnk transaction",
    "allow_overdraft": true,
    "meta_data": {}
  }'
Congratulations! You’ve successfully created your first transaction in Blnk.
Finally, let’s view our balances to confirm that the transaction was recorded:
curl -X GET 'http://localhost:5001/balances'
This will return a list of all balances in your system. You should see the @FundingPool balance (which will be negative since it funded the transaction) and the @MyBalance balance (which will show the amount we transferred).
You’ve successfully completed the Blnk getting started guide! You now have a working Blnk instance with your first transaction recorded.

Dive Deeper

Now that you’ve created your first transaction, explore these key concepts to build your application:

Use cases

Here’s some of what you can build with Blnk:

Need help?

We are very happy to help you make the most of Blnk, regardless of whether it is your first time or you are switching from another tool. To ask questions or discuss issues, please contact us or join our Discord community.