@epicdm/flowstate-finance-core
v0.1.7
Published
Canonical journal-entry types and balance utilities shared across FlowState finance consumers. Phase 1 ships types + calculations; the posting engine, mapping resolver, and orchestrator land in subsequent phases (see docs/specs/2026-05-02-flowstate-financ
Maintainers
Readme
@epicdm/flowstate-finance-core
Pure-functional library bridging YNAB primitives (synced via flowstate-connector) to the double-entry accounting model used by flowstate-app-finance.
What this package owns
- Canonical journal-entry types (
JournalEntryDraft,JournalLineDraft,JournalEntrySource) - Balance utilities (
isJournalEntryBalanced,calculateAccountBalance,calculateTrialBalance)
Future phases (per docs/specs/2026-05-02-flowstate-finance-core-posting-engine-design.md) will add:
posting/— pure projection from YNAB primitives toJournalEntryDraftmapping/— source-account → COA resolver + Suspense fallbackschemas/— VCA Zod schemas forsource_account_mappingsandorg_settingspost-batch.ts— orchestrator (postYnabTransactions)
Why
The flowstate-app-finance reports (P&L, Balance Sheet, Trial Balance, GL) consume journalentries + journallines. YNAB syncs into raw records. This package is the bridge — and the canonical owner of the types both layers share.
Status
- Phase 1: Package scaffold + lifted types (this commit)
- Phases 2-10: see the design spec
Install
This is an internal monorepo package. Consumers reference it via workspace protocol:
{
"dependencies": {
"@epicdm/flowstate-finance-core": "workspace:*",
},
}