June 14, 2024

Architecting your ledger

Designing your ledger architecture

Ledgers and ledger balances are modeled after the folder-file system of many file managers. How you arrange your files in folders is dependent on how you want to group and find those files.

The same logic applies to your Blnk Ledger. To design your ledger architecture, you need to decide what is most important to your application to track. This forms the first layer of your architecture, the Ledgers.

Once you’ve decided how to set up your ledgers, creating your ledger balances in the right ledgers becomes easy and straightforward to do.

Sample scenario

For example, consider a developer building a fintech application with virtual accounts, cards, and lending features using Blnk to record and manage their transactions.

By default, the General Ledger exists to group your internal balances, i.e., balances owned and managed by your organizations.

If “Features” are the most important things to track, the dev creates three ledgers in their Blnk server for each feature. When a user creates an account, their virtual account will be linked to a balance in the virtual accounts ledger, their cards will be linked to a balance in the cards ledger, and their loans will be linked to a balance in the lending ledger.

With this architecture, the dev can see their position across each of the features. They can track how much money is being received and spent in each feature, how many accounts vs loans have been created, etc.

If “Users” are the most important things to track, the dev creates a ledger for every user that creates an account. Underneath the user’s ledger, each feature will be represented as a balance owned by the user.

With this architecture, the dev can see the user’s position in his application. They can see how much money the user has borrowed, how much money is in their account, the number of transactions they perform across all accounts, etc.

There’s no one way to designing your ledger architecture.

However, understanding deeply what data macros you want to track will provide you with the needed direction on how to set up your ledgers in your Blnk server.

It is advised to always save all internal balances in the General ledger. To learn more about internal balances, click here.
Join our Discord community.
Want to learn about fintech best practices? Come chat with professionals and experts from around the world, learning and sharing for free.
Join Discord
We are open-source.
Download and own your ledger infrastructure with our open-source ledger. Our ledger is constantly being improved and battle-tested by our community.
Go to Github

Building a fintech product? We should talk.

We would love to know what you are building.