From 707ad052cb1bcd5cc0c09a3786578dc74e636dc0 Mon Sep 17 00:00:00 2001 From: Oghenemarho Orukele Date: Mon, 9 Jun 2025 23:18:24 +0200 Subject: [PATCH] shifted diagram to the top of the docs --- README.md | 74 +++++++++++++++++++++++++++---------------------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index c8c06e1..e2043b3 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,43 @@ The client currently covers the following section of the API, and the sections t See the [Rust API docs](https://docs.rs/paystack-rs) or the [examples](/examples). +## Crate module schematic diagram + +A conceptual overview of the crate is illustrated below. This is to help improve the understanding of how the different +parts of the crate interact with each other to work efficiently. The `PaystackClient` module is the central module of +the crate and the best entry point to explore the different parts of the crate. + +```mermaid +--- +config: + layout: dagre + theme: default +--- +flowchart TD + subgraph subGraph0["HTTP Layer"] + HTTPClient["<Trait> HTTPClient"] + ReqwestClient["ReqwestClient"] + OtherClients["OtherClients"] + end + subgraph Core["Core"] + Models["Models"] + APIEndpoints["APIEndpoints"] + Macros["Macros"] + end + subgraph Types["Types"] + Response["Response"] + Request["Request"] + Error["Error"] + end + ReqwestClient --> HTTPClient + OtherClients --> HTTPClient + HTTPClient --> PaystackClient["PaystackClient"] + PaystackClient --> APIEndpoints + APIEndpoints --> Models + Macros --> Models & APIEndpoints + Models --> Response & Request & Error +``` + ## Installation `paystack-rs` uses the `reqwest` HTTP client under the hood and the `tokio` runtime for async operations. @@ -104,43 +141,6 @@ See [CONTRIBUTING.md](/CONTRIBUTING.md) for information on contributing to payst We use Github actions to conduct CI/CD for the crate. It ensure that code is formated properly using `cargo fmt`, as well as proper linting using `cargo clippy`, and finally run all the integration and unit test using `cargo test`. -### Crate module schematic diagram - -A conceptual overview of the crate is illustrated below. This is to help improve the understanding of how the different -parts of the crate interact with each other to work efficiently. The `PaystackClient` module is the central module of -the crate and the best entry point to explore the different parts of the crate. - -```mermaid ---- -config: - layout: dagre - theme: default ---- -flowchart TD - subgraph subGraph0["HTTP Layer"] - HTTPClient["<Trait> HTTPClient"] - ReqwestClient["ReqwestClient"] - OtherClients["OtherClients"] - end - subgraph Core["Core"] - Models["Models"] - APIEndpoints["APIEndpoints"] - Macros["Macros"] - end - subgraph Types["Types"] - Response["Response"] - Request["Request"] - Error["Error"] - end - ReqwestClient --> HTTPClient - OtherClients --> HTTPClient - HTTPClient --> PaystackClient["PaystackClient"] - PaystackClient --> APIEndpoints - APIEndpoints --> Models - Macros --> Models & APIEndpoints - Models --> Response & Request & Error -``` - ## License Licensed under MIT license ([LICENSE-MIT](/LICENSE-MIT)).