Skip to content

Point sources: what generates journal entries? #1

@avandenberghe

Description

@avandenberghe

Context

The core ledger (see avatharbe/bbAccounts-dev#1) is source-agnostic. Any module can create journal entries by calling the ledger service:

DR  5xxx Expense Account         X.XX
CR  2100 User Wallets — Cash     X.XX  (subledger: user)

This issue tracks which point sources to implement as modules, and in what order.

Candidate Sources

Each of these would be a separate module (or extension) that depends on the core ledger:

Source Journal Pattern Origin
Forum activity Posts, topics, edits, attachments, polls → expense vs user wallet ultimatepoints
Admin grants Manual ACP entry → expense vs user wallet Built into Phase 1
Registration bonus On user_add → expense vs user wallet ultimatepoints
Warning penalty On mcp_warn → user wallet vs expense (reversal) ultimatepoints
Transfers User-to-user reclassification + fee revenue ultimatepoints
Bank interest Cron → interest expense vs user savings ultimatepoints
DKP raids Raid earnings → expense vs user wallet bbDKP
Patreon webhooks Pledge events → revenue vs user wallet bbPatreon
External API Webhook/REST endpoint → configurable accounts New

Open Questions

  • Which sources should be bundled with bbAccounts vs. separate extensions?
  • Should forum activity points be part of bbAccounts or a standalone bbaccounts-forum extension?
  • Should the ledger service expose a generic "source adapter" interface that modules register against?
  • Priority order for implementation after Phase 1?

Relation to Phase 1

Phase 1 (#1) includes admin manual entries only as the point source. All other sources are future modules that depend on the ledger service being in place.

Tasks

Decomposition deferred until Phase 2 closes. The Phase 3 plan will be drafted after this issue resolves the point-sources architectural decision; the source-adapter interface decided here shapes every Phase 3 implementation task that follows.

  • (to be filed once Phase 3 is planned — contrib/plans/ will get a bbaccounts-phase3-plan.md)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions