Skip to content

Commit

Permalink
Merge pull request #2 from MGTheTrain/opt/refine-architecture
Browse files Browse the repository at this point in the history
Opt/refine architecture
  • Loading branch information
MGTheTrain authored Nov 12, 2024
2 parents afeeeee + a306a78 commit 7dad0e0
Show file tree
Hide file tree
Showing 41 changed files with 51 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **Asymmetric encryption and decryption**: Supported RSA and other asymmetric encryption algorithms for data protection.
- **Symmetric encryption**: Supported symmetric key encryption (e.g. AES) for data protection.
- **Hashing and signature verification**: Supported hashing algorithms (e.g. SHA-256, SHA-512) and verified signatures using asymmetric keys (RSA, ECDSA, etc.).
- Adopted Domain-Driven Design to create a **modular, flexible and maintainable** project structure with a focus on the **domain at its core**

## [0.1.0] - TBD-TBD-TBD

Expand Down
2 changes: 1 addition & 1 deletion cmd/crypto-vault-cli/crypto-vault-cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

"github.com/spf13/cobra"

cryptography "crypto_vault_service/pkg/cryptography"
cryptography "crypto_vault_service/internal/infrastructure/cryptography"
)

// Encrypts a file using AES and saves the encryption key
Expand Down
2 changes: 1 addition & 1 deletion cmd/crypto-vault-service/crypto-vault-service.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
v1 "crypto_vault_service/api/v1"
v1 "crypto_vault_service/internal/api/v1"

"github.com/gin-gonic/gin"
)
Expand Down
39 changes: 39 additions & 0 deletions docs/architecture-decision-record/ddd.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Domain-driven Design

Incorporating DDD as an architecture decision impacts the structure and development process of the entire application. By aligning the software architecture with the business domain, we promote a more **modular, flexible and maintainable** design. The goal is to deeply understand the domain, represent it through domain models and ensure that the application closely matches the business processes.

```sh
.
├── cmd
│ ├── crypto-vault-cli
│ ├── Dockerfile
│ ├── crypto-vault-cli.go
│ └── crypto-vault-service
│ ├── Dockerfile
│ └── crypto-vault-service.go
├── configs
│ ├── dev.yml
│ ├── prd.yml
│ └── qas.yml
├── go.mod
├── go.sum
├── internal
│ ├── api
│ │ └── v1
│ │ └── v2
│ │ └── ...
│ ├── app
│ ├── domain
│ ├── infrastructure
│ └── persistence
└── test
├── data
├── integration
│ ├── domain
│ ├── infrastructure
│ └── persistence
└── unit
├── domain
├── infrastructure
└── persistence
```
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions internal/app/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Service impl
1 change: 1 addition & 0 deletions internal/domain/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Domain models, service contracts
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions internal/persistence/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SQL, NoSQL queries or commands
File renamed without changes.
1 change: 1 addition & 0 deletions test/integration/domain/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Domain models, service contracts
1 change: 1 addition & 0 deletions test/integration/infrastructure/cryptography/aes_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// tbd
1 change: 1 addition & 0 deletions test/integration/persistence/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Domain models, service contracts
1 change: 1 addition & 0 deletions test/unit/domain/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Domain models, service contracts
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions test/unit/infrastructure/cryptography/aes_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// tbd
Empty file.
Empty file.
1 change: 1 addition & 0 deletions test/unit/persistence/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Domain models, service contracts

0 comments on commit 7dad0e0

Please sign in to comment.