Skip to content

Double entry accounting milestone 2 - #80

Merged
chongfun merged 2 commits into
double_entry_accounting_milestone_1from
double_entry_accounting_milestone_2
Aug 24, 2026
Merged

Double entry accounting milestone 2#80
chongfun merged 2 commits into
double_entry_accounting_milestone_1from
double_entry_accounting_milestone_2

Conversation

@chongfun

Copy link
Copy Markdown
Owner

At the end of this milestone, Yanushi should have this infrastructure:

User
├── Account
│
└── JournalEntry
    └── Posting
        ├── Account
        ├── Property?
        ├── RentableUnit?
        ├── Tenancy?
        └── Party?

and these application services:

Accounting::ChartOfAccounts
Accounting::PostingSpec
Accounting::PostingBuilder
Accounting::PostEntryService
Accounting::ReverseEntryService

The system must guarantee, through those boundaries:

every posted journal entry balances

posting the same source event twice is idempotent

conflicting reuse of an idempotency key fails loudly

journal entries and postings cannot be edited or deleted

reversals preserve the original entry

dimensions belong to the same user and form a consistent hierarchy

entries and postings are persisted atomically

@chongfun chongfun self-assigned this Aug 16, 2026
@chongfun
chongfun force-pushed the double_entry_accounting_milestone_2 branch from 4b51ed0 to 469e8c3 Compare August 16, 2026 18:06
- Add accounts, journal_entries, and postings tables with check constraints and unique indexes
- Implement Account, JournalEntry, and Posting primitive models with strict immutability and dimension validation
- Implement Accounting::ChartOfAccounts provisioning service with 17 system accounts
- Implement Accounting::PostingSpec and Accounting::PostingBuilder for specification normalization and validation
- Implement Accounting::PostEntryService with balanced multi-line persistence, idempotency, and concurrency collision recovery
- Implement Accounting::ReverseEntryService for atomic reversals linking via reversal_of_id
- Add comprehensive unit, invariant, and database constraint specs
- Update RBS signatures, Steepfile, and documentation/accounting_architecture.md
@chongfun
chongfun force-pushed the double_entry_accounting_milestone_2 branch from 469e8c3 to 7a5f993 Compare August 21, 2026 06:03
@chongfun
chongfun merged commit 4114ed1 into main Aug 24, 2026
5 checks passed
@chongfun
chongfun deleted the double_entry_accounting_milestone_2 branch August 24, 2026 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant