Commit Graph

6 Commits

Author SHA1 Message Date
2487d8a2f9 docs: README with full setup guide
Covers: Enable Banking signup, RSA key generation, running setup script,
docker-compose wiring, OAuth redirect flow diagram, supported French banks,
and troubleshooting.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 10:34:52 +02:00
fa3463a6e3 feat: Dockerfile and docker-compose
Dockerfile: node:20-alpine, exposes 3456, STORE_PATH=/app/data/store.json.
docker-compose.yml: proxy service with ./data volume mount + inline comments
showing how to wire GOCARDLESS_BASE_URL into an existing actual-server compose.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 10:34:45 +02:00
b4f174dcff feat: interactive setup script
Prompts for EB app_id and RSA private key path, validates the key with jose,
generates GC secret_id/secret_key, writes to data/store.json, and prints
the values to enter in Actual Budget's GoCardless settings.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 10:34:23 +02:00
57a808c054 feat: GoCardless proxy server (all /api/v2/* routes)
Implements the full GoCardless Bank Account Data API surface that
actual-server expects:
  POST /api/v2/token/new/              fake GC tokens backed by stored secret_id/key
  POST /api/v2/token/refresh/
  GET  /api/v2/institutions/           proxies EB /aspsps, 1 h cache
  POST /api/v2/agreements/enduser/     stored locally
  GET  /api/v2/agreements/enduser/:id/
  POST /api/v2/requisitions/           calls EB /auth, returns OAuth link
  GET  /api/v2/requisitions/:id/       status CR→LN after callback
  DELETE /api/v2/requisitions/:id/
  GET  /api/v2/accounts/:id/           metadata from store
  GET  /api/v2/accounts/:id/details/   proxies EB /accounts/:uid/details
  GET  /api/v2/accounts/:id/balances/  proxies EB /accounts/:uid/balances
  GET  /api/v2/accounts/:id/transactions/ proxies EB transactions, splits booked/pending
  GET  /callback                       OAuth callback: exchanges code, links requisition,
                                       redirects back to actual-server

Balance type mapping: EB ISO 20022 (CLBD/ITBD/ITAV/FWAV…) → GC camelCase.
Transaction mapping: EB flat array with status field → GC {booked, pending}.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 10:34:12 +02:00
2d81b498d9 feat: add store (JSON persistence) and Enable Banking API client
store.js: read/write ./data/store.json; holds config, tokens, agreements,
requisitions, account mappings.

eb-client.js: RS256 JWT auth (cached, refreshed 60s before expiry),
wrappers for /aspsps, /auth, /sessions, /accounts/* endpoints.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 10:33:42 +02:00
ccb8efd72a chore: initialise project (package.json, .gitignore)
ESM Node.js project using express, jose, node-fetch, uuid.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 10:33:33 +02:00