-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add missing documentation and readme files
- Loading branch information
Showing
7 changed files
with
52 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Internal Module | ||
|
||
## Description | ||
|
||
This application is built upon the principles of Clean Architecture. Clean Architecture emphasizes separation of concerns, making the codebase easier to maintain, test, and scale. The architecture is structured to allow flexibility and independence from frameworks, which enhances the portability of the code. | ||
|
||
For more information about Clean Architecture, you may refer to the following resources: | ||
- [Clean Architecture: A Craftsman's Guide to Software Structure and Design by Robert C. Martin](https://www.oreilly.com/library/view/clean-architecture-a/9780134494272/) | ||
- [Clean Architecture](https://github.com/preslavmihaylov/booknotes/tree/master/architecture/clean-architecture) | ||
|
||
## Structure | ||
|
||
The internal module is organized into the following components: | ||
|
||
- **Domain**: Contains the core business logic and entities. This is where the application's fundamental rules are defined. | ||
- **Use Case**: Represents application-specific business rules and orchestrates the flow of data between the domain and external layers. | ||
- **Unit of Work (UoW)**: Manages transactional boundaries and ensures that a series of operations can be committed or rolled back as a single unit. | ||
- **Repository**: Abstracts the data access layer, providing methods for retrieving and storing entities. | ||
- **Worker**: Provides abstractions for running background tasks and managing asynchronous operations. | ||
- **DTO (Data Transfer Object)**: Handles the data transfer between use cases and the external world, ensuring that only the necessary data is exposed and passed around. | ||
|
||
This structure facilitates maintainability and scalability by enforcing clear boundaries and responsibilities within the application. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
class ModelNotFoundException(Exception): | ||
""" | ||
Exception raised when a storage model is not found in some data storage. | ||
This exception may be thrown only by the repository. | ||
""" | ||
def __init__(self, message: str): | ||
""" | ||
Initializes an instance of ModelNotFoundException with a default message. | ||
""" | ||
super().__init__(message) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# infrastructure module | ||
This module implements an infrastructure layer from a pure architecture. | ||
|
||
## submodules | ||
`background_task` - implementation of tasks execution in the background. Provides functionality for specific worker implementations. | ||
|
||
`data_storage` - provides various tools and functions for managing data stores and transactions in them - settings, connections, contexts, migrations, etc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# repository module | ||
This module contains implementations of all repositories. | ||
To implement your repository, create a module here for the repository that the repository works with (or use an existing one), and then implement the repository WITHOUT inheriting from interfaces. It is important that in the repository implementation all operations occur through the universal context from the `internal.infrastructure.data_storage` directory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters