# lepiseaparin/bank architecture

> Architecture diagram of the GitHub repository lepiseaparin/bank, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lepiseaparin/bank
- Repository: https://github.com/lepiseaparin/bank

## Overview

This repository provides two kinds of test-facing clients: banking API workflows in two parallel implementations (`senior` and `midle`), and browser workflows for a shopping site. In the sampled API code, `ApiManager` exposes admin and user steps; user steps construct endpoint requests with authentication and expected-response checks. The UI steps wrap page-object actions for login, catalog, basket, and checkout. The tree indicates broader account, deposit, transfer, credit, and repayment workflows; unsampled implementation details and wiring are left implicit.

Main entry points: [`src/main/api/senior/steps/user_steps.py`](https://github.com/lepiseaparin/bank/blob/main/src/main/api/senior/steps/user_steps.py) (User workflows), [`src/main/api/midle/requests`](https://github.com/lepiseaparin/bank/tree/main/src/main/api/midle/requests) (API requesters), [`src/main/ui/steps/login_steps.py`](https://github.com/lepiseaparin/bank/blob/main/src/main/ui/steps/login_steps.py) (Login workflows), [`src/main/api/senior/classes/api_manager.py`](https://github.com/lepiseaparin/bank/blob/main/src/main/api/senior/classes/api_manager.py) (API manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api_senior["Senior API"]
  node_api_client["API manager<br/>[api_manager.py]"]
  node_admin_steps["Admin workflows<br/>[admin_steps.py]"]
  node_user_steps["User workflows<br/>[user_steps.py]"]
  node_api_endpoint["Endpoint catalog<br/>[endpoint.py]"]
  node_api_auth["Auth request specs<br/>[request_specs.py]"]
  node_api_validation["Request validation"]
  node_api_crud["CRUD requester<br/>[crud_requester.py]"]
  node_api_models["Request models"]
  node_api_generator["Random model generator<br/>[model_generator.py]"]
  node_api_response_specs["Response checks<br/>[response_specs.py]"]
end

subgraph group_api_midle["Midle API"]
  node_midle_requests["API requesters"]
  node_midle_specs["Request and response specs"]
  node_midle_models["API models"]
end

subgraph group_ui["Shopping UI"]
  node_ui_catalog_steps["Catalog workflows<br/>[catalog_steps.py]"]
  node_ui_basket_steps["Basket workflows<br/>[basket_steps.py]"]
  node_ui_checkout_steps["Checkout workflows<br/>[checkout_steps.py]"]
  node_ui_login_steps["Login workflows<br/>[login_steps.py]"]
  node_ui_catalog["Catalog page<br/>[catalog_page.py]"]
  node_ui_basket["Basket page<br/>[basket_page.py]"]
  node_ui_checkout["Checkout page<br/>[checkout_page.py]"]
  node_ui_login["Login page<br/>[login_page.py]"]
end

node_bank_service{{"Banking API"}}
node_browser(("Browser user"))
node_shop_site{{"Shopping site"}}

node_api_client -->|"exposes"| node_admin_steps
node_api_client -->|"exposes"| node_user_steps
node_user_steps -->|"selects endpoint"| node_api_endpoint
node_user_steps -->|"builds auth"| node_api_auth
node_user_steps -->|"posts validated"| node_api_validation
node_user_steps -->|"posts unchecked"| node_api_crud
node_api_validation -->|"uses"| node_api_crud
node_user_steps -->|"checks status"| node_api_response_specs
node_api_generator -->|"creates"| node_api_models
node_api_auth -->|"logs in"| node_bank_service
node_midle_requests -->|"sends requests"| node_bank_service
node_midle_requests -->|"uses"| node_midle_specs
node_midle_requests -->|"serializes"| node_midle_models
node_browser -->|"starts login"| node_ui_login_steps
node_ui_login_steps -->|"drives page"| node_ui_login
node_ui_login_steps -->|"authenticates"| node_shop_site
node_ui_catalog_steps -->|"drives page"| node_ui_catalog
node_ui_catalog_steps -->|"browses and sorts"| node_shop_site
node_ui_basket_steps -->|"drives page"| node_ui_basket
node_ui_basket_steps -->|"updates basket"| node_shop_site
node_ui_checkout_steps -->|"drives page"| node_ui_checkout
node_ui_checkout_steps -->|"submits checkout"| node_shop_site

click node_api_client "https://github.com/lepiseaparin/bank/blob/main/src/main/api/senior/classes/api_manager.py"
click node_admin_steps "https://github.com/lepiseaparin/bank/blob/main/src/main/api/senior/steps/admin_steps.py"
click node_user_steps "https://github.com/lepiseaparin/bank/blob/main/src/main/api/senior/steps/user_steps.py"
click node_api_endpoint "https://github.com/lepiseaparin/bank/blob/main/src/main/api/senior/foundation/endpoint.py"
click node_api_auth "https://github.com/lepiseaparin/bank/blob/main/src/main/api/senior/specs/request_specs.py"
click node_api_validation "https://github.com/lepiseaparin/bank/blob/main/src/main/api/senior/foundation/requesters/validate_crud_requester.py"
click node_api_crud "https://github.com/lepiseaparin/bank/blob/main/src/main/api/senior/foundation/requesters/crud_requester.py"
click node_api_models "https://github.com/lepiseaparin/bank/tree/main/src/main/api/senior/models"
click node_api_generator "https://github.com/lepiseaparin/bank/blob/main/src/main/api/senior/generators/model_generator.py"
click node_api_response_specs "https://github.com/lepiseaparin/bank/blob/main/src/main/api/senior/specs/response_specs.py"
click node_midle_requests "https://github.com/lepiseaparin/bank/tree/main/src/main/api/midle/requests"
click node_midle_specs "https://github.com/lepiseaparin/bank/tree/main/src/main/api/midle/specs"
click node_midle_models "https://github.com/lepiseaparin/bank/tree/main/src/main/api/midle/models"
click node_ui_catalog_steps "https://github.com/lepiseaparin/bank/blob/main/src/main/ui/steps/catalog_steps.py"
click node_ui_basket_steps "https://github.com/lepiseaparin/bank/blob/main/src/main/ui/steps/basket_steps.py"
click node_ui_checkout_steps "https://github.com/lepiseaparin/bank/blob/main/src/main/ui/steps/checkout_steps.py"
click node_ui_login_steps "https://github.com/lepiseaparin/bank/blob/main/src/main/ui/steps/login_steps.py"
click node_ui_catalog "https://github.com/lepiseaparin/bank/blob/main/src/main/ui/pages/catalog_page.py"
click node_ui_basket "https://github.com/lepiseaparin/bank/blob/main/src/main/ui/pages/basket_page.py"
click node_ui_checkout "https://github.com/lepiseaparin/bank/blob/main/src/main/ui/pages/checkout_page.py"
click node_ui_login "https://github.com/lepiseaparin/bank/blob/main/src/main/ui/pages/login_page.py"

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_api_client,node_admin_steps,node_user_steps,node_api_endpoint,node_api_auth,node_api_validation,node_api_crud,node_api_models,node_api_generator,node_api_response_specs,node_browser toneBlue
class node_midle_requests,node_midle_specs,node_midle_models toneAmber
class node_ui_catalog_steps,node_ui_basket_steps,node_ui_checkout_steps,node_ui_login_steps,node_ui_catalog,node_ui_basket,node_ui_checkout,node_ui_login,node_bank_service toneMint
class node_shop_site toneIndigo
```

## Components

### Senior API

- [API manager](https://github.com/lepiseaparin/bank/blob/main/src/main/api/senior/classes/api_manager.py): `src/main/api/senior/classes/api_manager.py`
- [Admin workflows](https://github.com/lepiseaparin/bank/blob/main/src/main/api/senior/steps/admin_steps.py): `src/main/api/senior/steps/admin_steps.py`
- [User workflows](https://github.com/lepiseaparin/bank/blob/main/src/main/api/senior/steps/user_steps.py): `src/main/api/senior/steps/user_steps.py`
- [Endpoint catalog](https://github.com/lepiseaparin/bank/blob/main/src/main/api/senior/foundation/endpoint.py): `src/main/api/senior/foundation/endpoint.py`
- [Auth request specs](https://github.com/lepiseaparin/bank/blob/main/src/main/api/senior/specs/request_specs.py): `src/main/api/senior/specs/request_specs.py`
- [Request validation](https://github.com/lepiseaparin/bank/blob/main/src/main/api/senior/foundation/requesters/validate_crud_requester.py): `src/main/api/senior/foundation/requesters/validate_crud_requester.py`
- [CRUD requester](https://github.com/lepiseaparin/bank/blob/main/src/main/api/senior/foundation/requesters/crud_requester.py): `src/main/api/senior/foundation/requesters/crud_requester.py`
- [Request models](https://github.com/lepiseaparin/bank/tree/main/src/main/api/senior/models): `src/main/api/senior/models`
- [Random model generator](https://github.com/lepiseaparin/bank/blob/main/src/main/api/senior/generators/model_generator.py): `src/main/api/senior/generators/model_generator.py`
- [Response checks](https://github.com/lepiseaparin/bank/blob/main/src/main/api/senior/specs/response_specs.py): `src/main/api/senior/specs/response_specs.py`

### Midle API

- [API requesters](https://github.com/lepiseaparin/bank/tree/main/src/main/api/midle/requests): `src/main/api/midle/requests`
- [Request and response specs](https://github.com/lepiseaparin/bank/tree/main/src/main/api/midle/specs): `src/main/api/midle/specs`
- [API models](https://github.com/lepiseaparin/bank/tree/main/src/main/api/midle/models): `src/main/api/midle/models`

### Shopping UI

- [Catalog workflows](https://github.com/lepiseaparin/bank/blob/main/src/main/ui/steps/catalog_steps.py): `src/main/ui/steps/catalog_steps.py`
- [Basket workflows](https://github.com/lepiseaparin/bank/blob/main/src/main/ui/steps/basket_steps.py): `src/main/ui/steps/basket_steps.py`
- [Checkout workflows](https://github.com/lepiseaparin/bank/blob/main/src/main/ui/steps/checkout_steps.py): `src/main/ui/steps/checkout_steps.py`
- [Login workflows](https://github.com/lepiseaparin/bank/blob/main/src/main/ui/steps/login_steps.py): `src/main/ui/steps/login_steps.py`
- [Catalog page](https://github.com/lepiseaparin/bank/blob/main/src/main/ui/pages/catalog_page.py): `src/main/ui/pages/catalog_page.py`
- [Basket page](https://github.com/lepiseaparin/bank/blob/main/src/main/ui/pages/basket_page.py): `src/main/ui/pages/basket_page.py`
- [Checkout page](https://github.com/lepiseaparin/bank/blob/main/src/main/ui/pages/checkout_page.py): `src/main/ui/pages/checkout_page.py`
- [Login page](https://github.com/lepiseaparin/bank/blob/main/src/main/ui/pages/login_page.py): `src/main/ui/pages/login_page.py`

### Other components

- **Banking API**
- **Browser user**
- **Shopping site**

## Connections

- API manager → Admin workflows: exposes
- API manager → User workflows: exposes
- User workflows → Endpoint catalog: selects endpoint
- User workflows → Auth request specs: builds auth
- User workflows → Request validation: posts validated
- User workflows → CRUD requester: posts unchecked
- Request validation → CRUD requester: uses
- User workflows → Response checks: checks status
- Random model generator → Request models: creates
- Auth request specs → Banking API: logs in
- API requesters → Banking API: sends requests
- API requesters → Request and response specs: uses
- API requesters → API models: serializes
- Browser user → Login workflows: starts login
- Login workflows → Login page: drives page
- Login workflows → Shopping site: authenticates
- Catalog workflows → Catalog page: drives page
- Catalog workflows → Shopping site: browses and sorts
- Basket workflows → Basket page: drives page
- Basket workflows → Shopping site: updates basket
- Checkout workflows → Checkout page: drives page
- Checkout workflows → Shopping site: submits checkout
