refactor: structure of an hexagonal architecture

Created a kernel crate to store models and future action implementations.
Will be useful to create admin cli.
This commit is contained in:
Matthieu Bessat 2024-11-28 12:47:00 +01:00
parent 69af48bb62
commit 3713cc2443
87 changed files with 834 additions and 474 deletions

View file

@ -3,26 +3,26 @@ cargo-features = ["codegen-backend"]
[profile.dev]
codegen-backend = "cranelift"
[package]
name = "minauthator"
description = "Identity provider and OAuth2 server for an small-scale organization."
version = "0.1.0"
edition = "2021"
[workspace]
members = [
"lib/kernel",
"lib/utils",
"lib/http_server",
"lib/admin_cli"
]
[dependencies]
[workspace.dependencies]
# commons utils
anyhow = "1.0"
fully_pub = "0.1"
argon2 = "0.5"
strum = "0.26.3"
strum_macros = "0.26"
uuid = { version = "1.8", features = ["serde", "v4"] }
dotenvy = "0.15.7"
base64 = "0.22.1"
rand = "0.8.5"
rand_core = { version = "0.6.4", features = ["std"] }
url = "2.5.3"
argh = "0.1" # for CLI
# CLI
argh = "0.1"
# Async
tokio = { version = "1.40.0", features = ["rt-multi-thread"] }
@ -34,7 +34,6 @@ env_logger = "0.11"
# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_urlencoded = "0.7.1"
toml = "0.8"
chrono = { version = "0.4", features = ["serde"] }
@ -43,21 +42,6 @@ chrono = { version = "0.4", features = ["serde"] }
sqlx = { version = "0.7.4", features = ["sqlite", "runtime-tokio", "chrono", "uuid"] }
redis = { version = "0.27.3", default-features = false, features = ["acl"] }
# Web
axum = { version = "0.7.7", features = ["json", "multipart"] }
axum-extra = { version = "0.9.4", features = ["cookie"] }
axum-template = { version = "2.4.0", features = ["minijinja"] }
axum_typed_multipart = "0.13.1"
minijinja = { version = "2.1", features = ["builtins"] }
# to make work the static assets server
tower-http = { version = "0.6.1", features = ["fs"] }
# Auth utils
totp-rs = "5.6"
minijinja-embed = "2.3.1"
axum-macros = "0.4.2"
jsonwebtoken = "9.3.0"
time = "0.3.36"
[build-dependencies]
minijinja-embed = "2.3.1"