Skip to content

Double Entry DB is a DB first PostgreSQL setup for multi tenant double entry bookkeeping and invoicing. It automatically keeps debits and credits in balance at commit time (via a deferrable trigger), supports draft→posted entries you can lock down, optional RLS, plus reports/materialized views, migrations, seeds, tests, and CI/CD. Built for audits.

License

Notifications You must be signed in to change notification settings

alokpriyadarshii/Double-Entry-DB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Double Entry DB


set -euo pipefail

1) Go to project folder (adjust if you're already there)


cd "Double-Entry-DB"

2) Start Postgres in background


docker compose up -d db

3) Wait until Postgres is ready


until docker compose exec -T db pg_isready -U ledger -d ledgerworks >/dev/null 2>&1; do sleep 0.2; done

4) Run migrations


docker compose run --rm flyway

5) Load demo seed data


./scripts/seed.sh

6) Run DB smoke tests


./scripts/test.sh

7) All commands at once


cd "Double-Entry-DB" 2>/dev/null || true && docker compose up -d db && until docker compose exec -T db pg_isready -U ledger -d ledgerworks >/dev/null 2>&1; do sleep 0.2; done && docker compose run --rm flyway && ./scripts/seed.sh && ./scripts/test.sh

About

Double Entry DB is a DB first PostgreSQL setup for multi tenant double entry bookkeeping and invoicing. It automatically keeps debits and credits in balance at commit time (via a deferrable trigger), supports draft→posted entries you can lock down, optional RLS, plus reports/materialized views, migrations, seeds, tests, and CI/CD. Built for audits.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published