# ISO-20022 Combo Flow A visual workflow builder for composing multi-step financial transactions that combine ISO-20022 banking messages with DLT (Distributed Ledger Technology) operations. Think of it as combining Venmo, your bank, and a crypto exchange into one easy-to-use interface. ## ๐ŸŽฏ Overview This system enables users to build complex financial workflows by: - Dragging and dropping financial steps (borrow, swap, repay, pay) - Combining DeFi protocols with traditional banking rails - Executing multi-step transactions atomically using 2PC (Two-Phase Commit) - Ensuring compliance with LEI/DID/KYC/AML requirements - Providing real-time execution monitoring and audit trails ## ๐Ÿ—๏ธ Architecture ``` CurrenciCombo/ โ”œโ”€โ”€ webapp/ # Next.js 14 frontend application โ”œโ”€โ”€ orchestrator/ # Backend orchestrator service (TypeScript/Express) โ”œโ”€โ”€ contracts/ # Smart contracts (Solidity) โ””โ”€โ”€ docs/ # Documentation and specifications ``` ## โœจ Features ### Frontend - ๐ŸŽจ Drag-and-drop workflow builder - ๐Ÿ”„ Real-time execution monitoring via SSE - โœ… Compliance status dashboard (LEI/DID/KYC/AML) - ๐Ÿงช Optional simulation panel for advanced users - ๐Ÿ” Multi-wallet Web3 integration - ๐Ÿ“Š Step dependency visualization ### Backend - ๐Ÿ”„ 2PC (Two-Phase Commit) execution coordination - ๐Ÿ“ ISO-20022 message generation (pacs.008, camt.052/053, camt.056) - ๐Ÿฆ Multi-bank connector support (SWIFT, SEPA, FedNow) - ๐Ÿ”’ Compliance engine integration - ๐Ÿ“‹ Notary service for immutable audit trails - ๐ŸŽซ Receipt generation and aggregation ### Smart Contracts - โšก Atomic execution handler - ๐Ÿ“œ Adapter registry with whitelist/blacklist - ๐Ÿ” Notary registry for codehash tracking - ๐Ÿ”Œ Example adapters (Uniswap, Aave, ISO-20022 Pay) ## ๐Ÿš€ Quick Start ### Prerequisites - Node.js 18+ - npm or yarn - Git ### Installation 1. **Clone the repository** ```bash git clone https://github.com/your-org/CurrenciCombo.git cd CurrenciCombo ``` 2. **Install frontend dependencies** ```bash cd webapp npm install ``` 3. **Install orchestrator dependencies** ```bash cd ../orchestrator npm install ``` 4. **Install contract dependencies** ```bash cd ../contracts npm install ``` ### Development **Frontend (Next.js)** ```bash cd webapp npm run dev # Open http://localhost:3000 ``` **Orchestrator Service** ```bash cd orchestrator npm run dev # Runs on http://localhost:8080 ``` **Smart Contracts** ```bash cd contracts npm run compile npm run test ``` ## ๐Ÿ“š Documentation - [Engineering Ticket Breakdown](./docs/Engineering_Ticket_Breakdown.md) - [UI/UX Specification](./docs/UI_UX_Specification_Builder_V2.md) - [Smart Contract Interfaces](./docs/Smart_Contract_Interfaces.md) - [Adapter Architecture](./docs/Adapter_Architecture_Spec.md) - [Compliance Integration](./docs/Compliance_Integration_Spec.md) - [OpenAPI Specification](./docs/Orchestrator_OpenAPI_Spec.yaml) - [Final Implementation Summary](./docs/FINAL_IMPLEMENTATION_SUMMARY.md) ## ๐Ÿงช Testing ### E2E Tests (Playwright) ```bash cd webapp npm run test:e2e ``` ### Smart Contract Tests (Hardhat) ```bash cd contracts npm run test ``` ## ๐Ÿ”ง Configuration ### Environment Variables **Frontend** (`webapp/.env.local`): ```env NEXT_PUBLIC_ORCH_URL=http://localhost:8080 NEXTAUTH_URL=http://localhost:3000 NEXTAUTH_SECRET=your-secret-key AZURE_AD_CLIENT_ID=your-azure-ad-client-id AZURE_AD_CLIENT_SECRET=your-azure-ad-client-secret ``` **Orchestrator** (`orchestrator/.env`): ```env PORT=8080 DATABASE_URL=postgresql://user:pass@localhost:5432/comboflow NODE_ENV=development ``` ## ๐Ÿ“ฆ Project Structure ``` . โ”œโ”€โ”€ webapp/ # Next.js frontend โ”‚ โ”œโ”€โ”€ src/ โ”‚ โ”‚ โ”œโ”€โ”€ app/ # App router pages โ”‚ โ”‚ โ”œโ”€โ”€ components/ # React components โ”‚ โ”‚ โ”œโ”€โ”€ lib/ # Utilities โ”‚ โ”‚ โ””โ”€โ”€ store/ # Zustand state โ”‚ โ””โ”€โ”€ tests/e2e/ # Playwright tests โ”‚ โ”œโ”€โ”€ orchestrator/ # Backend service โ”‚ โ”œโ”€โ”€ src/ โ”‚ โ”‚ โ”œโ”€โ”€ api/ # Express routes โ”‚ โ”‚ โ”œโ”€โ”€ services/ # Business logic โ”‚ โ”‚ โ”œโ”€โ”€ integrations/ # External integrations โ”‚ โ”‚ โ””โ”€โ”€ db/ # Database layer โ”‚ โ”œโ”€โ”€ contracts/ # Smart contracts โ”‚ โ”œโ”€โ”€ ComboHandler.sol # Main handler โ”‚ โ”œโ”€โ”€ NotaryRegistry.sol # Notary registry โ”‚ โ”œโ”€โ”€ AdapterRegistry.sol # Adapter registry โ”‚ โ””โ”€โ”€ adapters/ # Protocol adapters โ”‚ โ””โ”€โ”€ docs/ # Documentation ``` ## ๐Ÿค Contributing See [CONTRIBUTING.md](.github/CONTRIBUTING.md) for guidelines. ## ๐Ÿ“„ License MIT License - see [LICENSE](LICENSE) file for details. ## ๐Ÿ”— Links - [Documentation](./docs/) - [Issue Tracker](https://github.com/your-org/CurrenciCombo/issues) - [Discussions](https://github.com/your-org/CurrenciCombo/discussions) ## ๐Ÿ‘ฅ Authors - Your Organization --- **Status**: โœ… All 28 engineering tickets completed | Ready for integration testing