workspace deps hygiene: minimal features, default-members sans tui; drop utoipa-scalar + /scalar; ci test --workspace; .sqlx dockerignore
This commit is contained in:
@@ -11,3 +11,4 @@ spa/node_modules/
|
||||
spa/dist/
|
||||
spa/.env
|
||||
spa/.env.local
|
||||
.sqlx/
|
||||
|
||||
@@ -39,7 +39,7 @@ jobs:
|
||||
run: cargo clippy --workspace --all-targets -- -D warnings
|
||||
|
||||
- name: test
|
||||
run: cargo test
|
||||
run: cargo test --workspace
|
||||
|
||||
- name: test (federation off)
|
||||
run: cargo test --workspace --no-default-features
|
||||
|
||||
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -39,7 +39,7 @@ jobs:
|
||||
run: cargo clippy --workspace --all-targets -- -D warnings
|
||||
|
||||
- name: test
|
||||
run: cargo test
|
||||
run: cargo test --workspace
|
||||
|
||||
- name: test (federation off)
|
||||
run: cargo test --workspace --no-default-features
|
||||
|
||||
151
Cargo.lock
generated
151
Cargo.lock
generated
@@ -2022,11 +2022,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"js-sys",
|
||||
"libc",
|
||||
"r-efi 5.3.0",
|
||||
"wasip2",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2036,11 +2034,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"js-sys",
|
||||
"libc",
|
||||
"r-efi 6.0.0",
|
||||
"rand_core 0.10.1",
|
||||
"wasip2",
|
||||
"wasip3",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2220,7 +2220,6 @@ dependencies = [
|
||||
"tower-http",
|
||||
"tracing",
|
||||
"utoipa",
|
||||
"utoipa-scalar",
|
||||
"utoipa-swagger-ui",
|
||||
"uuid",
|
||||
]
|
||||
@@ -2932,9 +2931,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lru-slab"
|
||||
version = "0.1.2"
|
||||
version = "0.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154"
|
||||
checksum = "4050469837a6ff301cd14c1f8f24f88549e6d548f24f64e2148eb0f72cebc51f"
|
||||
|
||||
[[package]]
|
||||
name = "mac"
|
||||
@@ -3862,9 +3861,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "quinn"
|
||||
version = "0.11.9"
|
||||
version = "0.11.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20"
|
||||
checksum = "4051e23e9185c255a7e33ef59cdbca87a22d359052eecd22fc6b901fb37d9d11"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"cfg_aliases",
|
||||
@@ -3882,14 +3881,15 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "quinn-proto"
|
||||
version = "0.11.14"
|
||||
version = "0.11.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "434b42fec591c96ef50e21e886936e66d3cc3f737104fdb9b737c40ffb94c098"
|
||||
checksum = "0e750cca55fe4f0439a15d0bb529da9651e79993e8e72c61a899a36d462befbe"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"getrandom 0.3.4",
|
||||
"getrandom 0.4.2",
|
||||
"lru-slab",
|
||||
"rand 0.9.4",
|
||||
"rand 0.10.1",
|
||||
"rand_pcg",
|
||||
"ring",
|
||||
"rustc-hash",
|
||||
"rustls",
|
||||
@@ -3903,16 +3903,16 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "quinn-udp"
|
||||
version = "0.5.14"
|
||||
version = "0.5.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd"
|
||||
checksum = "af66907df18639dcf4db56ca65490cabc4b27a97dbadd96f2926cca73298f016"
|
||||
dependencies = [
|
||||
"cfg_aliases",
|
||||
"libc",
|
||||
"once_cell",
|
||||
"socket2",
|
||||
"tracing",
|
||||
"windows-sys 0.60.2",
|
||||
"windows-sys 0.61.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -4012,6 +4012,15 @@ version = "0.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69"
|
||||
|
||||
[[package]]
|
||||
name = "rand_pcg"
|
||||
version = "0.10.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "caa0f4137e1c0a72f4c651489402276c8e8e1cf081f3b0ba156d2cbeef09e86a"
|
||||
dependencies = [
|
||||
"rand_core 0.10.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ratatui"
|
||||
version = "0.30.0"
|
||||
@@ -5456,9 +5465,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "thread_local"
|
||||
version = "1.1.9"
|
||||
version = "1.1.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185"
|
||||
checksum = "1ad99c4c6d32803332c548b1af0540b357b3f5fc0be8f6c6bfe8b2e6ae784070"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
]
|
||||
@@ -5773,18 +5782,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a"
|
||||
dependencies = [
|
||||
"once_cell",
|
||||
"valuable",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracing-log"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3"
|
||||
dependencies = [
|
||||
"log",
|
||||
"once_cell",
|
||||
"tracing-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -5798,11 +5795,9 @@ dependencies = [
|
||||
"once_cell",
|
||||
"regex-automata",
|
||||
"sharded-slab",
|
||||
"smallvec",
|
||||
"thread_local",
|
||||
"tracing",
|
||||
"tracing-core",
|
||||
"tracing-log",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -6005,18 +6000,6 @@ dependencies = [
|
||||
"uuid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "utoipa-scalar"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "59559e1509172f6b26c1cdbc7247c4ddd1ac6560fe94b584f81ee489b141f719"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"utoipa",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "utoipa-swagger-ui"
|
||||
version = "9.0.2"
|
||||
@@ -6067,12 +6050,6 @@ dependencies = [
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "valuable"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65"
|
||||
|
||||
[[package]]
|
||||
name = "vcpkg"
|
||||
version = "0.2.15"
|
||||
@@ -6437,7 +6414,7 @@ version = "0.1.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
|
||||
dependencies = [
|
||||
"windows-sys 0.48.0",
|
||||
"windows-sys 0.61.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -6547,15 +6524,6 @@ dependencies = [
|
||||
"windows-targets 0.52.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-sys"
|
||||
version = "0.60.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb"
|
||||
dependencies = [
|
||||
"windows-targets 0.53.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-sys"
|
||||
version = "0.61.2"
|
||||
@@ -6589,30 +6557,13 @@ dependencies = [
|
||||
"windows_aarch64_gnullvm 0.52.6",
|
||||
"windows_aarch64_msvc 0.52.6",
|
||||
"windows_i686_gnu 0.52.6",
|
||||
"windows_i686_gnullvm 0.52.6",
|
||||
"windows_i686_gnullvm",
|
||||
"windows_i686_msvc 0.52.6",
|
||||
"windows_x86_64_gnu 0.52.6",
|
||||
"windows_x86_64_gnullvm 0.52.6",
|
||||
"windows_x86_64_msvc 0.52.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-targets"
|
||||
version = "0.53.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3"
|
||||
dependencies = [
|
||||
"windows-link",
|
||||
"windows_aarch64_gnullvm 0.53.1",
|
||||
"windows_aarch64_msvc 0.53.1",
|
||||
"windows_i686_gnu 0.53.1",
|
||||
"windows_i686_gnullvm 0.53.1",
|
||||
"windows_i686_msvc 0.53.1",
|
||||
"windows_x86_64_gnu 0.53.1",
|
||||
"windows_x86_64_gnullvm 0.53.1",
|
||||
"windows_x86_64_msvc 0.53.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_gnullvm"
|
||||
version = "0.48.5"
|
||||
@@ -6625,12 +6576,6 @@ version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_gnullvm"
|
||||
version = "0.53.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53"
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_msvc"
|
||||
version = "0.48.5"
|
||||
@@ -6643,12 +6588,6 @@ version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_msvc"
|
||||
version = "0.53.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnu"
|
||||
version = "0.48.5"
|
||||
@@ -6661,24 +6600,12 @@ version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnu"
|
||||
version = "0.53.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnullvm"
|
||||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnullvm"
|
||||
version = "0.53.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_msvc"
|
||||
version = "0.48.5"
|
||||
@@ -6691,12 +6618,6 @@ version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_msvc"
|
||||
version = "0.53.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnu"
|
||||
version = "0.48.5"
|
||||
@@ -6709,12 +6630,6 @@ version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnu"
|
||||
version = "0.53.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnullvm"
|
||||
version = "0.48.5"
|
||||
@@ -6727,12 +6642,6 @@ version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnullvm"
|
||||
version = "0.53.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_msvc"
|
||||
version = "0.48.5"
|
||||
@@ -6745,12 +6654,6 @@ version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_msvc"
|
||||
version = "0.53.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650"
|
||||
|
||||
[[package]]
|
||||
name = "winnow"
|
||||
version = "0.7.15"
|
||||
|
||||
65
Cargo.toml
65
Cargo.toml
@@ -1,4 +1,30 @@
|
||||
[workspace]
|
||||
default-members = [
|
||||
"crates/adapters/auth",
|
||||
"crates/adapters/event-publisher",
|
||||
"crates/adapters/metadata",
|
||||
"crates/adapters/poster-fetcher",
|
||||
"crates/adapters/object-storage",
|
||||
"crates/adapters/rss",
|
||||
"crates/adapters/sqlite",
|
||||
"crates/adapters/sqlite-federation",
|
||||
"crates/adapters/activitypub",
|
||||
"crates/adapters/export",
|
||||
"crates/adapters/nats",
|
||||
"crates/adapters/tmdb-enrichment",
|
||||
"crates/adapters/image-converter",
|
||||
"crates/adapters/http-axum",
|
||||
"crates/adapters/importer",
|
||||
"crates/adapters/media-server",
|
||||
"crates/event-payload",
|
||||
"crates/api-types",
|
||||
"crates/application",
|
||||
"crates/domain",
|
||||
"crates/bootstrap",
|
||||
"crates/server",
|
||||
"crates/worker",
|
||||
"crates/config",
|
||||
]
|
||||
members = [
|
||||
"crates/adapters/auth",
|
||||
"crates/adapters/event-publisher",
|
||||
@@ -32,20 +58,20 @@ resolver = "2"
|
||||
edition = "2024"
|
||||
|
||||
[workspace.dependencies]
|
||||
tokio = { version = "1.0", features = ["macros", "net", "rt", "rt-multi-thread", "sync", "time"] }
|
||||
tokio = { version = "1.0", default-features = false }
|
||||
bytes = "1"
|
||||
futures = "0.3"
|
||||
async-stream = "0.3"
|
||||
dotenvy = "0.15"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde = { version = "1.0", default-features = false, features = ["std"] }
|
||||
serde_json = "1.0"
|
||||
anyhow = "1.0"
|
||||
thiserror = "2.0"
|
||||
tracing = "0.1"
|
||||
tracing-subscriber = { version = "0.3.23", features = ["env-filter"] }
|
||||
tracing-subscriber = { version = "0.3.23", default-features = false }
|
||||
async-trait = "0.1.92"
|
||||
uuid = { version = "1.23.0", features = ["v4", "v5", "serde"] }
|
||||
chrono = { version = "0.4", features = ["serde"] }
|
||||
uuid = { version = "1.23.0", default-features = false, features = ["std"] }
|
||||
chrono = { version = "0.4", default-features = false, features = ["std"] }
|
||||
chrono-tz = "0.10"
|
||||
sqlx = { version = "0.8.6", default-features = false, features = [
|
||||
"runtime-tokio",
|
||||
@@ -59,10 +85,35 @@ tempfile = "3"
|
||||
reqwest = { version = "0.13", default-features = false, features = ["json", "query", "charset", "http2", "system-proxy", "rustls-no-provider"] }
|
||||
sha2 = "0.10"
|
||||
hex = "0.4"
|
||||
object_store = { version = "0.11", features = ["aws"] }
|
||||
axum = { version = "0.8.8", features = ["macros", "multipart"] }
|
||||
object_store = { version = "0.11", default-features = false, features = ["aws"] }
|
||||
axum = { version = "0.8.8", default-features = false }
|
||||
csv = "1"
|
||||
figment = { version = "0.10", features = ["toml"] }
|
||||
rustls = { version = "0.23", default-features = false }
|
||||
tower = { version = "0.5", default-features = false }
|
||||
tower-http = { version = "0.6.8", default-features = false }
|
||||
utoipa = "5.5.0"
|
||||
utoipa-swagger-ui = "9.0.2"
|
||||
askama = "0.16.0"
|
||||
infer = "0.19.0"
|
||||
percent-encoding = "2"
|
||||
axum-governor = "2"
|
||||
email_address = "0.2.9"
|
||||
jsonwebtoken = "9"
|
||||
argon2 = { version = "0.5", default-features = false }
|
||||
rand_core = { version = "0.6", default-features = false }
|
||||
async-nats = "0.48.0"
|
||||
k-ap = { version = "0.5.1", registry = "gitea" }
|
||||
url = "2"
|
||||
ammonia = "4"
|
||||
calamine = "0.35"
|
||||
image = { version = "0.25", default-features = false }
|
||||
ravif = { version = "0.11", default-features = false }
|
||||
webp = "0.3"
|
||||
rss-feed = { package = "rss", version = "2" }
|
||||
ratatui = "0.30.0"
|
||||
keyring-core = "1.0.0"
|
||||
directories = "6"
|
||||
|
||||
api-types = { path = "crates/api-types" }
|
||||
domain = { path = "crates/domain" }
|
||||
|
||||
@@ -68,7 +68,7 @@ Open `http://localhost:3000`. The HTTP server and background worker start togeth
|
||||
- CSV and JSON diary export
|
||||
- File importer: upload CSV, TSV, JSON, or XLSX from any source (Letterboxd, IMDb, etc.), map columns to domain fields via a step-by-step wizard or REST API, save mapping profiles for repeat imports
|
||||
- REST API v1 (`/api/v1/`) with full feature parity with the HTML interface
|
||||
- OpenAPI documentation at `/docs` (Swagger UI) and `/scalar` (Scalar)
|
||||
- OpenAPI documentation at `/docs` (Swagger UI)
|
||||
- CSRF protection on all HTML form routes (double-submit cookie, defense-in-depth on top of `SameSite=Strict`)
|
||||
- Per-IP rate limiting via token bucket (production-grade, backed by `axum-governor`)
|
||||
- Single-page app at `/app/` — React + TanStack Router + shadcn/ui, built with Vite, served from the backend with client-side routing fallback
|
||||
@@ -100,7 +100,7 @@ application — use cases (commands + queries), business logic orchestra
|
||||
server — thin HTTP binary (dotenv, config, bootstrap::build_server, axum::serve); features (federation, nats) forward to bootstrap
|
||||
worker — thin worker binary (bootstrap::build_worker, run until ctrl-c)
|
||||
adapters/
|
||||
http-axum — Axum HTTP adapter: JSON API, classic HTML UI (askama templates), OpenAPI spec, Swagger UI + Scalar, federation-gated routes; library crate, no binary of its own
|
||||
http-axum — Axum HTTP adapter: JSON API, classic HTML UI (askama templates), OpenAPI spec, Swagger UI, federation-gated routes; library crate, no binary of its own
|
||||
auth — JWT issuance and validation (Argon2 passwords)
|
||||
sqlite — SQLite repositories (one module per aggregate under repositories/), search (FTS5), social graph, durable event queue, connection factory + migrations; the only storage adapter
|
||||
metadata — TMDB / OMDb HTTP client
|
||||
@@ -198,7 +198,6 @@ All REST endpoints are under `/api/v1/`. Authentication uses `Authorization: Bea
|
||||
Interactive API documentation is available at runtime:
|
||||
|
||||
- **Swagger UI** — `http://localhost:3000/docs`
|
||||
- **Scalar** — `http://localhost:3000/scalar`
|
||||
|
||||
An [Insomnia](https://insomnia.rest/) collection covering all endpoints is included at [`movies-diary.insomnia.json`](movies-diary.insomnia.json). Import it via **File → Import**, set `base_url` and `token` in the environment, and you're ready to go.
|
||||
|
||||
|
||||
@@ -5,20 +5,22 @@ edition.workspace = true
|
||||
|
||||
[dependencies]
|
||||
config = { workspace = true }
|
||||
k-ap = { version = "0.5.1", registry = "gitea" }
|
||||
k-ap = { workspace = true }
|
||||
domain = { workspace = true }
|
||||
axum = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
serde_json = { workspace = true }
|
||||
uuid = { workspace = true }
|
||||
chrono = { workspace = true }
|
||||
uuid = { workspace = true, features = ["v4", "serde"] }
|
||||
chrono = { workspace = true, features = ["clock", "serde"] }
|
||||
anyhow = { workspace = true }
|
||||
tracing = { workspace = true }
|
||||
async-trait = { workspace = true }
|
||||
|
||||
url = { version = "2", features = ["serde"] }
|
||||
ammonia = "4"
|
||||
url = { workspace = true, features = ["serde"] }
|
||||
ammonia = { workspace = true }
|
||||
|
||||
tokio = { workspace = true, features = ["time", "sync"] }
|
||||
|
||||
[dev-dependencies]
|
||||
tokio = { workspace = true }
|
||||
tokio = { workspace = true, features = ["rt", "macros"] }
|
||||
domain = { workspace = true, features = ["test-helpers"] }
|
||||
|
||||
@@ -8,9 +8,9 @@ config = { workspace = true }
|
||||
async-trait = { workspace = true }
|
||||
domain = { workspace = true }
|
||||
anyhow = { workspace = true }
|
||||
chrono = { workspace = true }
|
||||
chrono = { workspace = true, features = ["clock"] }
|
||||
uuid = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
jsonwebtoken = "9"
|
||||
argon2 = { version = "0.5", features = ["std"] }
|
||||
rand_core = { version = "0.6", features = ["getrandom"] }
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
jsonwebtoken = { workspace = true }
|
||||
argon2 = { workspace = true, features = ["std"] }
|
||||
rand_core = { workspace = true, features = ["getrandom"] }
|
||||
|
||||
@@ -7,5 +7,8 @@ edition.workspace = true
|
||||
config = { workspace = true }
|
||||
domain = { workspace = true }
|
||||
async-trait = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
tokio = { workspace = true, features = ["sync"] }
|
||||
futures = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
tokio = { workspace = true, features = ["rt", "macros"] }
|
||||
|
||||
@@ -13,4 +13,4 @@ async-stream = { workspace = true }
|
||||
[dev-dependencies]
|
||||
domain = { workspace = true, features = ["test-helpers"] }
|
||||
uuid = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
tokio = { workspace = true, features = ["rt", "macros"] }
|
||||
|
||||
@@ -11,31 +11,30 @@ default = ["federation"]
|
||||
federation = ["application/federation"]
|
||||
|
||||
[dependencies]
|
||||
tower-http = { version = "0.6.8", features = ["cors", "fs", "trace", "tracing"] }
|
||||
infer = "0.19.0"
|
||||
percent-encoding = "2"
|
||||
axum-governor = "2"
|
||||
tower-http = { workspace = true, features = ["cors", "fs", "trace", "tracing"] }
|
||||
infer = { workspace = true }
|
||||
percent-encoding = { workspace = true }
|
||||
axum-governor = { workspace = true }
|
||||
|
||||
axum = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
axum = { workspace = true, features = ["macros", "multipart", "http1", "json", "query", "form", "tokio", "matched-path", "original-uri", "tower-log", "tracing"] }
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
serde_json = { workspace = true }
|
||||
tracing = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
uuid = { workspace = true }
|
||||
chrono = { workspace = true }
|
||||
uuid = { workspace = true, features = ["v4", "serde"] }
|
||||
chrono = { workspace = true, features = ["clock", "serde"] }
|
||||
chrono-tz = { workspace = true }
|
||||
futures = { workspace = true }
|
||||
|
||||
api-types = { workspace = true }
|
||||
domain = { workspace = true }
|
||||
application = { workspace = true }
|
||||
askama = { version = "0.16.0" }
|
||||
utoipa = { version = "5.5.0", features = ["axum_extras", "uuid"] }
|
||||
utoipa-scalar = { version = "0.3.0", features = ["axum"], default-features = false }
|
||||
utoipa-swagger-ui = { version = "9.0.2", features = ["axum", "vendored"] }
|
||||
askama = { workspace = true }
|
||||
utoipa = { workspace = true, features = ["axum_extras", "uuid"] }
|
||||
utoipa-swagger-ui = { workspace = true, features = ["axum", "vendored"] }
|
||||
|
||||
[dev-dependencies]
|
||||
bytes = { workspace = true }
|
||||
futures = { workspace = true }
|
||||
tower = { version = "0.5", features = ["util"] }
|
||||
tower = { workspace = true, features = ["util"] }
|
||||
tokio = { workspace = true, features = ["rt", "macros"] }
|
||||
domain = { workspace = true, features = ["test-helpers"] }
|
||||
|
||||
@@ -16,7 +16,6 @@ use utoipa::{
|
||||
Modify, OpenApi,
|
||||
openapi::security::{Http, HttpAuthScheme, SecurityScheme},
|
||||
};
|
||||
use utoipa_scalar::{Scalar, Servable};
|
||||
use utoipa_swagger_ui::SwaggerUi;
|
||||
|
||||
struct SecurityAddon;
|
||||
@@ -62,9 +61,7 @@ pub fn spec() -> utoipa::openapi::OpenApi {
|
||||
}
|
||||
|
||||
pub fn serve(router: Router) -> Router {
|
||||
tracing::info!("API docs at /docs (Swagger) and /scalar");
|
||||
tracing::info!("API docs at /docs (Swagger)");
|
||||
let spec = spec();
|
||||
router
|
||||
.merge(SwaggerUi::new("/docs").url("/openapi.json", spec.clone()))
|
||||
.merge(Scalar::with_url("/scalar", spec))
|
||||
router.merge(SwaggerUi::new("/docs").url("/openapi.json", spec))
|
||||
}
|
||||
|
||||
@@ -9,12 +9,12 @@ domain = { workspace = true }
|
||||
async-trait = { workspace = true }
|
||||
anyhow = { workspace = true }
|
||||
tracing = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
image = { version = "0.25", default-features = false, features = ["jpeg", "png", "webp"] }
|
||||
ravif = { version = "0.11", default-features = false }
|
||||
webp = "0.3"
|
||||
tokio = { workspace = true, features = ["rt"] }
|
||||
image = { workspace = true, features = ["jpeg", "png", "webp"] }
|
||||
ravif = { workspace = true }
|
||||
webp = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
object-storage = { workspace = true }
|
||||
object_store = { workspace = true }
|
||||
uuid = { workspace = true }
|
||||
uuid = { workspace = true, features = ["v4"] }
|
||||
|
||||
@@ -10,4 +10,4 @@ xlsx = ["dep:calamine"]
|
||||
domain = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
csv = { workspace = true }
|
||||
calamine = { version = "0.35", optional = true }
|
||||
calamine = { workspace = true, optional = true }
|
||||
|
||||
@@ -5,5 +5,5 @@ edition.workspace = true
|
||||
|
||||
[dependencies]
|
||||
domain = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
serde_json = { workspace = true }
|
||||
|
||||
@@ -8,5 +8,5 @@ config = { workspace = true }
|
||||
anyhow = { workspace = true }
|
||||
async-trait = { workspace = true }
|
||||
reqwest = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
domain = { workspace = true }
|
||||
|
||||
@@ -5,7 +5,7 @@ edition.workspace = true
|
||||
|
||||
[dependencies]
|
||||
config = { workspace = true }
|
||||
async-nats = "0.48.0"
|
||||
async-nats = { workspace = true }
|
||||
|
||||
domain = { workspace = true }
|
||||
event-payload = { workspace = true }
|
||||
@@ -13,7 +13,7 @@ async-trait = { workspace = true }
|
||||
anyhow = { workspace = true }
|
||||
tracing = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
uuid = { workspace = true }
|
||||
chrono = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
uuid = { workspace = true, features = ["serde"] }
|
||||
chrono = { workspace = true, features = ["serde"] }
|
||||
tokio = { workspace = true, features = ["rt", "sync"] }
|
||||
futures = { workspace = true }
|
||||
|
||||
@@ -14,5 +14,5 @@ futures = { workspace = true }
|
||||
object_store = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
tokio = { workspace = true }
|
||||
tokio = { workspace = true, features = ["rt", "macros"] }
|
||||
uuid = { workspace = true }
|
||||
|
||||
@@ -4,7 +4,7 @@ version = "0.1.0"
|
||||
edition.workspace = true
|
||||
|
||||
[dependencies]
|
||||
rss-feed = { package = "rss", version = "2", features = ["atom"] }
|
||||
rss-feed = { workspace = true, features = ["atom"] }
|
||||
domain = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
@@ -6,17 +6,17 @@ edition.workspace = true
|
||||
[dependencies]
|
||||
sqlx = { workspace = true }
|
||||
activitypub = { workspace = true }
|
||||
k-ap = { version = "0.5.1", registry = "gitea" }
|
||||
k-ap = { workspace = true }
|
||||
sqlite = { workspace = true }
|
||||
domain = { workspace = true }
|
||||
anyhow = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
uuid = { workspace = true }
|
||||
chrono = { workspace = true }
|
||||
uuid = { workspace = true, features = ["v4", "serde"] }
|
||||
chrono = { workspace = true, features = ["clock", "serde"] }
|
||||
tracing = { workspace = true }
|
||||
async-trait = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
tokio = { workspace = true }
|
||||
tokio = { workspace = true, features = ["rt", "macros"] }
|
||||
domain = { workspace = true, features = ["test-helpers"] }
|
||||
uuid = { workspace = true }
|
||||
|
||||
@@ -12,11 +12,11 @@ event-payload = { workspace = true }
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
serde_json = { workspace = true }
|
||||
anyhow = { workspace = true }
|
||||
uuid = { workspace = true }
|
||||
chrono = { workspace = true }
|
||||
uuid = { workspace = true, features = ["v4", "serde"] }
|
||||
chrono = { workspace = true, features = ["clock", "serde"] }
|
||||
tracing = { workspace = true }
|
||||
async-trait = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
tokio = { workspace = true, features = ["rt", "sync", "time", "macros", "rt-multi-thread"] }
|
||||
futures = { workspace = true }
|
||||
async-stream = { workspace = true }
|
||||
|
||||
|
||||
@@ -7,6 +7,6 @@ edition.workspace = true
|
||||
config = { workspace = true }
|
||||
domain = { workspace = true }
|
||||
reqwest = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
async-trait = { workspace = true }
|
||||
chrono = { workspace = true }
|
||||
|
||||
@@ -4,9 +4,9 @@ version = "0.1.0"
|
||||
edition.workspace = true
|
||||
|
||||
[dependencies]
|
||||
serde = { workspace = true }
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
uuid = { workspace = true }
|
||||
utoipa = { version = "5.5.0", features = ["axum_extras", "uuid"] }
|
||||
utoipa = { workspace = true, features = ["axum_extras", "uuid"] }
|
||||
domain = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
@@ -7,11 +7,11 @@ edition.workspace = true
|
||||
async-trait = { workspace = true }
|
||||
domain = { workspace = true }
|
||||
config = { workspace = true }
|
||||
uuid = { workspace = true }
|
||||
chrono = { workspace = true }
|
||||
uuid = { workspace = true, features = ["v4"] }
|
||||
chrono = { workspace = true, features = ["clock"] }
|
||||
tracing = { workspace = true }
|
||||
futures = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
tokio = { workspace = true, features = ["rt", "sync", "time", "macros"] }
|
||||
sha2 = { workspace = true }
|
||||
rand = { workspace = true }
|
||||
hex = { workspace = true }
|
||||
@@ -22,5 +22,5 @@ xlsx = []
|
||||
federation = []
|
||||
|
||||
[dev-dependencies]
|
||||
tokio = { workspace = true }
|
||||
tokio = { workspace = true, features = ["rt-multi-thread"] }
|
||||
domain = { workspace = true, features = ["test-helpers"] }
|
||||
|
||||
@@ -33,11 +33,11 @@ sqlx = { workspace = true }
|
||||
anyhow = { workspace = true }
|
||||
async-trait = { workspace = true }
|
||||
axum = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
tokio = { workspace = true, features = ["rt", "macros", "sync", "time", "net"] }
|
||||
futures = { workspace = true }
|
||||
tracing = { workspace = true }
|
||||
tracing-subscriber = { workspace = true }
|
||||
rustls = { version = "0.23", default-features = false, features = ["ring", "std", "tls12", "logging"] }
|
||||
tracing-subscriber = { workspace = true, features = ["env-filter", "fmt", "ansi"] }
|
||||
rustls = { workspace = true, features = ["ring", "std", "tls12", "logging"] }
|
||||
|
||||
nats = { workspace = true, optional = true }
|
||||
activitypub = { workspace = true, optional = true }
|
||||
@@ -45,8 +45,8 @@ sqlite-federation = { workspace = true, optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
reqwest = { workspace = true }
|
||||
chrono = { workspace = true }
|
||||
uuid = { workspace = true }
|
||||
chrono = { workspace = true, features = ["clock"] }
|
||||
uuid = { workspace = true, features = ["v4"] }
|
||||
serde_json = { workspace = true }
|
||||
tower = { version = "0.5", features = ["util"] }
|
||||
tower = { workspace = true, features = ["util"] }
|
||||
domain = { workspace = true, features = ["test-helpers"] }
|
||||
|
||||
@@ -252,7 +252,6 @@ async fn feeds_and_openapi_are_served() {
|
||||
("/openapi.json", 200),
|
||||
("/docs", 303),
|
||||
("/docs/", 200),
|
||||
("/scalar", 200),
|
||||
] {
|
||||
let uri = expand(&seed, template);
|
||||
let (status, _, _) = send(&seed.router, get(&uri, None)).await;
|
||||
|
||||
@@ -5,7 +5,7 @@ version = "0.1.0"
|
||||
|
||||
[dependencies]
|
||||
thiserror.workspace = true
|
||||
serde.workspace = true
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
figment.workspace = true
|
||||
tracing.workspace = true
|
||||
|
||||
|
||||
@@ -4,20 +4,20 @@ version = "0.1.0"
|
||||
edition.workspace = true
|
||||
|
||||
[dependencies]
|
||||
uuid = { workspace = true }
|
||||
chrono = { workspace = true }
|
||||
uuid = { workspace = true, features = ["v4", "v5", "serde"] }
|
||||
chrono = { workspace = true, features = ["clock", "serde"] }
|
||||
async-trait = { workspace = true }
|
||||
thiserror = { workspace = true }
|
||||
bytes = { workspace = true }
|
||||
futures = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
serde_json = { workspace = true }
|
||||
|
||||
email_address = "0.2.9"
|
||||
email_address = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
domain = { path = ".", features = ["test-helpers"] }
|
||||
tokio = { workspace = true }
|
||||
tokio = { workspace = true, features = ["rt", "macros"] }
|
||||
|
||||
[features]
|
||||
test-helpers = []
|
||||
|
||||
@@ -5,7 +5,7 @@ edition.workspace = true
|
||||
|
||||
[dependencies]
|
||||
domain = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
chrono = { workspace = true }
|
||||
uuid = { workspace = true }
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
chrono = { workspace = true, features = ["serde"] }
|
||||
uuid = { workspace = true, features = ["serde"] }
|
||||
serde_json = { workspace = true }
|
||||
|
||||
@@ -16,8 +16,8 @@ sqlite-federation = ["federation"]
|
||||
[dependencies]
|
||||
bootstrap = { workspace = true }
|
||||
config = { workspace = true }
|
||||
axum = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
axum = { workspace = true, features = ["http1", "tokio"] }
|
||||
tokio = { workspace = true, features = ["rt-multi-thread", "macros", "net"] }
|
||||
anyhow = { workspace = true }
|
||||
dotenvy = { workspace = true }
|
||||
tracing = { workspace = true }
|
||||
|
||||
@@ -13,9 +13,9 @@ linux-zbus = [
|
||||
windows = ["dep:windows-native-keyring-store"]
|
||||
|
||||
[dependencies]
|
||||
ratatui = "0.30.0"
|
||||
keyring-core = "1.0.0"
|
||||
directories = "6"
|
||||
ratatui = { workspace = true }
|
||||
keyring-core = { workspace = true }
|
||||
directories = { workspace = true }
|
||||
csv = { workspace = true }
|
||||
|
||||
apple-native-keyring-store = { version = "1.0.0", optional = true, features = [
|
||||
@@ -26,11 +26,11 @@ windows-native-keyring-store = { version = "1.0.0", optional = true }
|
||||
|
||||
api-types = { workspace = true }
|
||||
reqwest = { workspace = true }
|
||||
rustls = { version = "0.23", default-features = false, features = ["ring", "std", "tls12", "logging"] }
|
||||
serde = { workspace = true }
|
||||
rustls = { workspace = true, features = ["ring", "std", "tls12", "logging"] }
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
serde_json = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
tokio = { workspace = true, features = ["rt", "rt-multi-thread", "sync", "macros", "time"] }
|
||||
anyhow = { workspace = true }
|
||||
uuid = { workspace = true }
|
||||
uuid = { workspace = true, features = ["serde"] }
|
||||
thiserror = { workspace = true }
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ sqlite-federation = ["federation"]
|
||||
[dependencies]
|
||||
bootstrap = { workspace = true }
|
||||
config = { workspace = true }
|
||||
tokio = { workspace = true, features = ["signal"] }
|
||||
tokio = { workspace = true, features = ["rt-multi-thread", "macros", "signal", "sync"] }
|
||||
anyhow = { workspace = true }
|
||||
dotenvy = { workspace = true }
|
||||
tracing = { workspace = true }
|
||||
|
||||
Reference in New Issue
Block a user