feat: Pluggable bank sync connector architecture#623
Open
flaggdavid-source wants to merge 1 commit intorohitdash08:mainfrom
Open
feat: Pluggable bank sync connector architecture#623flaggdavid-source wants to merge 1 commit intorohitdash08:mainfrom
flaggdavid-source wants to merge 1 commit intorohitdash08:mainfrom
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements a pluggable architecture for bank integrations as requested in the bounty issue.
Changes
New Files
app/services/bank_connectors/__init__.py- Package exportsapp/services/bank_connectors/base.py- Connector interface:BankConnectorabstract base classBankAccountandBankTransactiondata modelsConnectorStatusenumapp/services/bank_connectors/registry.py- Connector registryapp/services/bank_connectors/mock.py- Mock connector for testingapp/routes/bank_connections.py- REST API endpointstests/test_bank_connectors.py- Unit tests (14 tests)Modified Files
app/models.py- Added:BankConnectionmodelBankAccountmodelBankTransactionmodelapp/routes/__init__.py- Registered bank connections blueprintAPI Endpoints
GET /bank-connections/connectors- List available connectorsPOST /bank-connections/connectors/<type>/auth-url- Get OAuth URLPOST /bank-connections/connectors/<type>/connect- Connect bankGET /bank-connections- List user's connectionsGET /bank-connections/<id>- Get connection detailsDELETE /bank-connections/<id>- DisconnectPOST /bank-connections/<id>/refresh- Refresh connectionPOST /bank-connections/<id>/import- Import transactionsGET /bank-connections/<id>/transactions- List transactionsTesting
All 14 bank connector tests pass:
Acceptance Criteria Met
✅ Connector interface -
BankConnectorabstract class with OAuth flow✅ Import & refresh support -
import_transactionsandrefresh_connectionendpoints✅ Mock connector included -
MockBankConnectorfor testing/development