Skip to content

Commit

Permalink
docs: network package c4 diagram initial design (#304)
Browse files Browse the repository at this point in the history
* docs: network package c4 diagram initial design

* docs: architecture diagrams in contributing

---------

Co-authored-by: Fabio Rigamonti <[email protected]>
  • Loading branch information
pierobassa and fabiorigam authored Nov 29, 2023
1 parent cb161b9 commit a4edb21
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,24 @@ To ensure consistency throughout the source code, please adhere to the following
4. For integration tests using thor-solo, if needed, use a `TEST_ACCOUNT` in order to isolate previous integration tests.
5. We follow [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) for commit messages.

# Documentation Updates

## Overview

Accurate and up-to-date documentation is vital for the usability and maintainability of the vechain-sdk. We welcome contributions that improve or update the documentation.

### Guidelines for Documentation Updates

#### Textual Documentation
1. **Clarity and Accuracy**: Ensure that the documentation is clear, accurate, and easy to understand. Avoid technical jargon where possible, or provide explanations for technical terms.
2. **Consistency**: Follow the existing format and style of the documentation. This includes using the same tense, person, and voice.
3. **Markdown Formatting**: Use Markdown formatting appropriately to improve the readability of the document.

#### Architecture Diagrams
1. **Updating Diagrams**: In the `docs/architecture-diagrams` directory, update diagrams if there are significant changes to the system architecture or if you find any outdated diagrams.
2. **Tools**: Use mermaid markdown diagrams that produce clear, high-quality diagrams.
3. **Documenting Changes**: Include a brief description of what was changed in the diagram and why in your pull request.

# Commenting Guidelines

## Class Commenting
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ For advanced testing scenarios, you may require a custom data starting point wit
## Documentation and Examples
- The `./docs` directory houses extensive code examples written as executable demonstrations.
- Dive into the [examples](./docs/README.md) for a hands-on understanding of the SDK capabilities.
- For a comprehensive overview of the package structure, please refer to our [Architecture Diagrams](./docs/architecture-diagrams/) located in the documentation directory.

## Contributing

Expand Down
45 changes: 45 additions & 0 deletions docs/architecture-diagrams/network-package.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
```mermaid
C4Context
title "Vechain-SDK Architecture Overview"
Boundary(b0, "Vechain-SDK Network Package") {
Boundary(b1, "Thor Client") {
System(nodes_module, "Nodes Module", "Manages node operations such as health checks and network status")
System(contracts_module, "Contracts Module", "Handles smart contract interactions including deployment and execution")
System(module_N, "Module N", "Represents additional modular functionality being developed for Thor Client")
}
Boundary(b2, "Thorest Client") {
System(accounts_client, "Accounts Client", "Provides API methods for account management")
System(blocks_client, "Blocks Client", "Enables querying and interacting with blockchain blocks")
System(logs_client, "Logs Client", "Facilitates retrieval and monitoring of transaction logs")
System(transactions_client, "Transactions Client", "Handles creation, signing, and broadcasting of transactions")
System(nodes_client, "Nodes Client", "Offers interfaces to node-specific data and actions")
}
Boundary(b3, "Utilities") {
System(http_client, "HTTP Client", "Customized HTTP client for efficient network request handling")
Boundary(b5, "Polling Utilities"){
System(sync_poll, "Synchronous Polling", "Performs blocking polling operations for synchronous processes")
System(async_poll, "Asynchronous Event Poll", "Implements event-driven polling for asynchronous workflows")
}
}
Boundary(b4, "External Blockchain Interaction") {
System_Ext(vechainthor, "VechainThor Blockchain", "Represents the VechainThor blockchain platform with which the SDK interacts")
}
}
Rel(nodes_module, nodes_client, "Utilizes")
Rel(contracts_module, transactions_client, "Interacts with")
Rel(contracts_module, accounts_client, "Interacts with")
Rel(accounts_client, http_client, "Utilizes for network requests")
Rel(blocks_client, http_client, "Utilizes for network requests")
Rel(logs_client, http_client, "Utilizes for network requests")
Rel(transactions_client, http_client, "Utilizes for network requests")
Rel(nodes_client, http_client, "Utilizes for network requests")
BiRel(http_client, vechainthor, "Sends and receives data from")
UpdateLayoutConfig($c4ShapeInRow="3", $c4BoundaryInRow="1")
```

1 comment on commit a4edb21

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Coverage

Summary

Lines Statements Branches Functions
Coverage: 100%
100% (1226/1226) 100% (267/267) 100% (258/258)
Title Tests Skipped Failures Errors Time
core 319 0 💤 0 ❌ 0 🔥 1m 10s ⏱️
network 86 0 💤 0 ❌ 0 🔥 51.756s ⏱️
errors 30 0 💤 0 ❌ 0 🔥 8.189s ⏱️

Please sign in to comment.