# stavomidnite661/sovr-open-banking-v2 architecture

> Architecture diagram of the GitHub repository stavomidnite661/sovr-open-banking-v2, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-07-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/stavomidnite661/sovr-open-banking-v2
- Repository: https://github.com/stavomidnite661/sovr-open-banking-v2

## Overview

1. This repository is really two separate systems under one roof:
   - an Open Banking documentation/content platform
   - a Solidity smart-contract project for financial messaging/payments
   They do not appear to share runtime dependencies or deployment targets.

2. The largest subsystem is the Open Banking docs tree under `open-banking-v2-docs-master/`.
   It is a content-driven site composed of Markdown documentation, API reference files, branding assets, and generated/build outputs. The presence of `toc.json`, `home/index.md`, and `docs/**` indicates a structured docs portal rather than an app with a business backend.

3. The docs content is organized into product-style sections:
   - general entry and onboarding pages
   - “API Overview”
   - “Help”
   - archived legacy API profiles
   - separate EU/UK doc sets in `v1-eu-docs/` and `v1-uk-docs/`
   This suggests the site serves multiple documentation variants from similar source content.

4. The docs layer includes API contract artifacts in `swagger/` and Postman collections in `assets/postman/`.
   These are the main machine-readable integration references for consumers: OpenAPI files describe the endpoints, while Postman collections support manual testing and onboarding.

5. There is also a Next.js frontend inside `open-banking-v2-docs-master/sovr-frontend/`.
   Its source structure shows a page-based UI with `pages/`, reusable UI components in `components/`, custom hooks in `hooks/`, and integration logic in `services/`. This is the interactive part of the documentation/product experience, distinct from the static markdown docs.

6. The Next.js frontend has a thin server-side boundary:
   - one API route at `pages/api/create-live-payment.ts`
   - several user-facing pages such as `payment`, `live-payment`, `blockchain-payment`, `consent`, `diagnostic`, and test/demo pages
   This indicates the frontend can orchestrate payment flows and diagnostics without a separate backend repo.

7. The service layer in `sovr-frontend/services/` is the integration boundary.
   Files like `productionBankingClient.ts`, `liveStripeClient.ts`, `achSmartContract.ts`, and `sovrExchange.ts` suggest the UI delegates to isolated adapters for banking, Stripe/payment processing, smart-contract interaction, and exchange logic. For an architecture diagram, this is the main place to show external dependencies.

8. The frontend is configured as a standard modern React/Next.js app with Tailwind/PostCSS styling and TypeScript.
   The `.next/` directory in the tree is build output/cache, not source. It shows the app has been built and likely deployed in a server-rendered or hybrid Next.js mode.

9. The docs repository has automation around content copying/publishing.
   The GitHub Actions workflow `copy-dirs.yml` implies directory synchronization or publication between doc variants or targets. This is a content distribution mechanism, not business logic.

10. The second major project is `pAYROLL/compliant-fin-messaging/`, a Hardhat-based Solidity project.
   Its core boundaries are:
   - `contracts/` for on-chain logic
   - `scripts/` for deployment
   - `hardhat.config.js` for network/tooling configuration
   - `artifacts/` and `cache/` as build outputs
   This is a separate blockchain delivery path from the Next.js frontend.

11. The smart-contract project is structured for deployment to EVM networks.
   The README mentions Alchemy/Infura-style RPC access and deployment to networks such as Mumbai or Polygon, so the architecture should show an external blockchain network as the runtime target, with deployment initiated from Hardhat scripts.

12. Overall data flow is content/integration driven rather than monolithic:
   - Markdown/OpenAPI/Postman assets feed the documentation site
   - the Next.js frontend uses service adapters to talk to banking/payment/blockchain endpoints
   - the Hardhat project compiles and deploys contracts to a blockchain network
   There is no sign of a shared central backend service or database in this repository.

13. For an architecture diagram, the clearest boundaries are:
   - documentation content source vs. generated site assets
   - interactive frontend vs. external banking/Stripe/blockchain services
   - off-chain frontend tooling vs. on-chain smart-contract deployment/runtime
   That separation best matches how the repository is organized on disk.

Main entry points: [`open-banking-v2-docs-master/sovr-frontend/pages`](https://github.com/stavomidnite661/sovr-open-banking-v2/tree/main/open-banking-v2-docs-master/sovr-frontend/pages) (Pages), [`open-banking-v2-docs-master/home/index.md`](https://github.com/stavomidnite661/sovr-open-banking-v2/blob/main/open-banking-v2-docs-master/home/index.md) (Entry pages), [`open-banking-v2-docs-master/sovr-frontend/services`](https://github.com/stavomidnite661/sovr-open-banking-v2/tree/main/open-banking-v2-docs-master/sovr-frontend/services) (Service adapters), [`open-banking-v2-docs-master/docs`](https://github.com/stavomidnite661/sovr-open-banking-v2/tree/main/open-banking-v2-docs-master/docs) (Docs sections)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_docs_platform["Open Banking docs"]
  node_docs_home["Entry pages<br/>doc content<br/>[index.md]"]
  node_docs_sections["Docs sections<br/>markdown tree"]
  node_docs_toc["Nav model<br/>toc config<br/>[toc.json]"]
  node_docs_swagger["API refs<br/>OpenAPI specs"]
  node_docs_postman["Postman assets<br/>collections"]
  node_docs_branding["Branding assets<br/>site assets"]
  node_docs_publish["Copy workflow<br/>GitHub Actions<br/>[copy-dirs.yml]"]
  node_docs_v1_eu["EU docs<br/>docs variant"]
  node_docs_v1_uk["UK docs<br/>docs variant"]
end

subgraph group_frontend_app["Interactive frontend"]
  node_fe_pages["Pages<br/>Next.js routes"]
  node_fe_api["API route<br/>server boundary"]
  node_fe_components["UI components<br/>React UI"]
  node_fe_hooks["Hooks<br/>state logic"]
  node_fe_services["Service adapters<br/>integration layer"]
  node_fe_next_build["Next build<br/>build output<br/>[.next]"]
  node_fe_config["App config<br/>Next.js config<br/>[next.config.js]"]
end

subgraph group_contracts_project["Smart contracts"]
  node_chain_contracts["Contracts<br/>Solidity sources"]
  node_chain_scripts["Deploy scripts<br/>Hardhat scripts"]
  node_chain_config["Hardhat config<br/>tooling config<br/>[hardhat.config.js]"]
  node_chain_build["Build outputs<br/>compiled artifacts"]
end

node_root(("Repository<br/>mono-repo"))
node_chain_network{{"EVM network<br/>blockchain runtime"}}

node_root -->|"contains"| node_docs_home
node_root -->|"contains"| node_fe_pages
node_root -->|"contains"| node_chain_contracts
node_docs_home -->|"guided by"| node_docs_toc
node_docs_toc -->|"links to"| node_docs_sections
node_docs_sections -->|"references"| node_docs_swagger
node_docs_sections -->|"supports"| node_docs_postman
node_docs_home -->|"uses"| node_docs_branding
node_docs_home -->|"automates"| node_docs_publish
node_docs_home -->|"variants"| node_docs_v1_eu
node_docs_home -->|"variants"| node_docs_v1_uk
node_fe_pages -->|"calls"| node_fe_api
node_fe_pages -->|"composes"| node_fe_components
node_fe_pages -->|"uses"| node_fe_hooks
node_fe_pages -->|"delegates"| node_fe_services
node_fe_components -->|"interacts with"| node_fe_services
node_fe_hooks -->|"orchestrates"| node_fe_services
node_fe_config -->|"configures"| node_fe_pages
node_fe_next_build -->|"built from"| node_fe_pages
node_fe_services -->|"connects to"| node_chain_network
node_chain_scripts -->|"deploys to"| node_chain_network
node_chain_config -->|"configures"| node_chain_scripts
node_chain_contracts -->|"compiles into"| node_chain_build

click node_docs_home "https://github.com/stavomidnite661/sovr-open-banking-v2/blob/main/open-banking-v2-docs-master/home/index.md"
click node_docs_sections "https://github.com/stavomidnite661/sovr-open-banking-v2/tree/main/open-banking-v2-docs-master/docs"
click node_docs_toc "https://github.com/stavomidnite661/sovr-open-banking-v2/blob/main/open-banking-v2-docs-master/toc.json"
click node_docs_swagger "https://github.com/stavomidnite661/sovr-open-banking-v2/tree/main/open-banking-v2-docs-master/swagger"
click node_docs_postman "https://github.com/stavomidnite661/sovr-open-banking-v2/tree/main/open-banking-v2-docs-master/assets/postman"
click node_docs_branding "https://github.com/stavomidnite661/sovr-open-banking-v2/tree/main/open-banking-v2-docs-master/assets"
click node_docs_publish "https://github.com/stavomidnite661/sovr-open-banking-v2/blob/main/open-banking-v2-docs-master/.github/workflows/copy-dirs.yml"
click node_docs_v1_eu "https://github.com/stavomidnite661/sovr-open-banking-v2/tree/main/open-banking-v2-docs-master/v1-eu-docs"
click node_docs_v1_uk "https://github.com/stavomidnite661/sovr-open-banking-v2/tree/main/open-banking-v2-docs-master/v1-uk-docs"
click node_fe_pages "https://github.com/stavomidnite661/sovr-open-banking-v2/tree/main/open-banking-v2-docs-master/sovr-frontend/pages"
click node_fe_api "https://github.com/stavomidnite661/sovr-open-banking-v2/blob/main/open-banking-v2-docs-master/sovr-frontend/pages/api/create-live-payment.ts"
click node_fe_components "https://github.com/stavomidnite661/sovr-open-banking-v2/tree/main/open-banking-v2-docs-master/sovr-frontend/components"
click node_fe_hooks "https://github.com/stavomidnite661/sovr-open-banking-v2/tree/main/open-banking-v2-docs-master/sovr-frontend/hooks"
click node_fe_services "https://github.com/stavomidnite661/sovr-open-banking-v2/tree/main/open-banking-v2-docs-master/sovr-frontend/services"
click node_fe_next_build "https://github.com/stavomidnite661/sovr-open-banking-v2/blob/main/open-banking-v2-docs-master/sovr-frontend/.next"
click node_fe_config "https://github.com/stavomidnite661/sovr-open-banking-v2/blob/main/open-banking-v2-docs-master/sovr-frontend/next.config.js"
click node_chain_contracts "https://github.com/stavomidnite661/sovr-open-banking-v2/tree/main/pAYROLL/compliant-fin-messaging/contracts"
click node_chain_scripts "https://github.com/stavomidnite661/sovr-open-banking-v2/tree/main/pAYROLL/compliant-fin-messaging/scripts"
click node_chain_config "https://github.com/stavomidnite661/sovr-open-banking-v2/blob/main/pAYROLL/compliant-fin-messaging/hardhat.config.js"
click node_chain_build "https://github.com/stavomidnite661/sovr-open-banking-v2/tree/main/pAYROLL/compliant-fin-messaging/artifacts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_docs_home,node_docs_sections,node_docs_toc,node_docs_swagger,node_docs_postman,node_docs_branding,node_docs_publish,node_docs_v1_eu,node_docs_v1_uk toneBlue
class node_fe_pages,node_fe_api,node_fe_components,node_fe_hooks,node_fe_services,node_fe_next_build,node_fe_config toneAmber
class node_chain_contracts,node_chain_scripts,node_chain_config,node_chain_build toneMint
class node_root,node_chain_network toneNeutral
```

## Components

### Open Banking docs

Content-driven documentation platform with generated API references and documentation variants.

- [Entry pages](https://github.com/stavomidnite661/sovr-open-banking-v2/blob/main/open-banking-v2-docs-master/home/index.md): doc content · Top-level landing and onboarding pages for the main docs site. · `open-banking-v2-docs-master/home/index.md`
- [Docs sections](https://github.com/stavomidnite661/sovr-open-banking-v2/tree/main/open-banking-v2-docs-master/docs): markdown tree · Structured documentation for getting started, production, sandbox, help, and archived profiles. · `open-banking-v2-docs-master/docs`
- [Nav model](https://github.com/stavomidnite661/sovr-open-banking-v2/blob/main/open-banking-v2-docs-master/toc.json): toc config · Navigation structure that organizes the documentation portal. · `open-banking-v2-docs-master/toc.json`
- [API refs](https://github.com/stavomidnite661/sovr-open-banking-v2/tree/main/open-banking-v2-docs-master/swagger): OpenAPI specs · Machine-readable API definitions for account info, funds confirmation, events, and payment initiation. · `open-banking-v2-docs-master/swagger`
- [Postman assets](https://github.com/stavomidnite661/sovr-open-banking-v2/tree/main/open-banking-v2-docs-master/assets/postman): collections · Manual testing and onboarding collections for API consumers. · `open-banking-v2-docs-master/assets/postman`
- [Branding assets](https://github.com/stavomidnite661/sovr-open-banking-v2/tree/main/open-banking-v2-docs-master/assets): site assets · Shared styles and imagery used across documentation variants. · `open-banking-v2-docs-master/assets`
- [Copy workflow](https://github.com/stavomidnite661/sovr-open-banking-v2/blob/main/open-banking-v2-docs-master/.github/workflows/copy-dirs.yml): GitHub Actions · Automation for syncing or publishing documentation directories. · `open-banking-v2-docs-master/.github/workflows/copy-dirs.yml`
- [EU docs](https://github.com/stavomidnite661/sovr-open-banking-v2/tree/main/open-banking-v2-docs-master/v1-eu-docs): docs variant · European variant of the Open Banking documentation tree. · `open-banking-v2-docs-master/v1-eu-docs`
- [UK docs](https://github.com/stavomidnite661/sovr-open-banking-v2/tree/main/open-banking-v2-docs-master/v1-uk-docs): docs variant · UK variant of the Open Banking documentation tree. · `open-banking-v2-docs-master/v1-uk-docs`

### Interactive frontend

Next.js application for payment, consent, and diagnostics flows.

- [Pages](https://github.com/stavomidnite661/sovr-open-banking-v2/tree/main/open-banking-v2-docs-master/sovr-frontend/pages): Next.js routes · User-facing routes for payment, live payment, blockchain payment, consent, diagnostics, and demos. · `open-banking-v2-docs-master/sovr-frontend/pages`
- [API route](https://github.com/stavomidnite661/sovr-open-banking-v2/blob/main/open-banking-v2-docs-master/sovr-frontend/pages/api/create-live-payment.ts): server boundary · Thin server-side route that creates live payments. · `open-banking-v2-docs-master/sovr-frontend/pages/api/create-live-payment.ts`
- [UI components](https://github.com/stavomidnite661/sovr-open-banking-v2/tree/main/open-banking-v2-docs-master/sovr-frontend/components): React UI · Reusable interface pieces for bank selection and exchange demos. · `open-banking-v2-docs-master/sovr-frontend/components`
- [Hooks](https://github.com/stavomidnite661/sovr-open-banking-v2/tree/main/open-banking-v2-docs-master/sovr-frontend/hooks): state logic · Custom React hooks that coordinate exchange state and UI behavior. · `open-banking-v2-docs-master/sovr-frontend/hooks`
- [Service adapters](https://github.com/stavomidnite661/sovr-open-banking-v2/tree/main/open-banking-v2-docs-master/sovr-frontend/services): integration layer · Adapters for banking, Stripe, smart-contract, and exchange integrations. · `open-banking-v2-docs-master/sovr-frontend/services`
- [Next build](https://github.com/stavomidnite661/sovr-open-banking-v2/blob/main/open-banking-v2-docs-master/sovr-frontend/.next): build output · Generated Next.js runtime artifacts and compiled bundles. · `open-banking-v2-docs-master/sovr-frontend/.next`
- [App config](https://github.com/stavomidnite661/sovr-open-banking-v2/blob/main/open-banking-v2-docs-master/sovr-frontend/next.config.js): Next.js config · Framework and styling configuration for the frontend. · `open-banking-v2-docs-master/sovr-frontend/next.config.js`

### Smart contracts

Hardhat/Solidity project for EVM deployment.

- [Contracts](https://github.com/stavomidnite661/sovr-open-banking-v2/tree/main/pAYROLL/compliant-fin-messaging/contracts): Solidity sources · On-chain logic compiled and deployed by the Hardhat project. · `pAYROLL/compliant-fin-messaging/contracts`
- [Deploy scripts](https://github.com/stavomidnite661/sovr-open-banking-v2/tree/main/pAYROLL/compliant-fin-messaging/scripts): Hardhat scripts · Deployment entry points for blockchain targets. · `pAYROLL/compliant-fin-messaging/scripts`
- [Hardhat config](https://github.com/stavomidnite661/sovr-open-banking-v2/blob/main/pAYROLL/compliant-fin-messaging/hardhat.config.js): tooling config · Compiler, network, and deployment configuration for EVM targets. · `pAYROLL/compliant-fin-messaging/hardhat.config.js`
- [Build outputs](https://github.com/stavomidnite661/sovr-open-banking-v2/tree/main/pAYROLL/compliant-fin-messaging/artifacts): compiled artifacts · Generated contract artifacts and cache data. · `pAYROLL/compliant-fin-messaging/artifacts`

### Other components

- **Repository**: mono-repo · Contains two largely separate systems: an Open Banking documentation platform and a Solidity contract project.
- **EVM network**: blockchain runtime · External blockchain target such as Polygon or Mumbai used by the contract system.

## Connections

- Repository → Entry pages: contains · Repository includes the main docs entry pages.
- Repository → Pages: contains · Repository includes the interactive frontend.
- Repository → Contracts: contains · Repository includes the smart-contract project.
- Entry pages → Nav model: guided by · Landing content is organized by the table of contents.
- Nav model → Docs sections: links to · Navigation points into the structured docs sections.
- Docs sections → API refs: references · Docs sections are backed by OpenAPI reference files.
- Docs sections → Postman assets: supports · Docs include Postman collections for hands-on testing.
- Entry pages → Branding assets: uses · Shared styling and imagery support the documentation site.
- Entry pages → Copy workflow: automates · Workflow syncs or publishes documentation variants.
- Entry pages → EU docs: variants · EU documentation tree is a parallel variant.
- Entry pages → UK docs: variants · UK documentation tree is a parallel variant.
- Pages → API route: calls · UI routes rely on the server-side payment creation endpoint.
- Pages → UI components: composes · Pages are built from reusable UI components.
- Pages → Hooks: uses · Pages rely on shared client-side state hooks.
- Pages → Service adapters: delegates · User flows delegate integrations to service adapters.
- UI components → Service adapters: interacts with · Demo and selection components feed service-backed flows.
- Hooks → Service adapters: orchestrates · Hooks coordinate exchange and payment behavior through services.
- App config → Pages: configures · Framework config shapes route behavior and rendering.
- Next build → Pages: built from · Compiled output is generated from the page sources.
- Service adapters → EVM network: connects to · Smart-contract adapter targets external EVM networks.
- Deploy scripts → EVM network: deploys to · Deployment scripts publish contracts to the blockchain runtime.
- Hardhat config → Deploy scripts: configures · Hardhat config defines how deployment scripts run.
- Contracts → Build outputs: compiles into · Solidity sources are compiled into artifacts and cache outputs.
