Skip to content

feat: Pluggable bank sync connector architecture#623

Open
flaggdavid-source wants to merge 1 commit intorohitdash08:mainfrom
flaggdavid-source:feature/bank-sync-connector-architecture
Open

feat: Pluggable bank sync connector architecture#623
flaggdavid-source wants to merge 1 commit intorohitdash08:mainfrom
flaggdavid-source:feature/bank-sync-connector-architecture

Conversation

@flaggdavid-source
Copy link
Copy Markdown

Summary

Implements a pluggable architecture for bank integrations as requested in the bounty issue.

Changes

New Files

  1. app/services/bank_connectors/__init__.py - Package exports
  2. app/services/bank_connectors/base.py - Connector interface:
    • BankConnector abstract base class
    • BankAccount and BankTransaction data models
    • ConnectorStatus enum
  3. app/services/bank_connectors/registry.py - Connector registry
  4. app/services/bank_connectors/mock.py - Mock connector for testing
  5. app/routes/bank_connections.py - REST API endpoints
  6. tests/test_bank_connectors.py - Unit tests (14 tests)

Modified Files

  1. app/models.py - Added:
    • BankConnection model
    • BankAccount model
    • BankTransaction model
  2. app/routes/__init__.py - Registered bank connections blueprint

API Endpoints

  • GET /bank-connections/connectors - List available connectors
  • POST /bank-connections/connectors/<type>/auth-url - Get OAuth URL
  • POST /bank-connections/connectors/<type>/connect - Connect bank
  • GET /bank-connections - List user's connections
  • GET /bank-connections/<id> - Get connection details
  • DELETE /bank-connections/<id> - Disconnect
  • POST /bank-connections/<id>/refresh - Refresh connection
  • POST /bank-connections/<id>/import - Import transactions
  • GET /bank-connections/<id>/transactions - List transactions

Testing

All 14 bank connector tests pass:

tests/test_bank_connectors.py - 14 passed

Acceptance Criteria Met

✅ Connector interface - BankConnector abstract class with OAuth flow
✅ Import & refresh support - import_transactions and refresh_connection endpoints
✅ Mock connector included - MockBankConnector for testing/development

@flaggdavid-source flaggdavid-source force-pushed the feature/bank-sync-connector-architecture branch 2 times, most recently from e3ebf51 to d77a56f Compare March 30, 2026 09:12
@flaggdavid-source flaggdavid-source force-pushed the feature/bank-sync-connector-architecture branch 2 times, most recently from 8812070 to dcded79 Compare April 2, 2026 03:12
- Add BankConnector abstract base class with import/refresh support
- Add MockBankConnector for testing
- Add database model and schema for bank_connections
- Add REST API endpoints for managing bank connections
- Add comprehensive tests (17 tests passing)
@flaggdavid-source flaggdavid-source force-pushed the feature/bank-sync-connector-architecture branch from dcded79 to 26a0531 Compare April 2, 2026 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant