Skip to content

Web app: support multiple bank connections (multi-source) #313

Description

@corentin-core

Context

The app is deliberately single-connection: one Enable Banking consent, one API source, and a flat sync_runs log with no source dimension. This matches the epic #293 decision ("single shared budget, single consent"). Supporting several bank connections at once (e.g. BNP + Boursorama, each with its own consent and expiry) would be a natural extension once the need arises.

Captured while building the in-app alerting (#306) so the design intent isn't lost.

Proposed solution

An extension, not a rewrite — the domain/services layer already syncs per-source under the hood (BankSyncService takes a source + account name). What multi-source touches:

Zone Today Multi-source
Consent storage one consent.json N consents keyed by bank/account, each with its own expiry
perform_sync syncs "the" consented account loops over connections, one SyncRun per source
sync_runs table no source column add a source column; history filterable per bank
Consent banner one status aggregate (worst status, or a list)
Failed-sync banner + supersession "the" consent per source: correlate run.source with that source's consent created_at
Réglages one connection panel one card per bank (status + Sync now + history)

The #306 supersession rule (hide a failed-sync banner once superseded by a newer consent) generalizes cleanly to per-source — no rework.

Acceptance criteria

  • Multiple Enable Banking consents can be stored and renewed independently.
  • sync_runs records the source of each run; Réglages shows per-bank status and history.
  • Consent and failed-sync banners reflect all connections, each supersession scoped to its own source.

Related issues

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions