Skip to content

Commit

Permalink
feat: updated the project architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
thibault-cne committed Feb 5, 2024
1 parent 73aab10 commit 0ac0dbb
Show file tree
Hide file tree
Showing 38 changed files with 96 additions and 58 deletions.
11 changes: 10 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 22 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
[workspace]
members = [
"application",
"api",
"infrastructure",
"shared",
"derives"
"crates/*",
"api-cmd"
]
resolver = "2"

[workspace.dependencies]
# Local crates
api = { path = "./crates/api", version = "0.1.0" }
application = { path = "./crates/application", version = "0.1.0" }
derives = { path = "./crates/derives", version = "0.1.0" }
infrastructure = { path = "./crates/infrastructure", version = "0.1.0" }
shared = { path = "./crates/shared", version = "0.1.0" }

# External crates
rocket = { version = "0.5.0", features = ["json"] }
diesel = { version = "2.1.0", features = ["mysql", "chrono", "r2d2"] }
chrono = { version = "0.4.31", features = ["serde"] }
serde = { version = "1.0.195", features = ["derive"] }
serde_json = "1.0.64"
dotenvy = "0.15.7"
r2d2 = "0.8.10"
proc-macro2 = "1.0.78"
quote = "1.0.35"
syn = { version = "2.0.48", features = ["parsing"] }
13 changes: 13 additions & 0 deletions api-cmd/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[package]
name = "api-cmd"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
rocket.workspace = true
dotenvy.workspace = true

api.workspace = true
infrastructure.workspace = true
File renamed without changes.
18 changes: 0 additions & 18 deletions api/Cargo.toml

This file was deleted.

13 changes: 0 additions & 13 deletions application/Cargo.toml

This file was deleted.

17 changes: 17 additions & 0 deletions crates/api/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[package]
name = "api"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
rocket.workspace = true
diesel.workspace = true
serde.workspace = true
r2d2.workspace = true
serde_json.workspace = true

application.workspace = true
shared.workspace = true
infrastructure.workspace = true
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 13 additions & 0 deletions crates/application/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[package]
name = "application"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
chrono.workspace = true
serde.workspace = true
diesel.workspace = true

shared.workspace = true
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.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions derives/Cargo.toml → crates/derives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
proc-macro2 = "1.0.78"
quote = "1.0.35"
syn = { version = "2.0.48", features = ["parsing"] }
proc-macro2.workspace = true
quote.workspace = true
syn.workspace = true

[lib]
proc-macro = true
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
diesel = { version = "2.1.0", features = ["mysql", "r2d2"] }
diesel.workspace = true

shared = { path = "../shared" }
shared.workspace = true
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 16 additions & 0 deletions crates/shared/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[package]
name = "shared"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
rocket.workspace = true
chrono.workspace = true
diesel.workspace = true
serde_json.workspace = true
r2d2.workspace = true
serde.workspace = true

derives.workspace = true
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 0 additions & 16 deletions shared/Cargo.toml

This file was deleted.

0 comments on commit 0ac0dbb

Please sign in to comment.