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

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

- Add BankConnector abstract interface with OAuth flow support
- Add BankAccount and BankTransaction data models
- Add MockBankConnector for testing and development
- Add ConnectorRegistry for managing available connectors
- Add database models: BankConnection, BankAccount, BankTransaction
- Add REST API endpoints for bank connection management
- Add comprehensive tests for the connector system

Implements:
- Connector interface with import & refresh support
- Mock connector included for testing
- Pluggable architecture for future bank integrations
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