A

A complete double-entry accounting system in PostgreSQL

Hacker News

A complete double-entry accounting system in PostgreSQL

I wanted to share an interesting experiment I've been working on: creating a double-entry accounting system entirely in a PostgreSQL database. It's inspired by plain-text accounting, especially Beancount, a fantastic project for plain-text double-entry accounting. I've implemented most core accounting features as PostgreSQL functions, including multi-currency support, account balance calculations, and cost-basis calculations for lot matching, average cost, FIFO, or LIFO. It turns out it's easier to create a "database-based" accounting system than you'd think! The core idea is to use a custom PostgreSQL type called amount, which combines a numeric value with a currency and then write custom aggregation functions to sum amounts into balances (baskets of currencies) which can be used in other custom functions. I also created two Python scripts: one to import Beancount files into the database and another to export the database back to a Beancount file. I've been using this system, called Beanpost, with my personal Beancount file, which has about four years of data and over 10,000 transactions across multiple currencies. I started Beanpost for fun and to create a backend for a custom mobile-friendly web app using Beancount data. While a database isn't as immediately usable as a text file, the possibilities for integrating with other tools are broader. I'm not sure where to take this next, but it's been a fun experiment, and I hope some of you find it intriguing. I'd love to hear any feedback or suggestions! Here's the link if you'd like to check it out: https://github.com/gerdemb/beanpost

Share card

Actual performance

4points
1comments
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Strong signals: created, started, including · Missing: supports, reddit linkedin, podcasting
94%94% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Product HuntOn track for Day 1 leaderboard · Strong signals: using, plain · Missing: mac, agents, macos
64%64% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Strong signals: personal · Missing: mobile apps, ios, entrepreneurs
46%46% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Hacker NewsMay not resonate with HN audience · Strong signals: ide, 000, io · Missing: https docs, excited, just released
44%44% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
AppSumoMay struggle as an AppSumo deal · Strong signals: friendly · Missing: plus, platform, intuitive
34%34% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
14%14% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

Am
Amatino – A double-entry accounting API44%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Amatino – A double-entry accounting API

Hacker News67
Jo
Journalize Snippets, gists for double-entry accounting39%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Journalize Snippets, gists for double-entry accounting

Hacker News3
Sc
Scaledger, a double-entry accounting database with a typed GraphQL API67%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Scaledger, a double-entry accounting database with a typed GraphQL API

Hacker News10
Do
Double-entry accounting based personal finance app50%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Double-entry accounting based personal finance app

Hacker News63
Ka
Kafka FDW for PostgreSQL65%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Kafka FDW for PostgreSQL

Hacker News2
es
es2postgres – ElasticSearch to PostgreSQL Loader71%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

es2postgres – ElasticSearch to PostgreSQL Loader

Hacker News3
Me
Metagration: PostgreSQL Migrator in PostgreSQL56%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Metagration: PostgreSQL Migrator in PostgreSQL

Hacker News1
PR
PRQL in PostgreSQL73%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

PRQL in PostgreSQL

Hacker News267
A
A Ruby wrapper for Olm double ratchet34%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A Ruby wrapper for Olm double ratchet

Hacker News1
Do
Double-X-Encoding – Encode any UTF-8 string with [0-9a-zA-Z_]35%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Double-X-Encoding – Encode any UTF-8 string with [0-9a-zA-Z_]

Hacker News3