Skip to content

Build finance foundation schema and backend module structure #12

Description

@theMattCode

User story

As a developer, I want a complete finance foundation schema and backend module skeleton so the rest of the finance system can build on one coherent model.

Depends on

  • None.

Scope

  • Add a forward PostgreSQL migration under i12e/postgres/migrations.
  • Replace the current service_finance.transactions MVP schema with the new foundation schema.
  • Create tables for financial accounts, categories, ledger entries, ledger entry parts, balance snapshots, securities, positions, investment transactions, price snapshots, budgets, budget allocations, recurring plans, reminders, and imported candidates/source metadata placeholders.
  • Keep currency explicit on monetary records and financial accounts.
  • Add Rust finance module structure for accounts, ledger, budgets, reminders, investments, and dashboard reporting.
  • Add domain types/enums and repository traits without building full feature behavior.
  • Ensure sensitive finance details are not logged.

Non-scope

  • Cockpit UI.
  • CSV import, bank sync, or quote providers.
  • Cached dashboard summary tables.
  • Tax tracking.

Acceptance criteria

  • Migrations create the replacement finance schema from an empty database.
  • Current finance MVP table is removed or superseded by the new schema through a forward migration.
  • Backend compiles with the new finance module structure.
  • Domain types represent the resolved glossary in CONTEXT.md.
  • Imported candidates cannot affect ledger, cashflow, or balance in the model.
  • Used setup entities have archive fields/statuses rather than relying on hard deletion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions