16 comments

[ 2.4 ms ] story [ 77.2 ms ] thread
Hey hackernews!

Ive been building this Covid project for the last 18 months which is an accounting server that manages double entry bookkeeping transactions and formats them nicely in either SQLite or MySQL.

Its mostly command line driven right now but also working on a GUI frontend here:

https://github.com/darcys22/godbledger-web

The goal was to make a server that could run perpetually and when i wanted to record my accounts i could do so via a script. Also wanted to analyse the financials via the database directly and i found that current accounting software didnt really let you do those simple things.

I love the look of this. I've used a lot of CLI tools for budgeting. This could be the next thing I try.

I'm surprised you haven't more traction on HN. I'm sure this will catch a lot of attention at some point. Great work.

The name makes me laugh I keep reading God Bledger.

Thank you! Yeah the name plays well and i like that about it but it was totally by accident.

Golang, DataBase, Ledger

Hey I watched the demo video - typing in the account names .. what if you make a mistake? No select from list? Seems very easy to bungle small amounts or accounts?
Yeah i mean the command line is a pretty thin layer of protection. Definitely trying to get the GUI built so that stronger validation can exist here. I guess the gRPC interface came first, then command line, then the more rigid tools for actual business use.
Nice work. I’m a coder who started my career as an accountant.

Over the years I’ve seen many dev projects get stuck on modelling the double entry system. Would be great to have this as a jump off point for many future finance projects.

Wish you all the best with it.

Is it possible to put the database in a state where debits and credits do not equal. What approaches did you use towards always keeping these equal?

Do you mind if I ask why you made the switch?
I am currently an accountant who codes on the side. I have been writing my own accounting software for learning purposes.

Modelling double entry is a lot tricker than one would imagine. I think that Gnucash's approach is pretty good.

Same! Only made the switch to full time dev 12 months ago. GoDBLedgers database schema is pretty much identical to Gnucash
Cool. I will take a look!
Thank you! But i think having the option for them not to equal and do single entry bookkeeping is key. All the tools validate that the journals balance so it really takes effort for them not to balance. However ive been playing around with having accounts for things like ‘bank statements’ that are one sided and not shown as part of the GL. This allows for bank feeds to be built into the system and can reconcile against actual GL transactions.

I guess my strategy is delegating the enforcement of balancing journals onto higher levels of the system. The databases job is just to format the transactions nicely, building tools and scripts that can audit the GL and highlight bad transactions will definitely need to exist. Conceptually i think accounting systems need a CI system that runs after you push a transaction through to ensure that your journals are correct

I think this concept of a CI-like system for accounting is really interesting. You allow bad journal entries to go through but you show exactly which one put the GL out of balance. You know, that shouldn’t be too hard to build. I don’t really need that for my current project since all journal entries follows templates that were designed and well tested, but I’m fairly certain I have all the structure necessary for building it. Lemme know if you’d be interested in working on this CI, I could give you a hand ;)
Yeah 100% because its not just journals being out of balance thats the risk. Checks for other things like asset registers becoming out of sync with your asset accounts could be included depending on the businesses needs.

Would love to discuss this further

Awesome! I’ll ping you on telegram
Have you seen the other double entry book keeping projects that revolve around plain text accounting? https://plaintextaccounting.org/

What would the benefits of your solution be over something like beancount?

Beancount is great, a lot of the system is actually inspired by ledgercli too. I managed to use some the code for goledger so can import the ledgercli text files into godbledger. The main benefit though is to step away from the text based accounting and put the transactions into a database where you can use traditional tools to analyse your financials. Being able to do this:

https://youtu.be/PeQR7GseFQI

Was pretty exciting early on which you cant do with the text based accounting systems.