commit 484979ad53c62028e9629ce6e2796af357775a55 Author: Florian Berthold Date: Sat Mar 14 00:02:29 2026 +0100 Initial HerbAPI implementation Rust/Axum REST API (herbapi-api) with PostgreSQL, S3/Garage, OIDC auth. Dioxus 0.7 WASM frontend (herbapi-ui) with sidebar layout and botanical reference style. 9 SQL migrations covering families, species, cultivars, suppliers, companions, images, users, API tokens. diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0a8fa31 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +/target +/herbapi-api/target +/herbapi-ui/target +*.swp +*.swo +.DS_Store diff --git a/herbapi-api/Cargo.lock b/herbapi-api/Cargo.lock new file mode 100644 index 0000000..2a940e3 --- /dev/null +++ b/herbapi-api/Cargo.lock @@ -0,0 +1,4235 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "aead" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +dependencies = [ + "crypto-common", + "generic-array", +] + +[[package]] +name = "aes" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + +[[package]] +name = "aes-gcm" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" +dependencies = [ + "aead", + "aes", + "cipher", + "ctr", + "ghash", + "subtle", +] + +[[package]] +name = "aho-corasick" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" +dependencies = [ + "memchr", +] + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anyhow" +version = "1.0.102" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" + +[[package]] +name = "arc-swap" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9f3647c145568cec02c42054e07bdf9a5a698e15b466fb2341bfc393cd24aa5" +dependencies = [ + "rustversion", +] + +[[package]] +name = "async-trait" +version = "0.1.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "atoi" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" +dependencies = [ + "num-traits", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "autocfg" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" + +[[package]] +name = "aws-credential-types" +version = "1.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f20799b373a1be121fe3005fba0c2090af9411573878f224df44b42727fcaf7" +dependencies = [ + "aws-smithy-async", + "aws-smithy-runtime-api", + "aws-smithy-types", + "zeroize", +] + +[[package]] +name = "aws-lc-rs" +version = "1.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94bffc006df10ac2a68c83692d734a465f8ee6c5b384d8545a636f81d858f4bf" +dependencies = [ + "aws-lc-sys", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4321e568ed89bb5a7d291a7f37997c2c0df89809d7b6d12062c81ddb54aa782e" +dependencies = [ + "cc", + "cmake", + "dunce", + "fs_extra", +] + +[[package]] +name = "aws-runtime" +version = "1.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fc0651c57e384202e47153c1260b84a9936e19803d747615edf199dc3b98d17" +dependencies = [ + "aws-credential-types", + "aws-sigv4", + "aws-smithy-async", + "aws-smithy-eventstream", + "aws-smithy-http 0.63.6", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", + "bytes", + "bytes-utils", + "fastrand", + "http 0.2.12", + "http 1.4.0", + "http-body 0.4.6", + "http-body 1.0.1", + "percent-encoding", + "pin-project-lite", + "tracing", + "uuid", +] + +[[package]] +name = "aws-sdk-s3" +version = "1.119.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d65fddc3844f902dfe1864acb8494db5f9342015ee3ab7890270d36fbd2e01c" +dependencies = [ + "aws-credential-types", + "aws-runtime", + "aws-sigv4", + "aws-smithy-async", + "aws-smithy-checksums", + "aws-smithy-eventstream", + "aws-smithy-http 0.62.6", + "aws-smithy-json", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-smithy-xml", + "aws-types", + "bytes", + "fastrand", + "hex", + "hmac", + "http 0.2.12", + "http 1.4.0", + "http-body 0.4.6", + "lru", + "percent-encoding", + "regex-lite", + "sha2", + "tracing", + "url", +] + +[[package]] +name = "aws-sigv4" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0b660013a6683ab23797778e21f1f854744fdf05f68204b4cca4c8c04b5d1f4" +dependencies = [ + "aws-credential-types", + "aws-smithy-eventstream", + "aws-smithy-http 0.63.6", + "aws-smithy-runtime-api", + "aws-smithy-types", + "bytes", + "crypto-bigint 0.5.5", + "form_urlencoded", + "hex", + "hmac", + "http 0.2.12", + "http 1.4.0", + "p256", + "percent-encoding", + "ring", + "sha2", + "subtle", + "time", + "tracing", + "zeroize", +] + +[[package]] +name = "aws-smithy-async" +version = "1.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ffcaf626bdda484571968400c326a244598634dc75fd451325a54ad1a59acfc" +dependencies = [ + "futures-util", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "aws-smithy-checksums" +version = "0.63.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87294a084b43d649d967efe58aa1f9e0adc260e13a6938eb904c0ae9b45824ae" +dependencies = [ + "aws-smithy-http 0.62.6", + "aws-smithy-types", + "bytes", + "crc-fast", + "hex", + "http 0.2.12", + "http-body 0.4.6", + "md-5", + "pin-project-lite", + "sha1", + "sha2", + "tracing", +] + +[[package]] +name = "aws-smithy-eventstream" +version = "0.60.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faf09d74e5e32f76b8762da505a3cd59303e367a664ca67295387baa8c1d7548" +dependencies = [ + "aws-smithy-types", + "bytes", + "crc32fast", +] + +[[package]] +name = "aws-smithy-http" +version = "0.62.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "826141069295752372f8203c17f28e30c464d22899a43a0c9fd9c458d469c88b" +dependencies = [ + "aws-smithy-eventstream", + "aws-smithy-runtime-api", + "aws-smithy-types", + "bytes", + "bytes-utils", + "futures-core", + "futures-util", + "http 0.2.12", + "http 1.4.0", + "http-body 0.4.6", + "percent-encoding", + "pin-project-lite", + "pin-utils", + "tracing", +] + +[[package]] +name = "aws-smithy-http" +version = "0.63.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba1ab2dc1c2c3749ead27180d333c42f11be8b0e934058fb4b2258ee8dbe5231" +dependencies = [ + "aws-smithy-runtime-api", + "aws-smithy-types", + "bytes", + "bytes-utils", + "futures-core", + "futures-util", + "http 1.4.0", + "http-body 1.0.1", + "http-body-util", + "percent-encoding", + "pin-project-lite", + "pin-utils", + "tracing", +] + +[[package]] +name = "aws-smithy-http-client" +version = "1.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a2f165a7feee6f263028b899d0a181987f4fa7179a6411a32a439fba7c5f769" +dependencies = [ + "aws-smithy-async", + "aws-smithy-runtime-api", + "aws-smithy-types", + "h2 0.3.27", + "h2 0.4.13", + "http 0.2.12", + "http 1.4.0", + "http-body 0.4.6", + "hyper 0.14.32", + "hyper 1.8.1", + "hyper-rustls 0.24.2", + "hyper-rustls 0.27.7", + "hyper-util", + "pin-project-lite", + "rustls 0.21.12", + "rustls 0.23.37", + "rustls-native-certs", + "rustls-pki-types", + "tokio", + "tokio-rustls 0.26.4", + "tower", + "tracing", +] + +[[package]] +name = "aws-smithy-json" +version = "0.61.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49fa1213db31ac95288d981476f78d05d9cbb0353d22cdf3472cc05bb02f6551" +dependencies = [ + "aws-smithy-types", +] + +[[package]] +name = "aws-smithy-observability" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06c2315d173edbf1920da8ba3a7189695827002e4c0fc961973ab1c54abca9c" +dependencies = [ + "aws-smithy-runtime-api", +] + +[[package]] +name = "aws-smithy-runtime" +version = "1.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "028999056d2d2fd58a697232f9eec4a643cf73a71cf327690a7edad1d2af2110" +dependencies = [ + "aws-smithy-async", + "aws-smithy-http 0.63.6", + "aws-smithy-http-client", + "aws-smithy-observability", + "aws-smithy-runtime-api", + "aws-smithy-types", + "bytes", + "fastrand", + "http 0.2.12", + "http 1.4.0", + "http-body 0.4.6", + "http-body 1.0.1", + "http-body-util", + "pin-project-lite", + "pin-utils", + "tokio", + "tracing", +] + +[[package]] +name = "aws-smithy-runtime-api" +version = "1.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "876ab3c9c29791ba4ba02b780a3049e21ec63dabda09268b175272c3733a79e6" +dependencies = [ + "aws-smithy-async", + "aws-smithy-types", + "bytes", + "http 0.2.12", + "http 1.4.0", + "pin-project-lite", + "tokio", + "tracing", + "zeroize", +] + +[[package]] +name = "aws-smithy-types" +version = "1.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2b1117b3b2bbe166d11199b540ceed0d0f7676e36e7b962b5a437a9971eac75" +dependencies = [ + "base64-simd", + "bytes", + "bytes-utils", + "futures-core", + "http 0.2.12", + "http 1.4.0", + "http-body 0.4.6", + "http-body 1.0.1", + "http-body-util", + "itoa", + "num-integer", + "pin-project-lite", + "pin-utils", + "ryu", + "serde", + "time", + "tokio", + "tokio-util", +] + +[[package]] +name = "aws-smithy-xml" +version = "0.60.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce02add1aa3677d022f8adf81dcbe3046a95f17a1b1e8979c145cd21d3d22b3" +dependencies = [ + "xmlparser", +] + +[[package]] +name = "aws-types" +version = "1.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47c8323699dd9b3c8d5b3c13051ae9cdef58fd179957c882f8374dd8725962d9" +dependencies = [ + "aws-credential-types", + "aws-smithy-async", + "aws-smithy-runtime-api", + "aws-smithy-types", + "rustc_version", + "tracing", +] + +[[package]] +name = "axum" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b52af3cb4058c895d37317bb27508dccc8e5f2d39454016b297bf4a400597b8" +dependencies = [ + "axum-core", + "axum-macros", + "bytes", + "form_urlencoded", + "futures-util", + "http 1.4.0", + "http-body 1.0.1", + "http-body-util", + "hyper 1.8.1", + "hyper-util", + "itoa", + "matchit", + "memchr", + "mime", + "multer", + "percent-encoding", + "pin-project-lite", + "serde_core", + "serde_json", + "serde_path_to_error", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tower", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "axum-core" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08c78f31d7b1291f7ee735c1c6780ccde7785daae9a9206026862dab7d8792d1" +dependencies = [ + "bytes", + "futures-core", + "http 1.4.0", + "http-body 1.0.1", + "http-body-util", + "mime", + "pin-project-lite", + "sync_wrapper", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "axum-extra" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9963ff19f40c6102c76756ef0a46004c0d58957d87259fc9208ff8441c12ab96" +dependencies = [ + "axum", + "axum-core", + "bytes", + "futures-util", + "headers", + "http 1.4.0", + "http-body 1.0.1", + "http-body-util", + "mime", + "pin-project-lite", + "rustversion", + "serde_core", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "axum-macros" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "604fde5e028fea851ce1d8570bbdc034bec850d157f7569d10f347d06808c05c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "axum-server" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1ab4a3ec9ea8a657c72d99a03a824af695bd0fb5ec639ccbd9cd3543b41a5f9" +dependencies = [ + "arc-swap", + "bytes", + "fs-err", + "http 1.4.0", + "http-body 1.0.1", + "hyper 1.8.1", + "hyper-util", + "pin-project-lite", + "rustls 0.23.37", + "rustls-pemfile", + "rustls-pki-types", + "tokio", + "tokio-rustls 0.26.4", + "tower-service", +] + +[[package]] +name = "base16ct" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64-simd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "339abbe78e73178762e23bea9dfd08e697eb3f3301cd4be981c0f78ba5859195" +dependencies = [ + "outref", + "vsimd", +] + +[[package]] +name = "base64ct" +version = "1.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" + +[[package]] +name = "bitflags" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af" +dependencies = [ + "serde_core", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bumpalo" +version = "3.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" + +[[package]] +name = "bytes-utils" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dafe3a8757b027e2be6e4e5601ed563c55989fcf1546e933c66c8eb3a058d35" +dependencies = [ + "bytes", + "either", +] + +[[package]] +name = "cc" +version = "1.2.56" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aebf35691d1bfb0ac386a69bac2fde4dd276fb618cf8bf4f5318fe285e821bb2" +dependencies = [ + "find-msvc-tools", + "jobserver", + "libc", + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "chrono" +version = "0.4.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0" +dependencies = [ + "iana-time-zone", + "js-sys", + "num-traits", + "serde", + "wasm-bindgen", + "windows-link", +] + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", +] + +[[package]] +name = "cmake" +version = "0.1.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75443c44cd6b379beb8c5b45d85d0773baf31cce901fe7bb252f4eff3008ef7d" +dependencies = [ + "cc", +] + +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "cookie" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ddef33a339a91ea89fb53151bd0a4689cfce27055c291dfa69945475d22c747" +dependencies = [ + "aes-gcm", + "base64", + "hkdf", + "hmac", + "percent-encoding", + "rand 0.8.5", + "sha2", + "subtle", + "time", + "version_check", +] + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crc" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5eb8a2a1cd12ab0d987a5d5e825195d372001a4094a0376319d5a0ad71c1ba0d" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" + +[[package]] +name = "crc-fast" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ddc2d09feefeee8bd78101665bd8645637828fa9317f9f292496dbbd8c65ff3" +dependencies = [ + "crc", + "digest", + "rand 0.9.2", + "regex", + "rustversion", +] + +[[package]] +name = "crc32fast" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-queue" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + +[[package]] +name = "crypto-bigint" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "typenum", +] + +[[package]] +name = "ctr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher", +] + +[[package]] +name = "der" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "der" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" +dependencies = [ + "const-oid", + "pem-rfc7468", + "zeroize", +] + +[[package]] +name = "deranged" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" +dependencies = [ + "powerfmt", + "serde_core", +] + +[[package]] +name = "deunicode" +version = "1.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abd57806937c9cc163efc8ea3910e00a62e2aeb0b8119f1793a978088f8f6b04" + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "dotenvy" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" + +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + +[[package]] +name = "ecdsa" +version = "0.14.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" +dependencies = [ + "der 0.6.1", + "elliptic-curve", + "rfc6979", + "signature 1.6.4", +] + +[[package]] +name = "either" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +dependencies = [ + "serde", +] + +[[package]] +name = "elliptic-curve" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" +dependencies = [ + "base16ct", + "crypto-bigint 0.4.9", + "der 0.6.1", + "digest", + "ff", + "generic-array", + "group", + "pkcs8 0.9.0", + "rand_core 0.6.4", + "sec1", + "subtle", + "zeroize", +] + +[[package]] +name = "encoding_rs" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "etcetera" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943" +dependencies = [ + "cfg-if", + "home", + "windows-sys 0.48.0", +] + +[[package]] +name = "event-listener" +version = "5.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "fastrand" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "ff" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" +dependencies = [ + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "find-msvc-tools" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" + +[[package]] +name = "flume" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095" +dependencies = [ + "futures-core", + "futures-sink", + "spin", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "fs-err" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73fde052dbfc920003cfd2c8e2c6e6d4cc7c1091538c3a24226cec0665ab08c0" +dependencies = [ + "autocfg", + "tokio", +] + +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + +[[package]] +name = "futures" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b147ee9d1f6d097cef9ce628cd2ee62288d963e16fb287bd9286455b241382d" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" + +[[package]] +name = "futures-executor" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf29c38818342a3b26b5b923639e7b1f4a61fc5e76102d4b1981c6dc7a7579d" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-intrusive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" +dependencies = [ + "futures-core", + "lock_api", + "parking_lot", +] + +[[package]] +name = "futures-io" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" + +[[package]] +name = "futures-macro" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "futures-sink" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" + +[[package]] +name = "futures-task" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" + +[[package]] +name = "futures-util" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" +dependencies = [ + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi 5.3.0", + "wasip2", +] + +[[package]] +name = "getrandom" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" +dependencies = [ + "cfg-if", + "libc", + "r-efi 6.0.0", + "wasip2", + "wasip3", +] + +[[package]] +name = "ghash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" +dependencies = [ + "opaque-debug", + "polyval", +] + +[[package]] +name = "group" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" +dependencies = [ + "ff", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "h2" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0beca50380b1fc32983fc1cb4587bfa4bb9e78fc259aad4a0032d2080309222d" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http 0.2.12", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "h2" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f44da3a8150a6703ed5d34e164b875fd14c2cdab9af1252a9a1020bde2bdc54" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http 1.4.0", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", +] + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" + +[[package]] +name = "hashlink" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" +dependencies = [ + "hashbrown 0.15.5", +] + +[[package]] +name = "headers" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3314d5adb5d94bcdf56771f2e50dbbc80bb4bdf88967526706205ac9eff24eb" +dependencies = [ + "base64", + "bytes", + "headers-core", + "http 1.4.0", + "httpdate", + "mime", + "sha1", +] + +[[package]] +name = "headers-core" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54b4a22553d4242c49fddb9ba998a99962b5cc6f22cb5a3482bec22522403ce4" +dependencies = [ + "http 1.4.0", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "herbapi-api" +version = "0.1.0" +dependencies = [ + "anyhow", + "aws-credential-types", + "aws-sdk-s3", + "axum", + "axum-extra", + "axum-server", + "chrono", + "hex", + "once_cell", + "rand 0.8.5", + "reqwest", + "rustls 0.23.37", + "serde", + "serde_json", + "sha2", + "slug", + "sqlx", + "thiserror", + "tokio", + "tower", + "tower-http", + "tower-sessions", + "tracing", + "tracing-subscriber", + "uuid", +] + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hkdf" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" +dependencies = [ + "hmac", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "home" +version = "0.5.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "http" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" +dependencies = [ + "bytes", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http 0.2.12", + "pin-project-lite", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http 1.4.0", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +dependencies = [ + "bytes", + "futures-core", + "http 1.4.0", + "http-body 1.0.1", + "pin-project-lite", +] + +[[package]] +name = "http-range-header" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9171a2ea8a68358193d15dd5d70c1c10a2afc3e7e4c5bc92bc9f025cebd7359c" + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "0.14.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2 0.3.27", + "http 0.2.12", + "http-body 0.4.6", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2 0.5.10", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "h2 0.4.13", + "http 1.4.0", + "http-body 1.0.1", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "pin-utils", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +dependencies = [ + "futures-util", + "http 0.2.12", + "hyper 0.14.32", + "log", + "rustls 0.21.12", + "tokio", + "tokio-rustls 0.24.1", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" +dependencies = [ + "http 1.4.0", + "hyper 1.8.1", + "hyper-util", + "rustls 0.23.37", + "rustls-native-certs", + "rustls-pki-types", + "tokio", + "tokio-rustls 0.26.4", + "tower-service", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper 1.8.1", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" +dependencies = [ + "base64", + "bytes", + "futures-channel", + "futures-util", + "http 1.4.0", + "http-body 1.0.1", + "hyper 1.8.1", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2 0.6.3", + "system-configuration", + "tokio", + "tower-service", + "tracing", + "windows-registry", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "icu_collections" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" +dependencies = [ + "displaydoc", + "potential_utf", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" + +[[package]] +name = "icu_properties" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" + +[[package]] +name = "icu_provider" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "id-arena" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "indexmap" +version = "2.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" +dependencies = [ + "equivalent", + "hashbrown 0.16.1", + "serde", + "serde_core", +] + +[[package]] +name = "inout" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" +dependencies = [ + "generic-array", +] + +[[package]] +name = "ipnet" +version = "2.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" + +[[package]] +name = "iri-string" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c91338f0783edbd6195decb37bae672fd3b165faffb89bf7b9e6942f8b1a731a" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "itoa" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" + +[[package]] +name = "jobserver" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" +dependencies = [ + "getrandom 0.3.4", + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b49715b7073f385ba4bc528e5747d02e66cb39c6146efb66b781f131f0fb399c" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +dependencies = [ + "spin", +] + +[[package]] +name = "leb128fmt" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" + +[[package]] +name = "libc" +version = "0.2.183" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d" + +[[package]] +name = "libm" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" + +[[package]] +name = "libredox" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1744e39d1d6a9948f4f388969627434e31128196de472883b39f148769bfe30a" +dependencies = [ + "bitflags", + "libc", + "plain", + "redox_syscall 0.7.3", +] + +[[package]] +name = "libsqlite3-sys" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" +dependencies = [ + "pkg-config", + "vcpkg", +] + +[[package]] +name = "linux-raw-sys" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + +[[package]] +name = "litemap" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" + +[[package]] +name = "lru" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" +dependencies = [ + "hashbrown 0.15.5", +] + +[[package]] +name = "matchers" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" +dependencies = [ + "regex-automata", +] + +[[package]] +name = "matchit" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" + +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest", +] + +[[package]] +name = "memchr" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "mime_guess" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +dependencies = [ + "mime", + "unicase", +] + +[[package]] +name = "mio" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "multer" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83e87776546dc87511aa5ee218730c92b666d7264ab6ed41f9d215af9cd5224b" +dependencies = [ + "bytes", + "encoding_rs", + "futures-util", + "http 1.4.0", + "httparse", + "memchr", + "mime", + "spin", + "version_check", +] + +[[package]] +name = "native-tls" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "465500e14ea162429d264d44189adc38b199b62b1c21eea9f69e4b73cb03bbf2" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "nu-ansi-term" +version = "0.50.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "num-bigint-dig" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e661dda6640fad38e827a6d4a310ff4763082116fe217f279885c97f511bb0b7" +dependencies = [ + "lazy_static", + "libm", + "num-integer", + "num-iter", + "num-traits", + "rand 0.8.5", + "smallvec", + "zeroize", +] + +[[package]] +name = "num-conv" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf97ec579c3c42f953ef76dbf8d55ac91fb219dde70e49aa4a6b7d74e9919050" + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + +[[package]] +name = "openssl" +version = "0.10.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "951c002c75e16ea2c65b8c7e4d3d51d5530d8dfa7d060b4776828c88cfb18ecf" +dependencies = [ + "bitflags", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "openssl-probe" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" + +[[package]] +name = "openssl-sys" +version = "0.9.112" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57d55af3b3e226502be1526dfdba67ab0e9c96fc293004e79576b2b9edb0dbdb" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "outref" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a80800c0488c3a21695ea981a54918fbb37abf04f4d0720c453632255e2ff0e" + +[[package]] +name = "p256" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594" +dependencies = [ + "ecdsa", + "elliptic-curve", + "sha2", +] + +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.5.18", + "smallvec", + "windows-link", +] + +[[package]] +name = "pem-rfc7468" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +dependencies = [ + "base64ct", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs1" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" +dependencies = [ + "der 0.7.10", + "pkcs8 0.10.2", + "spki 0.7.3", +] + +[[package]] +name = "pkcs8" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" +dependencies = [ + "der 0.6.1", + "spki 0.6.0", +] + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der 0.7.10", + "spki 0.7.3", +] + +[[package]] +name = "pkg-config" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" + +[[package]] +name = "plain" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" + +[[package]] +name = "polyval" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" +dependencies = [ + "cfg-if", + "cpufeatures", + "opaque-debug", + "universal-hash", +] + +[[package]] +name = "potential_utf" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" +dependencies = [ + "zerovec", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn", +] + +[[package]] +name = "proc-macro2" +version = "1.0.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.5", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.5", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.17", +] + +[[package]] +name = "rand_core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" +dependencies = [ + "getrandom 0.3.4", +] + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags", +] + +[[package]] +name = "redox_syscall" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce70a74e890531977d37e532c34d45e9055d2409ed08ddba14529471ed0be16" +dependencies = [ + "bitflags", +] + +[[package]] +name = "regex" +version = "1.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-lite" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab834c73d247e67f4fae452806d17d3c7501756d98c8808d7c9c7aa7d18f973" + +[[package]] +name = "regex-syntax" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" + +[[package]] +name = "reqwest" +version = "0.12.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" +dependencies = [ + "base64", + "bytes", + "encoding_rs", + "futures-core", + "h2 0.4.13", + "http 1.4.0", + "http-body 1.0.1", + "http-body-util", + "hyper 1.8.1", + "hyper-rustls 0.27.7", + "hyper-tls", + "hyper-util", + "js-sys", + "log", + "mime", + "native-tls", + "percent-encoding", + "pin-project-lite", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-native-tls", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "rfc6979" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" +dependencies = [ + "crypto-bigint 0.4.9", + "hmac", + "zeroize", +] + +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.17", + "libc", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "rsa" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8573f03f5883dcaebdfcf4725caa1ecb9c15b2ef50c43a07b816e06799bb12d" +dependencies = [ + "const-oid", + "digest", + "num-bigint-dig", + "num-integer", + "num-traits", + "pkcs1", + "pkcs8 0.10.2", + "rand_core 0.6.4", + "signature 2.2.0", + "spki 0.7.3", + "subtle", + "zeroize", +] + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustls" +version = "0.21.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" +dependencies = [ + "log", + "ring", + "rustls-webpki 0.101.7", + "sct", +] + +[[package]] +name = "rustls" +version = "0.23.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "758025cb5fccfd3bc2fd74708fd4682be41d99e5dff73c377c0646c6012c73a4" +dependencies = [ + "aws-lc-rs", + "once_cell", + "rustls-pki-types", + "rustls-webpki 0.103.9", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-native-certs" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "612460d5f7bea540c490b2b6395d8e34a953e52b491accd6c86c8164c5932a63" +dependencies = [ + "openssl-probe", + "rustls-pki-types", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pemfile" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd" +dependencies = [ + "zeroize", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "rustls-webpki" +version = "0.103.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7df23109aa6c1567d1c575b9952556388da57401e4ace1d15f79eedad0d8f53" +dependencies = [ + "aws-lc-rs", + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" + +[[package]] +name = "ryu" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" + +[[package]] +name = "schannel" +version = "0.1.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91c1b7e4904c873ef0710c1f407dde2e6287de2bebc1bbbf7d430bb7cbffd939" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "sec1" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" +dependencies = [ + "base16ct", + "der 0.6.1", + "generic-array", + "pkcs8 0.9.0", + "subtle", + "zeroize", +] + +[[package]] +name = "security-framework" +version = "3.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" +dependencies = [ + "bitflags", + "core-foundation 0.10.1", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2691df843ecc5d231c0b14ece2acc3efb62c0a398c7e1d875f3983ce020e3" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.149" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "serde_path_to_error" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10a9ff822e371bb5403e391ecd83e182e0e77ba7f6fe0160b795797109d1b457" +dependencies = [ + "itoa", + "serde", + "serde_core", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signal-hook-registry" +version = "1.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" +dependencies = [ + "errno", + "libc", +] + +[[package]] +name = "signature" +version = "1.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" +dependencies = [ + "digest", + "rand_core 0.6.4", +] + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest", + "rand_core 0.6.4", +] + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "slug" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "882a80f72ee45de3cc9a5afeb2da0331d58df69e4e7d8eeb5d3c7784ae67e724" +dependencies = [ + "deunicode", + "wasm-bindgen", +] + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" +dependencies = [ + "serde", +] + +[[package]] +name = "socket2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "socket2" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] + +[[package]] +name = "spki" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" +dependencies = [ + "base64ct", + "der 0.6.1", +] + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der 0.7.10", +] + +[[package]] +name = "sqlx" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fefb893899429669dcdd979aff487bd78f4064e5e7907e4269081e0ef7d97dc" +dependencies = [ + "sqlx-core", + "sqlx-macros", + "sqlx-mysql", + "sqlx-postgres", + "sqlx-sqlite", +] + +[[package]] +name = "sqlx-core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee6798b1838b6a0f69c007c133b8df5866302197e404e8b6ee8ed3e3a5e68dc6" +dependencies = [ + "base64", + "bytes", + "chrono", + "crc", + "crossbeam-queue", + "either", + "event-listener", + "futures-core", + "futures-intrusive", + "futures-io", + "futures-util", + "hashbrown 0.15.5", + "hashlink", + "indexmap", + "log", + "memchr", + "once_cell", + "percent-encoding", + "rustls 0.23.37", + "serde", + "serde_json", + "sha2", + "smallvec", + "thiserror", + "tokio", + "tokio-stream", + "tracing", + "url", + "uuid", + "webpki-roots 0.26.11", +] + +[[package]] +name = "sqlx-macros" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2d452988ccaacfbf5e0bdbc348fb91d7c8af5bee192173ac3636b5fb6e6715d" +dependencies = [ + "proc-macro2", + "quote", + "sqlx-core", + "sqlx-macros-core", + "syn", +] + +[[package]] +name = "sqlx-macros-core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19a9c1841124ac5a61741f96e1d9e2ec77424bf323962dd894bdb93f37d5219b" +dependencies = [ + "dotenvy", + "either", + "heck", + "hex", + "once_cell", + "proc-macro2", + "quote", + "serde", + "serde_json", + "sha2", + "sqlx-core", + "sqlx-mysql", + "sqlx-postgres", + "sqlx-sqlite", + "syn", + "tokio", + "url", +] + +[[package]] +name = "sqlx-mysql" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa003f0038df784eb8fecbbac13affe3da23b45194bd57dba231c8f48199c526" +dependencies = [ + "atoi", + "base64", + "bitflags", + "byteorder", + "bytes", + "chrono", + "crc", + "digest", + "dotenvy", + "either", + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "generic-array", + "hex", + "hkdf", + "hmac", + "itoa", + "log", + "md-5", + "memchr", + "once_cell", + "percent-encoding", + "rand 0.8.5", + "rsa", + "serde", + "sha1", + "sha2", + "smallvec", + "sqlx-core", + "stringprep", + "thiserror", + "tracing", + "uuid", + "whoami", +] + +[[package]] +name = "sqlx-postgres" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db58fcd5a53cf07c184b154801ff91347e4c30d17a3562a635ff028ad5deda46" +dependencies = [ + "atoi", + "base64", + "bitflags", + "byteorder", + "chrono", + "crc", + "dotenvy", + "etcetera", + "futures-channel", + "futures-core", + "futures-util", + "hex", + "hkdf", + "hmac", + "home", + "itoa", + "log", + "md-5", + "memchr", + "once_cell", + "rand 0.8.5", + "serde", + "serde_json", + "sha2", + "smallvec", + "sqlx-core", + "stringprep", + "thiserror", + "tracing", + "uuid", + "whoami", +] + +[[package]] +name = "sqlx-sqlite" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2d12fe70b2c1b4401038055f90f151b78208de1f9f89a7dbfd41587a10c3eea" +dependencies = [ + "atoi", + "chrono", + "flume", + "futures-channel", + "futures-core", + "futures-executor", + "futures-intrusive", + "futures-util", + "libsqlite3-sys", + "log", + "percent-encoding", + "serde", + "serde_urlencoded", + "sqlx-core", + "thiserror", + "tracing", + "url", + "uuid", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "stringprep" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" +dependencies = [ + "unicode-bidi", + "unicode-normalization", + "unicode-properties", +] + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "syn" +version = "2.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "system-configuration" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a13f3d0daba03132c0aa9767f98351b3488edc2c100cda2d2ec2b04f3d8d3c8b" +dependencies = [ + "bitflags", + "core-foundation 0.9.4", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "tempfile" +version = "3.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" +dependencies = [ + "fastrand", + "getrandom 0.4.2", + "once_cell", + "rustix", + "windows-sys 0.61.2", +] + +[[package]] +name = "thiserror" +version = "2.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thread_local" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "time" +version = "0.3.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde_core", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" + +[[package]] +name = "time-macros" +version = "0.2.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tinystr" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27ad5e34374e03cfffefc301becb44e9dc3c17584f414349ebe29ed26661822d" +dependencies = [ + "bytes", + "libc", + "mio", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2 0.6.3", + "tokio-macros", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-macros" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c55a2eff8b69ce66c84f85e1da1c233edc36ceb85a2058d11b0d6a3c7e7569c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls 0.21.12", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" +dependencies = [ + "rustls 0.23.37", + "tokio", +] + +[[package]] +name = "tokio-stream" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32da49809aab5c3bc678af03902d4ccddea2a87d028d86392a4b1560c6906c70" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tower" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-cookies" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151b5a3e3c45df17466454bb74e9ecedecc955269bdedbf4d150dfa393b55a36" +dependencies = [ + "axum-core", + "cookie", + "futures-util", + "http 1.4.0", + "parking_lot", + "pin-project-lite", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" +dependencies = [ + "bitflags", + "bytes", + "futures-core", + "futures-util", + "http 1.4.0", + "http-body 1.0.1", + "http-body-util", + "http-range-header", + "httpdate", + "iri-string", + "mime", + "mime_guess", + "percent-encoding", + "pin-project-lite", + "tokio", + "tokio-util", + "tower", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tower-sessions" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "518dca34b74a17cadfcee06e616a09d2bd0c3984eff1769e1e76d58df978fc78" +dependencies = [ + "async-trait", + "http 1.4.0", + "time", + "tokio", + "tower-cookies", + "tower-layer", + "tower-service", + "tower-sessions-core", + "tower-sessions-memory-store", + "tracing", +] + +[[package]] +name = "tower-sessions-core" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "568531ec3dfcf3ffe493de1958ae5662a0284ac5d767476ecdb6a34ff8c6b06c" +dependencies = [ + "async-trait", + "axum-core", + "base64", + "futures", + "http 1.4.0", + "parking_lot", + "rand 0.9.2", + "serde", + "serde_json", + "thiserror", + "time", + "tokio", + "tracing", +] + +[[package]] +name = "tower-sessions-memory-store" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "713fabf882b6560a831e2bbed6204048b35bdd60e50bbb722902c74f8df33460" +dependencies = [ + "async-trait", + "time", + "tokio", + "tower-sessions-core", +] + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +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]] +name = "tracing-subscriber" +version = "0.3.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex-automata", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "typenum" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" + +[[package]] +name = "unicase" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" + +[[package]] +name = "unicode-bidi" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" + +[[package]] +name = "unicode-ident" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" + +[[package]] +name = "unicode-normalization" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fd4f6878c9cb28d874b009da9e8d183b5abc80117c40bbd187a1fde336be6e8" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-properties" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7df058c713841ad818f1dc5d3fd88063241cc61f49f5fbea4b951e8cf5a8d71d" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "universal-hash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" +dependencies = [ + "crypto-common", + "subtle", +] + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "uuid" +version = "1.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a68d3c8f01c0cfa54a75291d83601161799e4a89a39e0929f4b0354d88757a37" +dependencies = [ + "getrandom 0.4.2", + "js-sys", + "serde_core", + "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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "vsimd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64" + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.2+wasi-0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasip3" +version = "0.4.0+wasi-0.3.0-rc-2026-01-06" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" + +[[package]] +name = "wasm-bindgen" +version = "0.2.114" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6532f9a5c1ece3798cb1c2cfdba640b9b3ba884f5db45973a6f442510a87d38e" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9c5522b3a28661442748e09d40924dfb9ca614b21c00d3fd135720e48b67db8" +dependencies = [ + "cfg-if", + "futures-util", + "js-sys", + "once_cell", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.114" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18a2d50fcf105fb33bb15f00e7a77b772945a2ee45dcf454961fd843e74c18e6" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.114" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03ce4caeaac547cdf713d280eda22a730824dd11e6b8c3ca9e42247b25c631e3" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.114" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75a326b8c223ee17883a4251907455a2431acc2791c98c26279376490c378c16" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wasm-encoder" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" +dependencies = [ + "leb128fmt", + "wasmparser", +] + +[[package]] +name = "wasm-metadata" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" +dependencies = [ + "anyhow", + "indexmap", + "wasm-encoder", + "wasmparser", +] + +[[package]] +name = "wasmparser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" +dependencies = [ + "bitflags", + "hashbrown 0.15.5", + "indexmap", + "semver", +] + +[[package]] +name = "web-sys" +version = "0.3.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "854ba17bb104abfb26ba36da9729addc7ce7f06f5c0f90f3c391f8461cca21f9" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-roots" +version = "0.26.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9" +dependencies = [ + "webpki-roots 1.0.6", +] + +[[package]] +name = "webpki-roots" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22cfaf3c063993ff62e73cb4311efde4db1efb31ab78a3e5c457939ad5cc0bed" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "whoami" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d4a4db5077702ca3015d3d02d74974948aba2ad9e12ab7df718ee64ccd7e97d" +dependencies = [ + "libredox", + "wasite", +] + +[[package]] +name = "windows-core" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-registry" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02752bf7fbdcce7f2a27a742f798510f3e5ad88dbe84871e5168e2120c3d5720" +dependencies = [ + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 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_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[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_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "wit-bindgen" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" +dependencies = [ + "wit-bindgen-rust-macro", +] + +[[package]] +name = "wit-bindgen-core" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" +dependencies = [ + "anyhow", + "heck", + "wit-parser", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" +dependencies = [ + "anyhow", + "heck", + "indexmap", + "prettyplease", + "syn", + "wasm-metadata", + "wit-bindgen-core", + "wit-component", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn", + "wit-bindgen-core", + "wit-bindgen-rust", +] + +[[package]] +name = "wit-component" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" +dependencies = [ + "anyhow", + "bitflags", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder", + "wasm-metadata", + "wasmparser", + "wit-parser", +] + +[[package]] +name = "wit-parser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser", +] + +[[package]] +name = "writeable" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" + +[[package]] +name = "xmlparser" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66fee0b777b0f5ac1c69bb06d361268faafa61cd4682ae064a171c16c433e9e4" + +[[package]] +name = "yoke" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.8.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2578b716f8a7a858b7f02d5bd870c14bf4ddbbcf3a4c05414ba6503640505e3" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e6cc098ea4d3bd6246687de65af3f920c430e236bee1e3bf2e441463f08a02f" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" + +[[package]] +name = "zerotrie" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zmij" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" diff --git a/herbapi-api/Cargo.toml b/herbapi-api/Cargo.toml new file mode 100644 index 0000000..001eda2 --- /dev/null +++ b/herbapi-api/Cargo.toml @@ -0,0 +1,31 @@ +[package] +name = "herbapi-api" +version = "0.1.0" +edition = "2024" + +[dependencies] +anyhow = "1" +axum = { version = "0.8", features = ["macros", "multipart"] } +axum-extra = { version = "0.10", features = ["typed-header"] } +axum-server = { version = "0.7", features = ["tls-rustls"] } +aws-sdk-s3 = "1" +aws-credential-types = "1" +chrono = { version = "0.4", features = ["serde"] } +hex = "0.4" +once_cell = "1" +rand = "0.8" +reqwest = { version = "0.12", features = ["json"] } +rustls = { version = "0.23", default-features = false, features = ["aws-lc-rs"] } +serde = { version = "1", features = ["derive"] } +serde_json = "1" +sha2 = "0.10" +slug = "0.1" +sqlx = { version = "0.8", features = ["runtime-tokio", "tls-rustls-aws-lc-rs", "postgres", "uuid", "chrono", "migrate"] } +thiserror = "2" +tokio = { version = "1", features = ["full"] } +tower = "0.5" +tower-http = { version = "0.6", features = ["cors", "fs"] } +tower-sessions = { version = "0.15", features = ["private"] } +tracing = "0.1" +tracing-subscriber = { version = "0.3", features = ["env-filter"] } +uuid = { version = "1", features = ["v4", "v7", "serde"] } diff --git a/herbapi-api/migrations/001_create_families.sql b/herbapi-api/migrations/001_create_families.sql new file mode 100644 index 0000000..ac4044f --- /dev/null +++ b/herbapi-api/migrations/001_create_families.sql @@ -0,0 +1,16 @@ +CREATE TABLE families ( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + slug TEXT NOT NULL UNIQUE, + name_scientific TEXT NOT NULL, + name_en TEXT, + name_de TEXT, + description TEXT, + created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), + updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW() +); + +CREATE INDEX idx_families_search ON families + USING GIN (to_tsvector('english', + coalesce(name_scientific,'') || ' ' || + coalesce(name_en,'') || ' ' || + coalesce(name_de,''))); diff --git a/herbapi-api/migrations/002_create_species.sql b/herbapi-api/migrations/002_create_species.sql new file mode 100644 index 0000000..b5f1f8d --- /dev/null +++ b/herbapi-api/migrations/002_create_species.sql @@ -0,0 +1,77 @@ +CREATE TYPE invasiveness_level AS ENUM ('none', 'watch_list', 'invasive', 'banned'); +CREATE TYPE plant_layer AS ENUM ('canopy', 'understory', 'shrub', 'herbaceous', 'ground_cover', 'vine', 'root'); +CREATE TYPE succession_stage AS ENUM ('pioneer', 'early', 'mid', 'climax'); +CREATE TYPE drought_tolerance AS ENUM ('none', 'low', 'moderate', 'high'); +CREATE TYPE salt_tolerance AS ENUM ('none', 'low', 'moderate', 'high'); + +CREATE TABLE species ( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + slug TEXT NOT NULL UNIQUE, + family_id UUID NOT NULL REFERENCES families(id) ON DELETE RESTRICT, + name_scientific TEXT NOT NULL, + name_en TEXT, + name_de TEXT, + description TEXT, + soil_moisture TEXT, + drainage_requirement TEXT, + organic_matter_pct NUMERIC(5,2), + nitrogen_ppm INTEGER, + phosphorus_ppm INTEGER, + potassium_ppm INTEGER, + boron_ppm NUMERIC(8,2), + calcium_ppm INTEGER, + copper_ppm NUMERIC(8,2), + iron_ppm NUMERIC(8,2), + magnesium_ppm INTEGER, + manganese_ppm NUMERIC(8,2), + molybdenum_ppm NUMERIC(8,2), + sulfur_ppm INTEGER, + zinc_ppm NUMERIC(8,2), + ph_min NUMERIC(4,2), + ph_max NUMERIC(4,2), + soil_texture_preference TEXT[], + hardiness_zone_usda TEXT, + hardiness_zone_at TEXT, + min_temp NUMERIC(5,2), + max_temp NUMERIC(5,2), + drought_tolerance drought_tolerance, + water_requirement_mm_week NUMERIC(5,2), + waterlogging_tolerance BOOLEAN, + salt_tolerance salt_tolerance, + edibility_rating SMALLINT, + food_uses TEXT, + medicinal_uses TEXT, + other_uses TEXT, + native_range TEXT, + invasiveness invasiveness_level DEFAULT 'none', + pollination_type TEXT, + plant_layer plant_layer, + nitrogen_fixer BOOLEAN, + dynamic_accumulator BOOLEAN, + dynamic_accumulator_nutrients TEXT[], + attracts_pollinators BOOLEAN, + attracts_beneficial_insects BOOLEAN, + wildlife_value TEXT, + mulch_plant BOOLEAN, + ground_cover_quality TEXT, + allelopathic BOOLEAN, + guild_role TEXT[], + succession_stage succession_stage, + heavy_metal_tolerance BOOLEAN, + wikidata_qid TEXT, + gbif_id TEXT, + eppo_code TEXT, + pfaf_url TEXT, + primary_image_key TEXT, + source_urls TEXT[], + created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), + updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW() +); + +CREATE INDEX idx_species_family ON species(family_id); +CREATE INDEX idx_species_search ON species + USING GIN (to_tsvector('english', + coalesce(name_scientific,'') || ' ' || + coalesce(name_en,'') || ' ' || + coalesce(name_de,'') || ' ' || + coalesce(description,''))); diff --git a/herbapi-api/migrations/003_create_cultivars.sql b/herbapi-api/migrations/003_create_cultivars.sql new file mode 100644 index 0000000..9f1edca --- /dev/null +++ b/herbapi-api/migrations/003_create_cultivars.sql @@ -0,0 +1,78 @@ +CREATE TYPE frost_tolerance AS ENUM ('none', 'light_frost', 'moderate_frost', 'hardy'); + +CREATE TABLE cultivars ( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + slug TEXT NOT NULL UNIQUE, + species_id UUID NOT NULL REFERENCES species(id) ON DELETE RESTRICT, + name TEXT NOT NULL, + name_en TEXT, + name_de TEXT, + name_scientific TEXT, + description TEXT, + is_organic BOOLEAN NOT NULL DEFAULT FALSE, + perennial BOOLEAN NOT NULL DEFAULT FALSE, + growing_time_days INTEGER, + planting_depth_cm NUMERIC(5,2), + row_spacing_cm NUMERIC(5,2), + plant_spacing_cm NUMERIC(5,2), + days_to_germination INTEGER, + germination_temp_c NUMERIC(5,2), + light_requirement TEXT, + stratification_required BOOLEAN, + stratification_days INTEGER, + scarification_required BOOLEAN, + seed_viability_years INTEGER, + storage_temp_c NUMERIC(5,2), + storage_humidity TEXT, + storage_notes TEXT, + min_temp NUMERIC(5,2), + max_temp NUMERIC(5,2), + humidity TEXT, + light TEXT, + frost_tolerance frost_tolerance, + min_light_hours_day NUMERIC(4,1), + optimal_light_hours_day NUMERIC(4,1), + greenhouse_min_temp_c NUMERIC(5,2), + indoor_season_extension_weeks INTEGER, + ventilation_requirement TEXT, + heating_required BOOLEAN, + indoor_sowing_months INTEGER[], + direct_sowing_months INTEGER[], + transplanting_months INTEGER[], + glasshouse_months INTEGER[], + harvesting_months INTEGER[], + succession_planting_days INTEGER, + planting_notes TEXT, + propagation_methods TEXT[], + cutting_season TEXT, + rootstock_species_id UUID REFERENCES species(id), + years_to_first_harvest INTEGER, + productive_lifespan_years INTEGER, + expected_yield_kg_per_m2 NUMERIC(8,2), + yield_unit TEXT, + expected_yield_value NUMERIC(8,2), + harvest_window_days INTEGER, + storage_method TEXT[], + shelf_life_days INTEGER, + cold_storage_days INTEGER, + pollination_group TEXT, + self_fertile BOOLEAN, + rootstock_compatibility TEXT, + wikidata_qid TEXT, + gbif_id TEXT, + pfaf_url TEXT, + primary_image_key TEXT, + source_urls TEXT[], + created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), + updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW() +); + +CREATE INDEX idx_cultivars_species ON cultivars(species_id); +CREATE INDEX idx_cultivars_rootstock ON cultivars(rootstock_species_id) WHERE rootstock_species_id IS NOT NULL; +CREATE INDEX idx_cultivars_search ON cultivars + USING GIN (to_tsvector('english', + coalesce(name,'') || ' ' || + coalesce(name_en,'') || ' ' || + coalesce(name_de,'') || ' ' || + coalesce(name_scientific,'') || ' ' || + coalesce(description,''))); diff --git a/herbapi-api/migrations/004_create_images.sql b/herbapi-api/migrations/004_create_images.sql new file mode 100644 index 0000000..2bac22f --- /dev/null +++ b/herbapi-api/migrations/004_create_images.sql @@ -0,0 +1,13 @@ +CREATE TABLE images ( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + entity_type TEXT NOT NULL, + entity_id UUID NOT NULL, + s3_key TEXT NOT NULL, + caption TEXT, + source_url TEXT, + license TEXT, + is_primary BOOLEAN NOT NULL DEFAULT FALSE, + created_at TIMESTAMPTZ NOT NULL DEFAULT NOW() +); + +CREATE INDEX idx_images_entity ON images(entity_type, entity_id); diff --git a/herbapi-api/migrations/005_create_scrape_log.sql b/herbapi-api/migrations/005_create_scrape_log.sql new file mode 100644 index 0000000..82749a8 --- /dev/null +++ b/herbapi-api/migrations/005_create_scrape_log.sql @@ -0,0 +1,12 @@ +CREATE TABLE scrape_log ( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + source_name TEXT NOT NULL, + entity_type TEXT NOT NULL, + entity_id UUID NOT NULL, + source_url TEXT NOT NULL, + last_scraped_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), + raw_data JSONB +); + +CREATE INDEX idx_scrape_entity ON scrape_log(entity_type, entity_id); +CREATE INDEX idx_scrape_source ON scrape_log(source_name); diff --git a/herbapi-api/migrations/006_create_suppliers.sql b/herbapi-api/migrations/006_create_suppliers.sql new file mode 100644 index 0000000..aa0088b --- /dev/null +++ b/herbapi-api/migrations/006_create_suppliers.sql @@ -0,0 +1,29 @@ +CREATE TABLE suppliers ( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + slug TEXT NOT NULL UNIQUE, + name TEXT NOT NULL, + url TEXT, + is_organic BOOLEAN NOT NULL DEFAULT FALSE, + is_demeter BOOLEAN NOT NULL DEFAULT FALSE, + country TEXT, + notes TEXT, + created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), + updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW() +); + +CREATE TABLE cultivar_suppliers ( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + cultivar_id UUID NOT NULL REFERENCES cultivars(id) ON DELETE CASCADE, + supplier_id UUID NOT NULL REFERENCES suppliers(id) ON DELETE CASCADE, + article_number TEXT, + product_url TEXT, + price_eur NUMERIC(8,2), + pack_size NUMERIC(8,2), + pack_unit TEXT, + last_checked_at TIMESTAMPTZ, + created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), + UNIQUE(cultivar_id, supplier_id, article_number) +); + +CREATE INDEX idx_cs_cultivar ON cultivar_suppliers(cultivar_id); +CREATE INDEX idx_cs_supplier ON cultivar_suppliers(supplier_id); diff --git a/herbapi-api/migrations/007_create_companion_relationships.sql b/herbapi-api/migrations/007_create_companion_relationships.sql new file mode 100644 index 0000000..2f4ec22 --- /dev/null +++ b/herbapi-api/migrations/007_create_companion_relationships.sql @@ -0,0 +1,16 @@ +CREATE TYPE companion_type AS ENUM ('beneficial', 'neutral', 'antagonistic'); + +CREATE TABLE companion_relationships ( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + species_a_id UUID NOT NULL REFERENCES species(id) ON DELETE CASCADE, + species_b_id UUID NOT NULL REFERENCES species(id) ON DELETE CASCADE, + relationship companion_type NOT NULL, + mechanism TEXT, + source_url TEXT, + created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), + UNIQUE(species_a_id, species_b_id), + CHECK (species_a_id < species_b_id) +); + +CREATE INDEX idx_companion_a ON companion_relationships(species_a_id); +CREATE INDEX idx_companion_b ON companion_relationships(species_b_id); diff --git a/herbapi-api/migrations/008_create_users.sql b/herbapi-api/migrations/008_create_users.sql new file mode 100644 index 0000000..b17cd5c --- /dev/null +++ b/herbapi-api/migrations/008_create_users.sql @@ -0,0 +1,15 @@ +CREATE TABLE IF NOT EXISTS users ( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + email VARCHAR NOT NULL, + name VARCHAR, + nickname VARCHAR, + avatar_url VARCHAR, + provider VARCHAR NOT NULL DEFAULT 'authentik', + provider_id VARCHAR, + admin BOOLEAN NOT NULL DEFAULT FALSE, + inserted_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), + updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW() +); + +CREATE UNIQUE INDEX IF NOT EXISTS users_email_index ON users (email); +CREATE UNIQUE INDEX IF NOT EXISTS users_provider_provider_id_index ON users (provider, provider_id); diff --git a/herbapi-api/migrations/009_create_api_tokens.sql b/herbapi-api/migrations/009_create_api_tokens.sql new file mode 100644 index 0000000..10a4442 --- /dev/null +++ b/herbapi-api/migrations/009_create_api_tokens.sql @@ -0,0 +1,8 @@ +CREATE TABLE IF NOT EXISTS api_tokens ( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + name TEXT NOT NULL, + token_hash TEXT NOT NULL UNIQUE, + scopes TEXT[] NOT NULL DEFAULT '{}', + created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), + last_used_at TIMESTAMPTZ +); diff --git a/herbapi-api/src/api/companions.rs b/herbapi-api/src/api/companions.rs new file mode 100644 index 0000000..ffc03cb --- /dev/null +++ b/herbapi-api/src/api/companions.rs @@ -0,0 +1,40 @@ +use axum::extract::{Path, State}; +use axum::Json; + +use crate::auth::AuthUser; +use crate::db::{companions as db, models::*}; +use crate::error::{AppError, Result}; +use crate::state::AppState; + +pub async fn list_for_species( + State(state): State, + Path(r): Path, +) -> Result>> { + let id: uuid::Uuid = r.parse().map_err(|_| AppError::NotFound("invalid id".into()))?; + let companions = db::list_for_species(&state.pool, id).await?; + Ok(Json(companions)) +} + +pub async fn create( + State(state): State, + auth: AuthUser, + Json(req): Json, +) -> Result> { + if !auth.can_write() { + return Err(AppError::Forbidden); + } + let companion = db::create(&state.pool, &req).await?; + Ok(Json(companion)) +} + +pub async fn remove( + State(state): State, + auth: AuthUser, + Path(id): Path, +) -> Result> { + if !auth.can_write() { + return Err(AppError::Forbidden); + } + db::delete(&state.pool, id).await?; + Ok(Json(serde_json::json!({ "deleted": true }))) +} diff --git a/herbapi-api/src/api/cultivars.rs b/herbapi-api/src/api/cultivars.rs new file mode 100644 index 0000000..24df1d6 --- /dev/null +++ b/herbapi-api/src/api/cultivars.rs @@ -0,0 +1,62 @@ +use axum::extract::{Path, Query, State}; +use axum::Json; + +use crate::auth::AuthUser; +use crate::db::{cultivars as db, models::*}; +use crate::error::{AppError, Result}; +use crate::state::AppState; + +pub async fn list( + State(state): State, + Query(params): Query, +) -> Result>> { + let result = db::list(&state.pool, ¶ms).await?; + Ok(Json(result)) +} + +pub async fn get_by_slug( + State(state): State, + Path(slug): Path, +) -> Result> { + let cultivar = db::get_by_slug(&state.pool, &slug).await?; + Ok(Json(cultivar)) +} + +pub async fn create( + State(state): State, + auth: AuthUser, + Json(req): Json, +) -> Result> { + if !auth.can_write() { + return Err(AppError::Forbidden); + } + let cultivar = db::create(&state.pool, &req).await?; + Ok(Json(cultivar)) +} + +pub async fn update( + State(state): State, + auth: AuthUser, + Path(r): Path, + Json(req): Json, +) -> Result> { + if !auth.can_write() { + return Err(AppError::Forbidden); + } + let id: uuid::Uuid = r.parse().map_err(|_| AppError::NotFound("invalid id".into()))?; + let cultivar = db::update(&state.pool, id, &req).await?; + Ok(Json(cultivar)) +} + +pub async fn remove( + State(state): State, + auth: AuthUser, + Path(r): Path, +) -> Result> { + if !auth.is_admin() { + return Err(AppError::Forbidden); + } + let id: uuid::Uuid = r.parse().map_err(|_| AppError::NotFound("invalid id".into()))?; + db::delete(&state.pool, id).await?; + Ok(Json(serde_json::json!({ "deleted": true }))) +} diff --git a/herbapi-api/src/api/families.rs b/herbapi-api/src/api/families.rs new file mode 100644 index 0000000..deca5b2 --- /dev/null +++ b/herbapi-api/src/api/families.rs @@ -0,0 +1,62 @@ +use axum::extract::{Path, Query, State}; +use axum::Json; + +use crate::auth::AuthUser; +use crate::db::{families as db, models::*}; +use crate::error::{AppError, Result}; +use crate::state::AppState; + +pub async fn list( + State(state): State, + Query(params): Query, +) -> Result>> { + let result = db::list(&state.pool, ¶ms).await?; + Ok(Json(result)) +} + +pub async fn get_by_slug( + State(state): State, + Path(slug): Path, +) -> Result> { + let family = db::get_by_slug(&state.pool, &slug).await?; + Ok(Json(family)) +} + +pub async fn create( + State(state): State, + auth: AuthUser, + Json(req): Json, +) -> Result> { + if !auth.can_write() { + return Err(AppError::Forbidden); + } + let family = db::create(&state.pool, &req).await?; + Ok(Json(family)) +} + +pub async fn update( + State(state): State, + auth: AuthUser, + Path(r): Path, + Json(req): Json, +) -> Result> { + if !auth.can_write() { + return Err(AppError::Forbidden); + } + let id: uuid::Uuid = r.parse().map_err(|_| AppError::NotFound("invalid id".into()))?; + let family = db::update(&state.pool, id, &req).await?; + Ok(Json(family)) +} + +pub async fn remove( + State(state): State, + auth: AuthUser, + Path(r): Path, +) -> Result> { + if !auth.is_admin() { + return Err(AppError::Forbidden); + } + let id: uuid::Uuid = r.parse().map_err(|_| AppError::NotFound("invalid id".into()))?; + db::delete(&state.pool, id).await?; + Ok(Json(serde_json::json!({ "deleted": true }))) +} diff --git a/herbapi-api/src/api/health.rs b/herbapi-api/src/api/health.rs new file mode 100644 index 0000000..ccbbdc4 --- /dev/null +++ b/herbapi-api/src/api/health.rs @@ -0,0 +1,5 @@ +use axum::response::IntoResponse; + +pub async fn health() -> impl IntoResponse { + axum::Json(serde_json::json!({ "status": "ok" })) +} diff --git a/herbapi-api/src/api/images.rs b/herbapi-api/src/api/images.rs new file mode 100644 index 0000000..86fec5c --- /dev/null +++ b/herbapi-api/src/api/images.rs @@ -0,0 +1,114 @@ +use axum::extract::{Multipart, Path, State}; +use axum::Json; + +use crate::auth::AuthUser; +use crate::db::{images as db, s3}; +use crate::db::models::Image; +use crate::error::{AppError, Result}; +use crate::state::AppState; + +pub async fn list_for_entity( + State(state): State, + Path((entity_type, entity_id)): Path<(String, uuid::Uuid)>, +) -> Result>> { + let images = db::list_for_entity(&state.pool, &entity_type, entity_id).await?; + Ok(Json(images)) +} + +pub async fn upload( + State(state): State, + auth: AuthUser, + mut multipart: Multipart, +) -> Result> { + if !auth.can_write() { + return Err(AppError::Forbidden); + } + + let mut entity_type = None; + let mut entity_id = None; + let mut caption = None; + let mut source_url = None; + let mut license = None; + let mut is_primary = false; + let mut file_data = None; + let mut content_type = "application/octet-stream".to_string(); + let mut file_name = String::new(); + + while let Some(field) = multipart + .next_field() + .await + .map_err(|e| AppError::BadRequest(format!("Multipart error: {e}")))? + { + let name = field.name().unwrap_or_default().to_string(); + match name.as_str() { + "entity_type" => { + entity_type = Some(field.text().await.map_err(|e| AppError::BadRequest(e.to_string()))?); + } + "entity_id" => { + let text = field.text().await.map_err(|e| AppError::BadRequest(e.to_string()))?; + entity_id = Some(text.parse::().map_err(|e| AppError::BadRequest(format!("Invalid UUID: {e}")))?); + } + "caption" => { + caption = Some(field.text().await.map_err(|e| AppError::BadRequest(e.to_string()))?); + } + "source_url" => { + source_url = Some(field.text().await.map_err(|e| AppError::BadRequest(e.to_string()))?); + } + "license" => { + license = Some(field.text().await.map_err(|e| AppError::BadRequest(e.to_string()))?); + } + "is_primary" => { + let text = field.text().await.map_err(|e| AppError::BadRequest(e.to_string()))?; + is_primary = text == "true" || text == "1"; + } + "file" => { + content_type = field.content_type().unwrap_or("application/octet-stream").to_string(); + file_name = field.file_name().unwrap_or("upload").to_string(); + file_data = Some(field.bytes().await.map_err(|e| AppError::BadRequest(format!("File read error: {e}")))?); + } + _ => {} + } + } + + let entity_type = entity_type.ok_or_else(|| AppError::BadRequest("entity_type required".into()))?; + let entity_id = entity_id.ok_or_else(|| AppError::BadRequest("entity_id required".into()))?; + let data = file_data.ok_or_else(|| AppError::BadRequest("file required".into()))?; + + // Generate S3 key + let ext = file_name.rsplit('.').next().unwrap_or("bin"); + let s3_key = format!("{entity_type}/{entity_id}/{}.{ext}", uuid::Uuid::now_v7()); + + // Upload to S3 + s3::upload(&state.s3, &state.config.s3_bucket, &s3_key, data.to_vec(), &content_type).await?; + + // Record in DB + let image = db::create( + &state.pool, + &entity_type, + entity_id, + &s3_key, + caption.as_deref(), + source_url.as_deref(), + license.as_deref(), + is_primary, + ) + .await?; + + Ok(Json(image)) +} + +pub async fn remove( + State(state): State, + auth: AuthUser, + Path(id): Path, +) -> Result> { + if !auth.is_admin() { + return Err(AppError::Forbidden); + } + + let image = db::delete(&state.pool, id).await?; + // Delete from S3 + s3::delete(&state.s3, &state.config.s3_bucket, &image.s3_key).await?; + + Ok(Json(serde_json::json!({ "deleted": true }))) +} diff --git a/herbapi-api/src/api/mod.rs b/herbapi-api/src/api/mod.rs new file mode 100644 index 0000000..aca61fa --- /dev/null +++ b/herbapi-api/src/api/mod.rs @@ -0,0 +1,67 @@ +mod companions; +mod cultivars; +mod families; +mod health; +mod images; +mod search; +mod species; +mod suppliers; + +use axum::http::{header, HeaderValue, StatusCode}; +use axum::response::{Html, IntoResponse}; +use axum::routing::{delete, get, post, put}; +use axum::Router; +use tower_http::services::ServeDir; + +use crate::state::AppState; + +pub fn router(state: AppState) -> Router { + Router::new() + // Health + .route("/health", get(health::health)) + // Families + .route("/api/v1/families", get(families::list).post(families::create)) + .route("/api/v1/families/{ref}", get(families::get_by_slug).put(families::update).delete(families::remove)) + // Species + .route("/api/v1/species", get(species::list).post(species::create)) + .route("/api/v1/species/{ref}", get(species::get_by_slug).put(species::update).delete(species::remove)) + .route("/api/v1/species/{ref}/companions", get(companions::list_for_species)) + // Cultivars + .route("/api/v1/cultivars", get(cultivars::list).post(cultivars::create)) + .route("/api/v1/cultivars/{ref}", get(cultivars::get_by_slug).put(cultivars::update).delete(cultivars::remove)) + .route("/api/v1/cultivars/{ref}/suppliers", get(suppliers::list_for_cultivar).post(suppliers::link_cultivar)) + .route("/api/v1/cultivars/{cid}/suppliers/{sid}", delete(suppliers::unlink_cultivar)) + // Suppliers + .route("/api/v1/suppliers", get(suppliers::list).post(suppliers::create)) + .route("/api/v1/suppliers/{ref}", get(suppliers::get_by_slug).put(suppliers::update).delete(suppliers::remove)) + // Companions + .route("/api/v1/companions", post(companions::create)) + .route("/api/v1/companions/{id}", delete(companions::remove)) + // Images + .route("/api/v1/images/{entity_type}/{entity_id}", get(images::list_for_entity)) + .route("/api/v1/images", post(images::upload)) + .route("/api/v1/images/{id}", delete(images::remove)) + // Search + .route("/api/v1/search", get(search::search)) + // OIDC auth + .route("/auth/oidc/login", get(crate::auth::oidc::login)) + .route("/auth/oidc/callback", get(crate::auth::oidc::callback)) + .route("/auth/oidc/logout", get(crate::auth::oidc::logout)) + .route("/auth/me", get(crate::auth::oidc::me)) + // SPA fallback + .fallback_service( + ServeDir::new("frontend") + .fallback(tower::service_fn(|_req| async { + match tokio::fs::read_to_string("frontend/index.html").await { + Ok(html) => Ok(Html(html).into_response()), + Err(_) => Ok(( + StatusCode::OK, + [(header::CONTENT_TYPE, HeaderValue::from_static("text/plain"))], + "HerbAPI — frontend not found, use /health or /api/v1/*", + ) + .into_response()), + } + })), + ) + .with_state(state) +} diff --git a/herbapi-api/src/api/search.rs b/herbapi-api/src/api/search.rs new file mode 100644 index 0000000..fa7d95d --- /dev/null +++ b/herbapi-api/src/api/search.rs @@ -0,0 +1,99 @@ +use axum::extract::{Query, State}; +use axum::Json; +use serde::Deserialize; + +use crate::db::models::SearchResult; +use crate::error::Result; +use crate::state::AppState; + +#[derive(Debug, Deserialize)] +pub struct SearchParams { + pub q: String, + pub limit: Option, +} + +pub async fn search( + State(state): State, + Query(params): Query, +) -> Result>> { + let limit = params.limit.unwrap_or(20).min(100); + let tsquery = params.q.split_whitespace().collect::>().join(" & "); + + // Search across families, species, cultivars + let mut results = Vec::new(); + + // Families + let families: Vec<(uuid::Uuid, String, String, Option, f32)> = sqlx::query_as( + "SELECT id, slug, name_scientific, description, + ts_rank(to_tsvector('english', coalesce(name_scientific,'') || ' ' || coalesce(name_en,'') || ' ' || coalesce(name_de,'')), + to_tsquery('english', $1)) AS rank + FROM families + WHERE to_tsvector('english', coalesce(name_scientific,'') || ' ' || coalesce(name_en,'') || ' ' || coalesce(name_de,'')) + @@ to_tsquery('english', $1) + ORDER BY rank DESC LIMIT $2" + ) + .bind(&tsquery).bind(limit) + .fetch_all(&state.pool) + .await?; + + for (id, slug, name, desc, rank) in families { + results.push(SearchResult { + entity_type: "family".to_string(), + id, slug, name, + description: desc, + rank, + }); + } + + // Species + let species: Vec<(uuid::Uuid, String, String, Option, f32)> = sqlx::query_as( + "SELECT id, slug, name_scientific, description, + ts_rank(to_tsvector('english', coalesce(name_scientific,'') || ' ' || coalesce(name_en,'') || ' ' || coalesce(name_de,'') || ' ' || coalesce(description,'')), + to_tsquery('english', $1)) AS rank + FROM species + WHERE to_tsvector('english', coalesce(name_scientific,'') || ' ' || coalesce(name_en,'') || ' ' || coalesce(name_de,'') || ' ' || coalesce(description,'')) + @@ to_tsquery('english', $1) + ORDER BY rank DESC LIMIT $2" + ) + .bind(&tsquery).bind(limit) + .fetch_all(&state.pool) + .await?; + + for (id, slug, name, desc, rank) in species { + results.push(SearchResult { + entity_type: "species".to_string(), + id, slug, name, + description: desc, + rank, + }); + } + + // Cultivars + let cultivars: Vec<(uuid::Uuid, String, String, Option, f32)> = sqlx::query_as( + "SELECT id, slug, name, description, + ts_rank(to_tsvector('english', coalesce(name,'') || ' ' || coalesce(name_en,'') || ' ' || coalesce(name_de,'') || ' ' || coalesce(name_scientific,'') || ' ' || coalesce(description,'')), + to_tsquery('english', $1)) AS rank + FROM cultivars + WHERE to_tsvector('english', coalesce(name,'') || ' ' || coalesce(name_en,'') || ' ' || coalesce(name_de,'') || ' ' || coalesce(name_scientific,'') || ' ' || coalesce(description,'')) + @@ to_tsquery('english', $1) + ORDER BY rank DESC LIMIT $2" + ) + .bind(&tsquery).bind(limit) + .fetch_all(&state.pool) + .await?; + + for (id, slug, name, desc, rank) in cultivars { + results.push(SearchResult { + entity_type: "cultivar".to_string(), + id, slug, name, + description: desc, + rank, + }); + } + + // Sort all by rank descending, take limit + results.sort_by(|a, b| b.rank.partial_cmp(&a.rank).unwrap_or(std::cmp::Ordering::Equal)); + results.truncate(limit as usize); + + Ok(Json(results)) +} diff --git a/herbapi-api/src/api/species.rs b/herbapi-api/src/api/species.rs new file mode 100644 index 0000000..bd82586 --- /dev/null +++ b/herbapi-api/src/api/species.rs @@ -0,0 +1,62 @@ +use axum::extract::{Path, Query, State}; +use axum::Json; + +use crate::auth::AuthUser; +use crate::db::{species as db, models::*}; +use crate::error::{AppError, Result}; +use crate::state::AppState; + +pub async fn list( + State(state): State, + Query(params): Query, +) -> Result>> { + let result = db::list(&state.pool, ¶ms).await?; + Ok(Json(result)) +} + +pub async fn get_by_slug( + State(state): State, + Path(slug): Path, +) -> Result> { + let species = db::get_by_slug(&state.pool, &slug).await?; + Ok(Json(species)) +} + +pub async fn create( + State(state): State, + auth: AuthUser, + Json(req): Json, +) -> Result> { + if !auth.can_write() { + return Err(AppError::Forbidden); + } + let species = db::create(&state.pool, &req).await?; + Ok(Json(species)) +} + +pub async fn update( + State(state): State, + auth: AuthUser, + Path(r): Path, + Json(req): Json, +) -> Result> { + if !auth.can_write() { + return Err(AppError::Forbidden); + } + let id: uuid::Uuid = r.parse().map_err(|_| AppError::NotFound("invalid id".into()))?; + let species = db::update(&state.pool, id, &req).await?; + Ok(Json(species)) +} + +pub async fn remove( + State(state): State, + auth: AuthUser, + Path(r): Path, +) -> Result> { + if !auth.is_admin() { + return Err(AppError::Forbidden); + } + let id: uuid::Uuid = r.parse().map_err(|_| AppError::NotFound("invalid id".into()))?; + db::delete(&state.pool, id).await?; + Ok(Json(serde_json::json!({ "deleted": true }))) +} diff --git a/herbapi-api/src/api/suppliers.rs b/herbapi-api/src/api/suppliers.rs new file mode 100644 index 0000000..4cf62c8 --- /dev/null +++ b/herbapi-api/src/api/suppliers.rs @@ -0,0 +1,96 @@ +use axum::extract::{Path, State}; +use axum::Json; + +use crate::auth::AuthUser; +use crate::db::{suppliers as db, models::*}; +use crate::error::{AppError, Result}; +use crate::state::AppState; + +pub async fn list(State(state): State) -> Result>> { + let suppliers = db::list(&state.pool).await?; + Ok(Json(suppliers)) +} + +pub async fn get_by_slug( + State(state): State, + Path(slug): Path, +) -> Result> { + let supplier = db::get_by_slug(&state.pool, &slug).await?; + Ok(Json(supplier)) +} + +pub async fn create( + State(state): State, + auth: AuthUser, + Json(req): Json, +) -> Result> { + if !auth.can_write() { + return Err(AppError::Forbidden); + } + let supplier = db::create(&state.pool, &req).await?; + Ok(Json(supplier)) +} + +pub async fn update( + State(state): State, + auth: AuthUser, + Path(r): Path, + Json(req): Json, +) -> Result> { + if !auth.can_write() { + return Err(AppError::Forbidden); + } + let id: uuid::Uuid = r.parse().map_err(|_| AppError::NotFound("invalid id".into()))?; + let supplier = db::update(&state.pool, id, &req).await?; + Ok(Json(supplier)) +} + +pub async fn remove( + State(state): State, + auth: AuthUser, + Path(r): Path, +) -> Result> { + if !auth.is_admin() { + return Err(AppError::Forbidden); + } + let id: uuid::Uuid = r.parse().map_err(|_| AppError::NotFound("invalid id".into()))?; + db::delete(&state.pool, id).await?; + Ok(Json(serde_json::json!({ "deleted": true }))) +} + +// Cultivar-supplier links + +pub async fn list_for_cultivar( + State(state): State, + Path(r): Path, +) -> Result>> { + let id: uuid::Uuid = r.parse().map_err(|_| AppError::NotFound("invalid id".into()))?; + let links = db::list_for_cultivar(&state.pool, id).await?; + Ok(Json(links)) +} + +pub async fn link_cultivar( + State(state): State, + auth: AuthUser, + Path(r): Path, + Json(req): Json, +) -> Result> { + if !auth.can_write() { + return Err(AppError::Forbidden); + } + let id: uuid::Uuid = r.parse().map_err(|_| AppError::NotFound("invalid id".into()))?; + let link = db::link_cultivar(&state.pool, id, &req).await?; + Ok(Json(link)) +} + +pub async fn unlink_cultivar( + State(state): State, + auth: AuthUser, + Path((cid, sid)): Path<(uuid::Uuid, uuid::Uuid)>, +) -> Result> { + if !auth.can_write() { + return Err(AppError::Forbidden); + } + db::unlink_cultivar(&state.pool, cid, sid).await?; + Ok(Json(serde_json::json!({ "deleted": true }))) +} diff --git a/herbapi-api/src/auth/extractor.rs b/herbapi-api/src/auth/extractor.rs new file mode 100644 index 0000000..53a7181 --- /dev/null +++ b/herbapi-api/src/auth/extractor.rs @@ -0,0 +1,238 @@ +use axum::extract::FromRequestParts; +use axum::http::request::Parts; +use axum::http::StatusCode; +use axum::response::{IntoResponse, Response}; +use axum_extra::headers::authorization::Bearer; +use axum_extra::headers::Authorization; +use axum_extra::TypedHeader; +use chrono::{DateTime, Utc}; +use once_cell::sync::Lazy; +use sha2::{Digest, Sha256}; +use sqlx::FromRow; +use std::collections::HashMap; +use std::sync::RwLock; +use tower_sessions::Session; +use uuid::Uuid; + +use crate::state::AppState; + +const CACHE_TTL_SECS: i64 = 60; + +struct CachedToken { + user: AuthUser, + cached_at: DateTime, +} + +static TOKEN_CACHE: Lazy>> = + Lazy::new(|| RwLock::new(HashMap::new())); + +#[derive(Debug, Clone)] +pub struct AuthUser { + pub name: String, + pub scopes: Vec, + pub groups: Vec, +} + +impl AuthUser { + pub fn has_scope(&self, scope: &str) -> bool { + self.scopes.iter().any(|s| s == "*" || s == scope) + } + + pub fn can_write(&self) -> bool { + self.has_scope("write") || self.has_scope("admin") || self.has_scope("*") + } + + #[allow(dead_code)] + pub fn can_read(&self) -> bool { + self.has_scope("read") || self.can_write() + } + + pub fn is_admin(&self) -> bool { + self.has_scope("admin") + || self.has_scope("*") + || self.groups.iter().any(|g| g == "g-sn-herbapi-admin") + } +} + +#[derive(Debug, FromRow)] +struct ApiTokenRow { + name: String, + scopes: Vec, +} + +fn hash_token(token: &str) -> String { + let mut hasher = Sha256::new(); + hasher.update(token.as_bytes()); + hex::encode(hasher.finalize()) +} + +#[derive(Debug)] +pub enum AuthError { + MissingAuth, + InvalidToken, + InvalidSession, +} + +impl IntoResponse for AuthError { + fn into_response(self) -> Response { + let (status, message) = match self { + AuthError::MissingAuth => (StatusCode::UNAUTHORIZED, "Authentication required"), + AuthError::InvalidToken => (StatusCode::UNAUTHORIZED, "Invalid authorization token"), + AuthError::InvalidSession => { + (StatusCode::UNAUTHORIZED, "Invalid or expired session") + } + }; + (status, message).into_response() + } +} + +impl FromRequestParts for AuthUser { + type Rejection = AuthError; + + async fn from_request_parts( + parts: &mut Parts, + state: &AppState, + ) -> Result { + // Try Bearer token first + if let Ok(TypedHeader(Authorization(bearer))) = + TypedHeader::>::from_request_parts(parts, state).await + { + let token = bearer.token(); + + // Check admin token + if let Some(ref admin) = state.config.admin_token + && token == admin + { + return Ok(AuthUser { + name: "admin".into(), + scopes: vec!["*".into()], + groups: vec![], + }); + } + + // Check cache + let token_hash = hash_token(token); + { + let cache = TOKEN_CACHE.read().unwrap(); + if let Some(cached) = cache.get(&token_hash) + && (Utc::now() - cached.cached_at).num_seconds() < CACHE_TTL_SECS + { + return Ok(cached.user.clone()); + } + } + + // Look up in DB + let row = sqlx::query_as::<_, ApiTokenRow>( + "SELECT name, scopes FROM api_tokens WHERE token_hash = $1", + ) + .bind(&token_hash) + .fetch_optional(&state.pool) + .await + .map_err(|e| { + tracing::error!("Token lookup failed: {e}"); + AuthError::InvalidToken + })? + .ok_or(AuthError::InvalidToken)?; + + // Update last_used_at (fire and forget) + let pool = state.pool.clone(); + let hash = token_hash.clone(); + tokio::spawn(async move { + let _ = + sqlx::query("UPDATE api_tokens SET last_used_at = NOW() WHERE token_hash = $1") + .bind(&hash) + .execute(&pool) + .await; + }); + + let user = AuthUser { + name: row.name, + scopes: row.scopes, + groups: vec![], + }; + + // Cache it + { + let mut cache = TOKEN_CACHE.write().unwrap(); + cache.insert( + token_hash, + CachedToken { + user: user.clone(), + cached_at: Utc::now(), + }, + ); + } + + return Ok(user); + } + + // Try session cookie (for web UI via OIDC) + let session = Session::from_request_parts(parts, state) + .await + .map_err(|_| AuthError::MissingAuth)?; + + let user_id_str: Option = session + .get("user_id") + .await + .map_err(|_| AuthError::InvalidSession)?; + + if let Some(user_id_str) = user_id_str { + let user_id: Uuid = user_id_str.parse().map_err(|_| AuthError::InvalidSession)?; + + let email: Option = session + .get("user_email") + .await + .map_err(|_| AuthError::InvalidSession)?; + let name: Option = session + .get("user_name") + .await + .map_err(|_| AuthError::InvalidSession)?; + let nickname: Option = session + .get("user_nickname") + .await + .map_err(|_| AuthError::InvalidSession)?; + let admin: Option = session + .get("user_admin") + .await + .map_err(|_| AuthError::InvalidSession)?; + let groups: Option> = session + .get("user_groups") + .await + .map_err(|_| AuthError::InvalidSession)?; + + let (email, name, nickname, admin) = if email.is_some() { + (email, name, nickname, admin.unwrap_or(false)) + } else { + let user = crate::db::users::find_user_by_id(&state.pool, user_id) + .await + .map_err(|_| AuthError::InvalidSession)? + .ok_or(AuthError::InvalidSession)?; + ( + Some(user.email), + user.name, + user.nickname, + user.admin, + ) + }; + + let display_name = nickname + .or(name) + .or(email) + .unwrap_or_else(|| "user".to_string()); + + let scopes = if admin { + vec!["*".to_string()] + } else { + vec!["read".to_string()] + }; + + return Ok(AuthUser { + name: display_name, + scopes, + groups: groups.unwrap_or_default(), + }); + } + + Err(AuthError::MissingAuth) + } +} diff --git a/herbapi-api/src/auth/mod.rs b/herbapi-api/src/auth/mod.rs new file mode 100644 index 0000000..01f4099 --- /dev/null +++ b/herbapi-api/src/auth/mod.rs @@ -0,0 +1,4 @@ +pub mod extractor; +pub mod oidc; + +pub use extractor::AuthUser; diff --git a/herbapi-api/src/auth/oidc.rs b/herbapi-api/src/auth/oidc.rs new file mode 100644 index 0000000..9f3e12d --- /dev/null +++ b/herbapi-api/src/auth/oidc.rs @@ -0,0 +1,255 @@ +use axum::extract::{Query, State}; +use axum::response::{IntoResponse, Redirect}; +use serde::Deserialize; +use std::collections::BTreeSet; +use tower_sessions::Session; + +use crate::error::{AppError, Result}; +use crate::state::AppState; + +#[derive(Debug, Deserialize)] +pub struct CallbackQuery { + pub code: String, + pub state: String, +} + +pub async fn login(State(state): State, session: Session) -> Result { + if !state.config.oidc_enabled() { + return Err(AppError::BadRequest("OIDC not configured".into())); + } + + let client_id = state.config.oidc_client_id.as_ref().unwrap(); + let issuer = &state.config.oidc_issuer; + let redirect_uri = &state.config.oidc_redirect_uri; + + let oauth_state = generate_random_string(); + let nonce = generate_random_string(); + + session + .insert("oauth_state", &oauth_state) + .await + .map_err(|e| AppError::Internal(e.to_string()))?; + session + .insert("oauth_nonce", &nonce) + .await + .map_err(|e| AppError::Internal(e.to_string()))?; + + let base_url = authentik_base_url(issuer); + + let auth_url = format!( + "{}authorize/?response_type=code&client_id={}&redirect_uri={}&scope=openid+email+profile&state={}&nonce={}", + base_url, + urlencoding(client_id), + urlencoding(redirect_uri), + oauth_state, + nonce, + ); + + Ok(Redirect::temporary(&auth_url)) +} + +pub async fn callback( + State(state): State, + session: Session, + Query(query): Query, +) -> Result { + if !state.config.oidc_enabled() { + return Err(AppError::BadRequest("OIDC not configured".into())); + } + + let saved_state: Option = session + .get("oauth_state") + .await + .map_err(|e| AppError::Internal(e.to_string()))?; + if saved_state.as_deref() != Some(&query.state) { + return Err(AppError::BadRequest("Invalid OAuth state".into())); + } + + let client_id = state.config.oidc_client_id.as_ref().unwrap(); + let client_secret = state.config.oidc_client_secret.as_ref().unwrap(); + let issuer = &state.config.oidc_issuer; + let redirect_uri = &state.config.oidc_redirect_uri; + + let base_url = authentik_base_url(issuer); + + let token_url = format!("{}token/", base_url); + let client = reqwest::Client::new(); + let resp = client + .post(&token_url) + .form(&[ + ("grant_type", "authorization_code"), + ("code", &query.code), + ("redirect_uri", redirect_uri), + ("client_id", client_id), + ("client_secret", client_secret), + ]) + .send() + .await + .map_err(|e| AppError::Internal(format!("Token exchange failed: {e}")))?; + + let token_data: serde_json::Value = resp + .json() + .await + .map_err(|e| AppError::Internal(format!("Token parse failed: {e}")))?; + + let access_token = token_data + .get("access_token") + .and_then(|v| v.as_str()) + .ok_or_else(|| AppError::Internal("No access_token in response".into()))?; + + let userinfo_url = format!("{}userinfo/", base_url); + let userinfo: serde_json::Value = client + .get(&userinfo_url) + .bearer_auth(access_token) + .send() + .await + .map_err(|e| AppError::Internal(format!("Userinfo failed: {e}")))? + .json() + .await + .map_err(|e| AppError::Internal(format!("Userinfo parse failed: {e}")))?; + + let email = userinfo + .get("email") + .and_then(|v| v.as_str()) + .ok_or_else(|| AppError::Internal("No email in userinfo".into()))?; + let name = userinfo.get("name").and_then(|v| v.as_str()); + let nickname = userinfo + .get("nickname") + .and_then(|v| v.as_str()) + .or_else(|| userinfo.get("preferred_username").and_then(|v| v.as_str())); + let sub = userinfo + .get("sub") + .and_then(|v| v.as_str()) + .ok_or_else(|| AppError::Internal("No sub in userinfo".into()))?; + + let groups_claim = userinfo.get("groups"); + let groups: Vec = groups_claim + .and_then(|v| v.as_array()) + .map(|arr| { + let mut set = BTreeSet::new(); + for g in arr.iter().filter_map(|v| v.as_str()) { + set.insert(g.to_string()); + } + set.into_iter().collect() + }) + .unwrap_or_default(); + if groups_claim.is_none() { + tracing::warn!("OIDC userinfo missing 'groups' claim; HerbAPI admin access requires Authentik groups mapping"); + } + + let user = crate::db::users::upsert_oidc_user(&state.pool, email, name, nickname, sub).await?; + + session + .insert("user_id", user.id.to_string()) + .await + .map_err(|e| AppError::Internal(e.to_string()))?; + session + .insert("user_email", email.to_string()) + .await + .map_err(|e| AppError::Internal(e.to_string()))?; + session + .insert("user_name", name.map(|s| s.to_string())) + .await + .map_err(|e| AppError::Internal(e.to_string()))?; + session + .insert("user_nickname", nickname.map(|s| s.to_string())) + .await + .map_err(|e| AppError::Internal(e.to_string()))?; + let is_admin = user.admin || groups.iter().any(|g| g == "g-sn-herbapi-admin"); + session + .insert("user_admin", is_admin) + .await + .map_err(|e| AppError::Internal(e.to_string()))?; + session + .insert("user_groups", groups) + .await + .map_err(|e| AppError::Internal(e.to_string()))?; + + session + .remove::("oauth_state") + .await + .map_err(|e| AppError::Internal(e.to_string()))?; + session + .remove::("oauth_nonce") + .await + .map_err(|e| AppError::Internal(e.to_string()))?; + + Ok(Redirect::temporary("/")) +} + +pub async fn logout(session: Session) -> impl IntoResponse { + let _ = session.delete().await; + Redirect::temporary("/") +} + +#[derive(Debug, serde::Serialize)] +pub struct MeResponse { + pub id: uuid::Uuid, + pub email: String, + pub name: Option, + pub nickname: Option, + pub admin: bool, +} + +pub async fn me(State(state): State, session: Session) -> impl IntoResponse { + async fn inner( + state: &AppState, + session: Session, + ) -> std::result::Result { + let user_id_str: Option = session + .get("user_id") + .await + .map_err(|_| axum::http::StatusCode::INTERNAL_SERVER_ERROR)?; + + let user_id_str = user_id_str.ok_or(axum::http::StatusCode::UNAUTHORIZED)?; + + let user_id: uuid::Uuid = user_id_str + .parse() + .map_err(|_| axum::http::StatusCode::UNAUTHORIZED)?; + + let user = crate::db::users::find_user_by_id(&state.pool, user_id) + .await + .map_err(|_| axum::http::StatusCode::INTERNAL_SERVER_ERROR)? + .ok_or(axum::http::StatusCode::UNAUTHORIZED)?; + + let session_admin: Option = session + .get("user_admin") + .await + .map_err(|_| axum::http::StatusCode::INTERNAL_SERVER_ERROR)?; + + Ok(MeResponse { + id: user.id, + email: user.email, + name: user.name, + nickname: user.nickname, + admin: session_admin.unwrap_or(user.admin), + }) + } + + match inner(&state, session).await { + Ok(response) => axum::Json(response).into_response(), + Err(status) => status.into_response(), + } +} + +fn authentik_base_url(issuer: &str) -> String { + issuer + .trim_end_matches('/') + .rsplit_once('/') + .map(|(base, _)| format!("{}/", base)) + .unwrap_or_else(|| issuer.to_string()) +} + +fn generate_random_string() -> String { + use rand::Rng; + let bytes: [u8; 16] = rand::thread_rng().r#gen(); + hex::encode(bytes) +} + +fn urlencoding(s: &str) -> String { + s.replace(':', "%3A") + .replace('/', "%2F") + .replace('?', "%3F") + .replace('&', "%26") + .replace('=', "%3D") +} diff --git a/herbapi-api/src/config.rs b/herbapi-api/src/config.rs new file mode 100644 index 0000000..67f604e --- /dev/null +++ b/herbapi-api/src/config.rs @@ -0,0 +1,62 @@ +use std::env; + +use anyhow::{Context as _, Result}; + +#[derive(Debug, Clone)] +pub struct Config { + pub port: u16, + pub database_url: String, + pub admin_token: Option, + pub tls_cert_path: Option, + pub tls_key_path: Option, + // OIDC (Authentik SSO) + pub oidc_client_id: Option, + pub oidc_client_secret: Option, + pub oidc_issuer: String, + pub oidc_redirect_uri: String, + // S3 (Garage) + pub s3_endpoint: String, + pub s3_region: String, + pub s3_access_key: String, + pub s3_secret_key: String, + pub s3_bucket: String, +} + +impl Config { + pub fn from_env() -> Result { + Ok(Self { + port: env::var("PORT") + .unwrap_or_else(|_| "8080".into()) + .parse() + .context("PORT must be a valid u16")?, + database_url: env::var("DATABASE_URL").context("DATABASE_URL is required")?, + admin_token: env::var("ADMIN_TOKEN").ok().filter(|s| !s.is_empty()), + tls_cert_path: env::var("TLS_CERT_PATH").ok().filter(|s| !s.is_empty()), + tls_key_path: env::var("TLS_KEY_PATH").ok().filter(|s| !s.is_empty()), + oidc_client_id: env::var("OIDC_CLIENT_ID").ok().filter(|s| !s.is_empty()), + oidc_client_secret: env::var("OIDC_CLIENT_SECRET") + .ok() + .filter(|s| !s.is_empty()), + oidc_issuer: env::var("OIDC_ISSUER").unwrap_or_else(|_| { + "https://auth.sub-net.at/application/o/herbapi/".into() + }), + oidc_redirect_uri: env::var("OIDC_REDIRECT_URI").unwrap_or_else(|_| { + "https://herbapi.naturalised.at/auth/oidc/callback".into() + }), + s3_endpoint: env::var("S3_ENDPOINT") + .unwrap_or_else(|_| "https://s3.sub-net.at".into()), + s3_region: env::var("S3_REGION").unwrap_or_else(|_| "garage".into()), + s3_access_key: env::var("S3_ACCESS_KEY").unwrap_or_default(), + s3_secret_key: env::var("S3_SECRET_KEY").unwrap_or_default(), + s3_bucket: env::var("S3_BUCKET").unwrap_or_else(|_| "herbapi".into()), + }) + } + + pub fn tls_enabled(&self) -> bool { + self.tls_cert_path.is_some() && self.tls_key_path.is_some() + } + + pub fn oidc_enabled(&self) -> bool { + self.oidc_client_id.is_some() && self.oidc_client_secret.is_some() + } +} diff --git a/herbapi-api/src/db/companions.rs b/herbapi-api/src/db/companions.rs new file mode 100644 index 0000000..7a89b29 --- /dev/null +++ b/herbapi-api/src/db/companions.rs @@ -0,0 +1,46 @@ +use sqlx::PgPool; +use uuid::Uuid; + +use crate::error::{AppError, Result}; +use super::models::{CompanionRelationship, CreateCompanion}; + +pub async fn list_for_species(pool: &PgPool, species_id: Uuid) -> Result> { + sqlx::query_as::<_, CompanionRelationship>( + "SELECT * FROM companion_relationships + WHERE species_a_id = $1 OR species_b_id = $1 + ORDER BY relationship, created_at" + ) + .bind(species_id) + .fetch_all(pool) + .await + .map_err(Into::into) +} + +pub async fn create(pool: &PgPool, req: &CreateCompanion) -> Result { + let id = Uuid::now_v7(); + // Enforce ordering: species_a_id < species_b_id + let (a, b) = if req.species_a_id < req.species_b_id { + (req.species_a_id, req.species_b_id) + } else { + (req.species_b_id, req.species_a_id) + }; + + sqlx::query_as::<_, CompanionRelationship>( + "INSERT INTO companion_relationships (id, species_a_id, species_b_id, relationship, mechanism, source_url) + VALUES ($1, $2, $3, $4::companion_type, $5, $6) RETURNING *" + ) + .bind(id).bind(a).bind(b).bind(&req.relationship) + .bind(&req.mechanism).bind(&req.source_url) + .fetch_one(pool) + .await + .map_err(Into::into) +} + +pub async fn delete(pool: &PgPool, id: Uuid) -> Result<()> { + let result = sqlx::query("DELETE FROM companion_relationships WHERE id = $1") + .bind(id).execute(pool).await?; + if result.rows_affected() == 0 { + return Err(AppError::NotFound(format!("Relationship not found: {id}"))); + } + Ok(()) +} diff --git a/herbapi-api/src/db/cultivars.rs b/herbapi-api/src/db/cultivars.rs new file mode 100644 index 0000000..be36441 --- /dev/null +++ b/herbapi-api/src/db/cultivars.rs @@ -0,0 +1,235 @@ +use sqlx::PgPool; +use uuid::Uuid; + +use crate::error::{AppError, Result}; +use super::models::{CreateCultivar, Cultivar, PaginatedResponse}; + +#[derive(Debug, serde::Deserialize)] +pub struct CultivarListParams { + pub page: Option, + pub per_page: Option, + pub search: Option, + pub species: Option, +} + +impl CultivarListParams { + pub fn limit(&self) -> i64 { self.per_page.unwrap_or(25).min(100) } + pub fn offset(&self) -> i64 { (self.page.unwrap_or(1) - 1).max(0) * self.limit() } +} + +pub async fn list(pool: &PgPool, params: &CultivarListParams) -> Result> { + let limit = params.limit(); + let offset = params.offset(); + + let (rows, total) = match (¶ms.species, ¶ms.search) { + (Some(species_slug), Some(search)) => { + let tsquery = search.split_whitespace().collect::>().join(" & "); + let rows = sqlx::query_as::<_, Cultivar>( + "SELECT c.* FROM cultivars c JOIN species s ON c.species_id = s.id + WHERE s.slug = $1 + AND to_tsvector('english', coalesce(c.name,'') || ' ' || coalesce(c.name_en,'') || ' ' || coalesce(c.name_de,'') || ' ' || coalesce(c.name_scientific,'') || ' ' || coalesce(c.description,'')) + @@ to_tsquery('english', $2) + ORDER BY c.name LIMIT $3 OFFSET $4" + ) + .bind(species_slug).bind(&tsquery).bind(limit).bind(offset) + .fetch_all(pool).await?; + + let (count,): (i64,) = sqlx::query_as( + "SELECT COUNT(*) FROM cultivars c JOIN species s ON c.species_id = s.id + WHERE s.slug = $1 + AND to_tsvector('english', coalesce(c.name,'') || ' ' || coalesce(c.name_en,'') || ' ' || coalesce(c.name_de,'') || ' ' || coalesce(c.name_scientific,'') || ' ' || coalesce(c.description,'')) + @@ to_tsquery('english', $2)" + ) + .bind(species_slug).bind(&tsquery) + .fetch_one(pool).await?; + (rows, count) + } + (Some(species_slug), None) => { + let rows = sqlx::query_as::<_, Cultivar>( + "SELECT c.* FROM cultivars c JOIN species s ON c.species_id = s.id + WHERE s.slug = $1 ORDER BY c.name LIMIT $2 OFFSET $3" + ) + .bind(species_slug).bind(limit).bind(offset) + .fetch_all(pool).await?; + + let (count,): (i64,) = sqlx::query_as( + "SELECT COUNT(*) FROM cultivars c JOIN species s ON c.species_id = s.id WHERE s.slug = $1" + ) + .bind(species_slug).fetch_one(pool).await?; + (rows, count) + } + (None, Some(search)) => { + let tsquery = search.split_whitespace().collect::>().join(" & "); + let rows = sqlx::query_as::<_, Cultivar>( + "SELECT * FROM cultivars + WHERE to_tsvector('english', coalesce(name,'') || ' ' || coalesce(name_en,'') || ' ' || coalesce(name_de,'') || ' ' || coalesce(name_scientific,'') || ' ' || coalesce(description,'')) + @@ to_tsquery('english', $1) + ORDER BY name LIMIT $2 OFFSET $3" + ) + .bind(&tsquery).bind(limit).bind(offset) + .fetch_all(pool).await?; + + let (count,): (i64,) = sqlx::query_as( + "SELECT COUNT(*) FROM cultivars + WHERE to_tsvector('english', coalesce(name,'') || ' ' || coalesce(name_en,'') || ' ' || coalesce(name_de,'') || ' ' || coalesce(name_scientific,'') || ' ' || coalesce(description,'')) + @@ to_tsquery('english', $1)" + ) + .bind(&tsquery).fetch_one(pool).await?; + (rows, count) + } + (None, None) => { + let rows = sqlx::query_as::<_, Cultivar>( + "SELECT * FROM cultivars ORDER BY name LIMIT $1 OFFSET $2" + ) + .bind(limit).bind(offset) + .fetch_all(pool).await?; + + let (count,): (i64,) = sqlx::query_as("SELECT COUNT(*) FROM cultivars") + .fetch_one(pool).await?; + (rows, count) + } + }; + + Ok(PaginatedResponse { + data: rows, + total, + page: params.page.unwrap_or(1), + per_page: limit, + }) +} + +pub async fn get_by_slug(pool: &PgPool, slug: &str) -> Result { + sqlx::query_as::<_, Cultivar>("SELECT * FROM cultivars WHERE slug = $1") + .bind(slug) + .fetch_optional(pool) + .await? + .ok_or_else(|| AppError::NotFound(format!("Cultivar not found: {slug}"))) +} + +pub async fn create(pool: &PgPool, req: &CreateCultivar) -> Result { + let id = Uuid::now_v7(); + // Get species slug for cultivar slug prefix + let species_slug: (String,) = sqlx::query_as("SELECT slug FROM species WHERE id = $1") + .bind(req.species_id) + .fetch_optional(pool) + .await? + .ok_or_else(|| AppError::BadRequest("Species not found".into()))?; + let slug = format!("{}-{}", species_slug.0, slug::slugify(&req.name)); + + sqlx::query_as::<_, Cultivar>( + "INSERT INTO cultivars (id, slug, species_id, name, name_en, name_de, name_scientific, + description, is_organic, perennial, growing_time_days, planting_depth_cm, row_spacing_cm, + plant_spacing_cm, days_to_germination, germination_temp_c, light_requirement, + stratification_required, stratification_days, scarification_required, + seed_viability_years, storage_temp_c, storage_humidity, storage_notes, + min_temp, max_temp, humidity, light, frost_tolerance, + min_light_hours_day, optimal_light_hours_day, greenhouse_min_temp_c, + indoor_season_extension_weeks, ventilation_requirement, heating_required, + indoor_sowing_months, direct_sowing_months, transplanting_months, glasshouse_months, + harvesting_months, succession_planting_days, planting_notes, + propagation_methods, cutting_season, rootstock_species_id, + years_to_first_harvest, productive_lifespan_years, + expected_yield_kg_per_m2, yield_unit, expected_yield_value, + harvest_window_days, storage_method, shelf_life_days, cold_storage_days, + pollination_group, self_fertile, rootstock_compatibility, + wikidata_qid, gbif_id, pfaf_url, source_urls) + VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20, + $21,$22,$23,$24,$25,$26,$27,$28,$29::frost_tolerance,$30,$31,$32,$33,$34,$35, + $36,$37,$38,$39,$40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$50,$51,$52,$53,$54, + $55,$56,$57,$58,$59,$60,$61) + RETURNING *" + ) + .bind(id).bind(&slug).bind(req.species_id).bind(&req.name) + .bind(&req.name_en).bind(&req.name_de).bind(&req.name_scientific) + .bind(&req.description).bind(req.is_organic.unwrap_or(false)).bind(req.perennial.unwrap_or(false)) + .bind(req.growing_time_days).bind(req.planting_depth_cm).bind(req.row_spacing_cm) + .bind(req.plant_spacing_cm).bind(req.days_to_germination).bind(req.germination_temp_c) + .bind(&req.light_requirement).bind(req.stratification_required).bind(req.stratification_days) + .bind(req.scarification_required).bind(req.seed_viability_years).bind(req.storage_temp_c) + .bind(&req.storage_humidity).bind(&req.storage_notes) + .bind(req.min_temp).bind(req.max_temp).bind(&req.humidity).bind(&req.light) + .bind(&req.frost_tolerance) + .bind(req.min_light_hours_day).bind(req.optimal_light_hours_day).bind(req.greenhouse_min_temp_c) + .bind(req.indoor_season_extension_weeks).bind(&req.ventilation_requirement).bind(req.heating_required) + .bind(&req.indoor_sowing_months).bind(&req.direct_sowing_months) + .bind(&req.transplanting_months).bind(&req.glasshouse_months) + .bind(&req.harvesting_months).bind(req.succession_planting_days).bind(&req.planting_notes) + .bind(&req.propagation_methods).bind(&req.cutting_season).bind(req.rootstock_species_id) + .bind(req.years_to_first_harvest).bind(req.productive_lifespan_years) + .bind(req.expected_yield_kg_per_m2).bind(&req.yield_unit).bind(req.expected_yield_value) + .bind(req.harvest_window_days).bind(&req.storage_method) + .bind(req.shelf_life_days).bind(req.cold_storage_days) + .bind(&req.pollination_group).bind(req.self_fertile).bind(&req.rootstock_compatibility) + .bind(&req.wikidata_qid).bind(&req.gbif_id).bind(&req.pfaf_url).bind(&req.source_urls) + .fetch_one(pool) + .await + .map_err(Into::into) +} + +pub async fn update(pool: &PgPool, id: Uuid, req: &CreateCultivar) -> Result { + let _existing = sqlx::query("SELECT id FROM cultivars WHERE id = $1") + .bind(id).fetch_optional(pool).await? + .ok_or_else(|| AppError::NotFound(format!("Cultivar not found: {id}")))?; + + let species_slug: (String,) = sqlx::query_as("SELECT slug FROM species WHERE id = $1") + .bind(req.species_id) + .fetch_optional(pool) + .await? + .ok_or_else(|| AppError::BadRequest("Species not found".into()))?; + let slug = format!("{}-{}", species_slug.0, slug::slugify(&req.name)); + + sqlx::query_as::<_, Cultivar>( + "UPDATE cultivars SET slug=$2, species_id=$3, name=$4, name_en=$5, name_de=$6, + name_scientific=$7, description=$8, is_organic=$9, perennial=$10, + growing_time_days=$11, planting_depth_cm=$12, row_spacing_cm=$13, plant_spacing_cm=$14, + days_to_germination=$15, germination_temp_c=$16, light_requirement=$17, + stratification_required=$18, stratification_days=$19, scarification_required=$20, + seed_viability_years=$21, storage_temp_c=$22, storage_humidity=$23, storage_notes=$24, + min_temp=$25, max_temp=$26, humidity=$27, light=$28, frost_tolerance=$29::frost_tolerance, + min_light_hours_day=$30, optimal_light_hours_day=$31, greenhouse_min_temp_c=$32, + indoor_season_extension_weeks=$33, ventilation_requirement=$34, heating_required=$35, + indoor_sowing_months=$36, direct_sowing_months=$37, transplanting_months=$38, + glasshouse_months=$39, harvesting_months=$40, succession_planting_days=$41, + planting_notes=$42, propagation_methods=$43, cutting_season=$44, + rootstock_species_id=$45, years_to_first_harvest=$46, productive_lifespan_years=$47, + expected_yield_kg_per_m2=$48, yield_unit=$49, expected_yield_value=$50, + harvest_window_days=$51, storage_method=$52, shelf_life_days=$53, cold_storage_days=$54, + pollination_group=$55, self_fertile=$56, rootstock_compatibility=$57, + wikidata_qid=$58, gbif_id=$59, pfaf_url=$60, source_urls=$61, updated_at=NOW() + WHERE id=$1 RETURNING *" + ) + .bind(id).bind(&slug).bind(req.species_id).bind(&req.name) + .bind(&req.name_en).bind(&req.name_de).bind(&req.name_scientific) + .bind(&req.description).bind(req.is_organic.unwrap_or(false)).bind(req.perennial.unwrap_or(false)) + .bind(req.growing_time_days).bind(req.planting_depth_cm).bind(req.row_spacing_cm) + .bind(req.plant_spacing_cm).bind(req.days_to_germination).bind(req.germination_temp_c) + .bind(&req.light_requirement).bind(req.stratification_required).bind(req.stratification_days) + .bind(req.scarification_required).bind(req.seed_viability_years).bind(req.storage_temp_c) + .bind(&req.storage_humidity).bind(&req.storage_notes) + .bind(req.min_temp).bind(req.max_temp).bind(&req.humidity).bind(&req.light) + .bind(&req.frost_tolerance) + .bind(req.min_light_hours_day).bind(req.optimal_light_hours_day).bind(req.greenhouse_min_temp_c) + .bind(req.indoor_season_extension_weeks).bind(&req.ventilation_requirement).bind(req.heating_required) + .bind(&req.indoor_sowing_months).bind(&req.direct_sowing_months) + .bind(&req.transplanting_months).bind(&req.glasshouse_months) + .bind(&req.harvesting_months).bind(req.succession_planting_days).bind(&req.planting_notes) + .bind(&req.propagation_methods).bind(&req.cutting_season).bind(req.rootstock_species_id) + .bind(req.years_to_first_harvest).bind(req.productive_lifespan_years) + .bind(req.expected_yield_kg_per_m2).bind(&req.yield_unit).bind(req.expected_yield_value) + .bind(req.harvest_window_days).bind(&req.storage_method) + .bind(req.shelf_life_days).bind(req.cold_storage_days) + .bind(&req.pollination_group).bind(req.self_fertile).bind(&req.rootstock_compatibility) + .bind(&req.wikidata_qid).bind(&req.gbif_id).bind(&req.pfaf_url).bind(&req.source_urls) + .fetch_one(pool) + .await + .map_err(Into::into) +} + +pub async fn delete(pool: &PgPool, id: Uuid) -> Result<()> { + let result = sqlx::query("DELETE FROM cultivars WHERE id = $1") + .bind(id).execute(pool).await?; + if result.rows_affected() == 0 { + return Err(AppError::NotFound(format!("Cultivar not found: {id}"))); + } + Ok(()) +} diff --git a/herbapi-api/src/db/families.rs b/herbapi-api/src/db/families.rs new file mode 100644 index 0000000..bfefa5c --- /dev/null +++ b/herbapi-api/src/db/families.rs @@ -0,0 +1,126 @@ +use sqlx::PgPool; +use uuid::Uuid; + +use crate::error::{AppError, Result}; +use super::models::{CreateFamily, Family, PaginatedResponse, PaginationParams, UpdateFamily}; + +pub async fn list(pool: &PgPool, params: &PaginationParams) -> Result> { + let limit = params.limit(); + let offset = params.offset(); + + let (rows, total) = if let Some(ref search) = params.search { + let tsquery = search.split_whitespace().collect::>().join(" & "); + let rows = sqlx::query_as::<_, Family>( + "SELECT * FROM families + WHERE to_tsvector('english', coalesce(name_scientific,'') || ' ' || coalesce(name_en,'') || ' ' || coalesce(name_de,'')) + @@ to_tsquery('english', $1) + ORDER BY name_scientific LIMIT $2 OFFSET $3" + ) + .bind(&tsquery) + .bind(limit) + .bind(offset) + .fetch_all(pool) + .await?; + + let (count,): (i64,) = sqlx::query_as( + "SELECT COUNT(*) FROM families + WHERE to_tsvector('english', coalesce(name_scientific,'') || ' ' || coalesce(name_en,'') || ' ' || coalesce(name_de,'')) + @@ to_tsquery('english', $1)" + ) + .bind(&tsquery) + .fetch_one(pool) + .await?; + + (rows, count) + } else { + let rows = sqlx::query_as::<_, Family>( + "SELECT * FROM families ORDER BY name_scientific LIMIT $1 OFFSET $2" + ) + .bind(limit) + .bind(offset) + .fetch_all(pool) + .await?; + + let (count,): (i64,) = sqlx::query_as("SELECT COUNT(*) FROM families") + .fetch_one(pool) + .await?; + + (rows, count) + }; + + Ok(PaginatedResponse { + data: rows, + total, + page: params.page.unwrap_or(1), + per_page: limit, + }) +} + +pub async fn get_by_slug(pool: &PgPool, slug: &str) -> Result { + sqlx::query_as::<_, Family>("SELECT * FROM families WHERE slug = $1") + .bind(slug) + .fetch_optional(pool) + .await? + .ok_or_else(|| AppError::NotFound(format!("Family not found: {slug}"))) +} + +pub async fn create(pool: &PgPool, req: &CreateFamily) -> Result { + let id = Uuid::now_v7(); + let slug = slug::slugify(&req.name_scientific); + + sqlx::query_as::<_, Family>( + "INSERT INTO families (id, slug, name_scientific, name_en, name_de, description) + VALUES ($1, $2, $3, $4, $5, $6) RETURNING *" + ) + .bind(id) + .bind(&slug) + .bind(&req.name_scientific) + .bind(&req.name_en) + .bind(&req.name_de) + .bind(&req.description) + .fetch_one(pool) + .await + .map_err(Into::into) +} + +pub async fn update(pool: &PgPool, id: Uuid, req: &UpdateFamily) -> Result { + let existing = sqlx::query_as::<_, Family>("SELECT * FROM families WHERE id = $1") + .bind(id) + .fetch_optional(pool) + .await? + .ok_or_else(|| AppError::NotFound(format!("Family not found: {id}")))?; + + let name_sci = req.name_scientific.as_deref().unwrap_or(&existing.name_scientific); + let new_slug = if req.name_scientific.is_some() { + slug::slugify(name_sci) + } else { + existing.slug.clone() + }; + + sqlx::query_as::<_, Family>( + "UPDATE families SET slug = $2, name_scientific = $3, + name_en = COALESCE($4, name_en), name_de = COALESCE($5, name_de), + description = COALESCE($6, description), updated_at = NOW() + WHERE id = $1 RETURNING *" + ) + .bind(id) + .bind(&new_slug) + .bind(name_sci) + .bind(&req.name_en) + .bind(&req.name_de) + .bind(&req.description) + .fetch_one(pool) + .await + .map_err(Into::into) +} + +pub async fn delete(pool: &PgPool, id: Uuid) -> Result<()> { + let result = sqlx::query("DELETE FROM families WHERE id = $1") + .bind(id) + .execute(pool) + .await?; + if result.rows_affected() == 0 { + return Err(AppError::NotFound(format!("Family not found: {id}"))); + } + Ok(()) +} diff --git a/herbapi-api/src/db/images.rs b/herbapi-api/src/db/images.rs new file mode 100644 index 0000000..5a0d968 --- /dev/null +++ b/herbapi-api/src/db/images.rs @@ -0,0 +1,45 @@ +use sqlx::PgPool; +use uuid::Uuid; + +use crate::error::{AppError, Result}; +use super::models::Image; + +pub async fn list_for_entity(pool: &PgPool, entity_type: &str, entity_id: Uuid) -> Result> { + sqlx::query_as::<_, Image>( + "SELECT * FROM images WHERE entity_type = $1 AND entity_id = $2 ORDER BY is_primary DESC, created_at" + ) + .bind(entity_type).bind(entity_id) + .fetch_all(pool) + .await + .map_err(Into::into) +} + +pub async fn create( + pool: &PgPool, + entity_type: &str, + entity_id: Uuid, + s3_key: &str, + caption: Option<&str>, + source_url: Option<&str>, + license: Option<&str>, + is_primary: bool, +) -> Result { + let id = Uuid::now_v7(); + sqlx::query_as::<_, Image>( + "INSERT INTO images (id, entity_type, entity_id, s3_key, caption, source_url, license, is_primary) + VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING *" + ) + .bind(id).bind(entity_type).bind(entity_id).bind(s3_key) + .bind(caption).bind(source_url).bind(license).bind(is_primary) + .fetch_one(pool) + .await + .map_err(Into::into) +} + +pub async fn delete(pool: &PgPool, id: Uuid) -> Result { + sqlx::query_as::<_, Image>("DELETE FROM images WHERE id = $1 RETURNING *") + .bind(id) + .fetch_optional(pool) + .await? + .ok_or_else(|| AppError::NotFound(format!("Image not found: {id}"))) +} diff --git a/herbapi-api/src/db/mod.rs b/herbapi-api/src/db/mod.rs new file mode 100644 index 0000000..9caf8c2 --- /dev/null +++ b/herbapi-api/src/db/mod.rs @@ -0,0 +1,9 @@ +pub mod companions; +pub mod cultivars; +pub mod families; +pub mod images; +pub mod models; +pub mod s3; +pub mod species; +pub mod suppliers; +pub mod users; diff --git a/herbapi-api/src/db/models.rs b/herbapi-api/src/db/models.rs new file mode 100644 index 0000000..55c6bd6 --- /dev/null +++ b/herbapi-api/src/db/models.rs @@ -0,0 +1,427 @@ +use chrono::{DateTime, Utc}; +use serde::{Deserialize, Serialize}; +use sqlx::FromRow; +use uuid::Uuid; + +// --- Pagination --- + +#[derive(Debug, Deserialize)] +pub struct PaginationParams { + pub page: Option, + pub per_page: Option, + pub search: Option, +} + +impl PaginationParams { + pub fn limit(&self) -> i64 { + self.per_page.unwrap_or(25).min(100) + } + + pub fn offset(&self) -> i64 { + (self.page.unwrap_or(1) - 1).max(0) * self.limit() + } +} + +#[derive(Debug, Serialize)] +pub struct PaginatedResponse { + pub data: Vec, + pub total: i64, + pub page: i64, + pub per_page: i64, +} + +// --- Families --- + +#[derive(Debug, FromRow, Serialize)] +pub struct Family { + pub id: Uuid, + pub slug: String, + pub name_scientific: String, + pub name_en: Option, + pub name_de: Option, + pub description: Option, + pub created_at: DateTime, + pub updated_at: DateTime, +} + +#[derive(Debug, Deserialize)] +pub struct CreateFamily { + pub name_scientific: String, + pub name_en: Option, + pub name_de: Option, + pub description: Option, +} + +#[derive(Debug, Deserialize)] +pub struct UpdateFamily { + pub name_scientific: Option, + pub name_en: Option, + pub name_de: Option, + pub description: Option, +} + +// --- Species --- + +#[derive(Debug, FromRow, Serialize)] +pub struct Species { + pub id: Uuid, + pub slug: String, + pub family_id: Uuid, + pub name_scientific: String, + pub name_en: Option, + pub name_de: Option, + pub description: Option, + pub soil_moisture: Option, + pub drainage_requirement: Option, + pub organic_matter_pct: Option, + pub nitrogen_ppm: Option, + pub phosphorus_ppm: Option, + pub potassium_ppm: Option, + pub boron_ppm: Option, + pub calcium_ppm: Option, + pub copper_ppm: Option, + pub iron_ppm: Option, + pub magnesium_ppm: Option, + pub manganese_ppm: Option, + pub molybdenum_ppm: Option, + pub sulfur_ppm: Option, + pub zinc_ppm: Option, + pub ph_min: Option, + pub ph_max: Option, + pub soil_texture_preference: Option>, + pub hardiness_zone_usda: Option, + pub hardiness_zone_at: Option, + pub min_temp: Option, + pub max_temp: Option, + pub drought_tolerance: Option, + pub water_requirement_mm_week: Option, + pub waterlogging_tolerance: Option, + pub salt_tolerance: Option, + pub edibility_rating: Option, + pub food_uses: Option, + pub medicinal_uses: Option, + pub other_uses: Option, + pub native_range: Option, + pub invasiveness: Option, + pub pollination_type: Option, + pub plant_layer: Option, + pub nitrogen_fixer: Option, + pub dynamic_accumulator: Option, + pub dynamic_accumulator_nutrients: Option>, + pub attracts_pollinators: Option, + pub attracts_beneficial_insects: Option, + pub wildlife_value: Option, + pub mulch_plant: Option, + pub ground_cover_quality: Option, + pub allelopathic: Option, + pub guild_role: Option>, + pub succession_stage: Option, + pub heavy_metal_tolerance: Option, + pub wikidata_qid: Option, + pub gbif_id: Option, + pub eppo_code: Option, + pub pfaf_url: Option, + pub primary_image_key: Option, + pub source_urls: Option>, + pub created_at: DateTime, + pub updated_at: DateTime, +} + +#[derive(Debug, Deserialize)] +pub struct CreateSpecies { + pub family_id: Uuid, + pub name_scientific: String, + pub name_en: Option, + pub name_de: Option, + pub description: Option, + pub soil_moisture: Option, + pub drainage_requirement: Option, + pub ph_min: Option, + pub ph_max: Option, + pub soil_texture_preference: Option>, + pub hardiness_zone_usda: Option, + pub hardiness_zone_at: Option, + pub min_temp: Option, + pub max_temp: Option, + pub drought_tolerance: Option, + pub salt_tolerance: Option, + pub edibility_rating: Option, + pub food_uses: Option, + pub medicinal_uses: Option, + pub other_uses: Option, + pub native_range: Option, + pub invasiveness: Option, + pub pollination_type: Option, + pub plant_layer: Option, + pub nitrogen_fixer: Option, + pub dynamic_accumulator: Option, + pub dynamic_accumulator_nutrients: Option>, + pub attracts_pollinators: Option, + pub attracts_beneficial_insects: Option, + pub wildlife_value: Option, + pub mulch_plant: Option, + pub ground_cover_quality: Option, + pub allelopathic: Option, + pub guild_role: Option>, + pub succession_stage: Option, + pub heavy_metal_tolerance: Option, + pub wikidata_qid: Option, + pub gbif_id: Option, + pub eppo_code: Option, + pub pfaf_url: Option, + pub source_urls: Option>, +} + +pub type UpdateSpecies = CreateSpecies; + +// --- Cultivars --- + +#[derive(Debug, FromRow, Serialize)] +pub struct Cultivar { + pub id: Uuid, + pub slug: String, + pub species_id: Uuid, + pub name: String, + pub name_en: Option, + pub name_de: Option, + pub name_scientific: Option, + pub description: Option, + pub is_organic: bool, + pub perennial: bool, + pub growing_time_days: Option, + pub planting_depth_cm: Option, + pub row_spacing_cm: Option, + pub plant_spacing_cm: Option, + pub days_to_germination: Option, + pub germination_temp_c: Option, + pub light_requirement: Option, + pub stratification_required: Option, + pub stratification_days: Option, + pub scarification_required: Option, + pub seed_viability_years: Option, + pub storage_temp_c: Option, + pub storage_humidity: Option, + pub storage_notes: Option, + pub min_temp: Option, + pub max_temp: Option, + pub humidity: Option, + pub light: Option, + pub frost_tolerance: Option, + pub min_light_hours_day: Option, + pub optimal_light_hours_day: Option, + pub greenhouse_min_temp_c: Option, + pub indoor_season_extension_weeks: Option, + pub ventilation_requirement: Option, + pub heating_required: Option, + pub indoor_sowing_months: Option>, + pub direct_sowing_months: Option>, + pub transplanting_months: Option>, + pub glasshouse_months: Option>, + pub harvesting_months: Option>, + pub succession_planting_days: Option, + pub planting_notes: Option, + pub propagation_methods: Option>, + pub cutting_season: Option, + pub rootstock_species_id: Option, + pub years_to_first_harvest: Option, + pub productive_lifespan_years: Option, + pub expected_yield_kg_per_m2: Option, + pub yield_unit: Option, + pub expected_yield_value: Option, + pub harvest_window_days: Option, + pub storage_method: Option>, + pub shelf_life_days: Option, + pub cold_storage_days: Option, + pub pollination_group: Option, + pub self_fertile: Option, + pub rootstock_compatibility: Option, + pub wikidata_qid: Option, + pub gbif_id: Option, + pub pfaf_url: Option, + pub primary_image_key: Option, + pub source_urls: Option>, + pub created_at: DateTime, + pub updated_at: DateTime, +} + +#[derive(Debug, Deserialize)] +pub struct CreateCultivar { + pub species_id: Uuid, + pub name: String, + pub name_en: Option, + pub name_de: Option, + pub name_scientific: Option, + pub description: Option, + pub is_organic: Option, + pub perennial: Option, + pub growing_time_days: Option, + pub planting_depth_cm: Option, + pub row_spacing_cm: Option, + pub plant_spacing_cm: Option, + pub days_to_germination: Option, + pub germination_temp_c: Option, + pub light_requirement: Option, + pub stratification_required: Option, + pub stratification_days: Option, + pub scarification_required: Option, + pub seed_viability_years: Option, + pub storage_temp_c: Option, + pub storage_humidity: Option, + pub storage_notes: Option, + pub min_temp: Option, + pub max_temp: Option, + pub humidity: Option, + pub light: Option, + pub frost_tolerance: Option, + pub min_light_hours_day: Option, + pub optimal_light_hours_day: Option, + pub greenhouse_min_temp_c: Option, + pub indoor_season_extension_weeks: Option, + pub ventilation_requirement: Option, + pub heating_required: Option, + pub indoor_sowing_months: Option>, + pub direct_sowing_months: Option>, + pub transplanting_months: Option>, + pub glasshouse_months: Option>, + pub harvesting_months: Option>, + pub succession_planting_days: Option, + pub planting_notes: Option, + pub propagation_methods: Option>, + pub cutting_season: Option, + pub rootstock_species_id: Option, + pub years_to_first_harvest: Option, + pub productive_lifespan_years: Option, + pub expected_yield_kg_per_m2: Option, + pub yield_unit: Option, + pub expected_yield_value: Option, + pub harvest_window_days: Option, + pub storage_method: Option>, + pub shelf_life_days: Option, + pub cold_storage_days: Option, + pub pollination_group: Option, + pub self_fertile: Option, + pub rootstock_compatibility: Option, + pub wikidata_qid: Option, + pub gbif_id: Option, + pub pfaf_url: Option, + pub source_urls: Option>, +} + +pub type UpdateCultivar = CreateCultivar; + +// --- Suppliers --- + +#[derive(Debug, FromRow, Serialize)] +pub struct Supplier { + pub id: Uuid, + pub slug: String, + pub name: String, + pub url: Option, + pub is_organic: bool, + pub is_demeter: bool, + pub country: Option, + pub notes: Option, + pub created_at: DateTime, + pub updated_at: DateTime, +} + +#[derive(Debug, Deserialize)] +pub struct CreateSupplier { + pub name: String, + pub url: Option, + pub is_organic: Option, + pub is_demeter: Option, + pub country: Option, + pub notes: Option, +} + +pub type UpdateSupplier = CreateSupplier; + +#[derive(Debug, FromRow, Serialize)] +pub struct CultivarSupplier { + pub id: Uuid, + pub cultivar_id: Uuid, + pub supplier_id: Uuid, + pub article_number: Option, + pub product_url: Option, + pub price_eur: Option, + pub pack_size: Option, + pub pack_unit: Option, + pub last_checked_at: Option>, + pub created_at: DateTime, +} + +#[derive(Debug, Deserialize)] +pub struct CreateCultivarSupplier { + pub supplier_id: Uuid, + pub article_number: Option, + pub product_url: Option, + pub price_eur: Option, + pub pack_size: Option, + pub pack_unit: Option, +} + +// --- Companion Relationships --- + +#[derive(Debug, FromRow, Serialize)] +pub struct CompanionRelationship { + pub id: Uuid, + pub species_a_id: Uuid, + pub species_b_id: Uuid, + pub relationship: String, + pub mechanism: Option, + pub source_url: Option, + pub created_at: DateTime, +} + +#[derive(Debug, Deserialize)] +pub struct CreateCompanion { + pub species_a_id: Uuid, + pub species_b_id: Uuid, + pub relationship: String, + pub mechanism: Option, + pub source_url: Option, +} + +// --- Images --- + +#[derive(Debug, FromRow, Serialize)] +pub struct Image { + pub id: Uuid, + pub entity_type: String, + pub entity_id: Uuid, + pub s3_key: String, + pub caption: Option, + pub source_url: Option, + pub license: Option, + pub is_primary: bool, + pub created_at: DateTime, +} + +// --- Users --- + +#[derive(Debug, FromRow, Serialize)] +pub struct User { + pub id: Uuid, + pub email: String, + pub name: Option, + pub nickname: Option, + pub avatar_url: Option, + pub provider: String, + pub provider_id: Option, + pub admin: bool, + pub inserted_at: DateTime, + pub updated_at: DateTime, +} + +// --- Search --- + +#[derive(Debug, Serialize)] +pub struct SearchResult { + pub entity_type: String, + pub id: Uuid, + pub slug: String, + pub name: String, + pub description: Option, + pub rank: f32, +} diff --git a/herbapi-api/src/db/s3.rs b/herbapi-api/src/db/s3.rs new file mode 100644 index 0000000..3b86607 --- /dev/null +++ b/herbapi-api/src/db/s3.rs @@ -0,0 +1,75 @@ +use aws_sdk_s3::primitives::ByteStream; +use aws_sdk_s3::Client as S3Client; + +use crate::config::Config; +use crate::error::{AppError, Result}; + +pub fn build_client(config: &Config) -> S3Client { + let creds = aws_credential_types::Credentials::new( + &config.s3_access_key, + &config.s3_secret_key, + None, + None, + "herbapi-static", + ); + + let s3_config = aws_sdk_s3::config::Builder::new() + .endpoint_url(&config.s3_endpoint) + .region(aws_sdk_s3::config::Region::new(config.s3_region.clone())) + .credentials_provider(creds) + .force_path_style(true) + .behavior_version_latest() + .build(); + + S3Client::from_conf(s3_config) +} + +pub async fn upload( + client: &S3Client, + bucket: &str, + key: &str, + data: Vec, + content_type: &str, +) -> Result<()> { + client + .put_object() + .bucket(bucket) + .key(key) + .body(ByteStream::from(data)) + .content_type(content_type) + .send() + .await + .map_err(|e| AppError::S3(format!("Upload failed for {key}: {e}")))?; + Ok(()) +} + +pub async fn download(client: &S3Client, bucket: &str, key: &str) -> Result> { + let resp = client + .get_object() + .bucket(bucket) + .key(key) + .send() + .await + .map_err(|e| AppError::S3(format!("Download failed for {key}: {e}")))?; + + let bytes = resp + .body + .collect() + .await + .map_err(|e| AppError::S3(format!("Stream read failed for {key}: {e}")))? + .into_bytes() + .to_vec(); + + Ok(bytes) +} + +pub async fn delete(client: &S3Client, bucket: &str, key: &str) -> Result<()> { + client + .delete_object() + .bucket(bucket) + .key(key) + .send() + .await + .map_err(|e| AppError::S3(format!("Delete failed for {key}: {e}")))?; + Ok(()) +} diff --git a/herbapi-api/src/db/species.rs b/herbapi-api/src/db/species.rs new file mode 100644 index 0000000..0ea269b --- /dev/null +++ b/herbapi-api/src/db/species.rs @@ -0,0 +1,203 @@ +use sqlx::PgPool; +use uuid::Uuid; + +use crate::error::{AppError, Result}; +use super::models::{CreateSpecies, PaginatedResponse, Species}; + +#[derive(Debug, serde::Deserialize)] +pub struct SpeciesListParams { + pub page: Option, + pub per_page: Option, + pub search: Option, + pub family: Option, +} + +impl SpeciesListParams { + pub fn limit(&self) -> i64 { self.per_page.unwrap_or(25).min(100) } + pub fn offset(&self) -> i64 { (self.page.unwrap_or(1) - 1).max(0) * self.limit() } +} + +pub async fn list(pool: &PgPool, params: &SpeciesListParams) -> Result> { + let limit = params.limit(); + let offset = params.offset(); + + let (rows, total) = match (¶ms.family, ¶ms.search) { + (Some(family_slug), Some(search)) => { + let tsquery = search.split_whitespace().collect::>().join(" & "); + let rows = sqlx::query_as::<_, Species>( + "SELECT s.* FROM species s JOIN families f ON s.family_id = f.id + WHERE f.slug = $1 + AND to_tsvector('english', coalesce(s.name_scientific,'') || ' ' || coalesce(s.name_en,'') || ' ' || coalesce(s.name_de,'') || ' ' || coalesce(s.description,'')) + @@ to_tsquery('english', $2) + ORDER BY s.name_scientific LIMIT $3 OFFSET $4" + ) + .bind(family_slug).bind(&tsquery).bind(limit).bind(offset) + .fetch_all(pool).await?; + + let (count,): (i64,) = sqlx::query_as( + "SELECT COUNT(*) FROM species s JOIN families f ON s.family_id = f.id + WHERE f.slug = $1 + AND to_tsvector('english', coalesce(s.name_scientific,'') || ' ' || coalesce(s.name_en,'') || ' ' || coalesce(s.name_de,'') || ' ' || coalesce(s.description,'')) + @@ to_tsquery('english', $2)" + ) + .bind(family_slug).bind(&tsquery) + .fetch_one(pool).await?; + (rows, count) + } + (Some(family_slug), None) => { + let rows = sqlx::query_as::<_, Species>( + "SELECT s.* FROM species s JOIN families f ON s.family_id = f.id + WHERE f.slug = $1 ORDER BY s.name_scientific LIMIT $2 OFFSET $3" + ) + .bind(family_slug).bind(limit).bind(offset) + .fetch_all(pool).await?; + + let (count,): (i64,) = sqlx::query_as( + "SELECT COUNT(*) FROM species s JOIN families f ON s.family_id = f.id WHERE f.slug = $1" + ) + .bind(family_slug).fetch_one(pool).await?; + (rows, count) + } + (None, Some(search)) => { + let tsquery = search.split_whitespace().collect::>().join(" & "); + let rows = sqlx::query_as::<_, Species>( + "SELECT * FROM species + WHERE to_tsvector('english', coalesce(name_scientific,'') || ' ' || coalesce(name_en,'') || ' ' || coalesce(name_de,'') || ' ' || coalesce(description,'')) + @@ to_tsquery('english', $1) + ORDER BY name_scientific LIMIT $2 OFFSET $3" + ) + .bind(&tsquery).bind(limit).bind(offset) + .fetch_all(pool).await?; + + let (count,): (i64,) = sqlx::query_as( + "SELECT COUNT(*) FROM species + WHERE to_tsvector('english', coalesce(name_scientific,'') || ' ' || coalesce(name_en,'') || ' ' || coalesce(name_de,'') || ' ' || coalesce(description,'')) + @@ to_tsquery('english', $1)" + ) + .bind(&tsquery).fetch_one(pool).await?; + (rows, count) + } + (None, None) => { + let rows = sqlx::query_as::<_, Species>( + "SELECT * FROM species ORDER BY name_scientific LIMIT $1 OFFSET $2" + ) + .bind(limit).bind(offset) + .fetch_all(pool).await?; + + let (count,): (i64,) = sqlx::query_as("SELECT COUNT(*) FROM species") + .fetch_one(pool).await?; + (rows, count) + } + }; + + Ok(PaginatedResponse { + data: rows, + total, + page: params.page.unwrap_or(1), + per_page: limit, + }) +} + +pub async fn get_by_slug(pool: &PgPool, slug: &str) -> Result { + sqlx::query_as::<_, Species>("SELECT * FROM species WHERE slug = $1") + .bind(slug) + .fetch_optional(pool) + .await? + .ok_or_else(|| AppError::NotFound(format!("Species not found: {slug}"))) +} + +pub async fn create(pool: &PgPool, req: &CreateSpecies) -> Result { + let id = Uuid::now_v7(); + let slug = slug::slugify(&req.name_scientific); + + sqlx::query_as::<_, Species>( + "INSERT INTO species (id, slug, family_id, name_scientific, name_en, name_de, description, + soil_moisture, drainage_requirement, ph_min, ph_max, soil_texture_preference, + hardiness_zone_usda, hardiness_zone_at, min_temp, max_temp, + drought_tolerance, salt_tolerance, edibility_rating, + food_uses, medicinal_uses, other_uses, native_range, invasiveness, pollination_type, + plant_layer, nitrogen_fixer, dynamic_accumulator, dynamic_accumulator_nutrients, + attracts_pollinators, attracts_beneficial_insects, wildlife_value, mulch_plant, + ground_cover_quality, allelopathic, guild_role, succession_stage, heavy_metal_tolerance, + wikidata_qid, gbif_id, eppo_code, pfaf_url, source_urls) + VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16, + $17::drought_tolerance,$18::salt_tolerance,$19,$20,$21,$22,$23, + $24::invasiveness_level,$25,$26::plant_layer,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36, + $37::succession_stage,$38,$39,$40,$41,$42,$43) + RETURNING *" + ) + .bind(id).bind(&slug).bind(req.family_id).bind(&req.name_scientific) + .bind(&req.name_en).bind(&req.name_de).bind(&req.description) + .bind(&req.soil_moisture).bind(&req.drainage_requirement) + .bind(req.ph_min).bind(req.ph_max).bind(&req.soil_texture_preference) + .bind(&req.hardiness_zone_usda).bind(&req.hardiness_zone_at) + .bind(req.min_temp).bind(req.max_temp) + .bind(&req.drought_tolerance).bind(&req.salt_tolerance).bind(req.edibility_rating) + .bind(&req.food_uses).bind(&req.medicinal_uses).bind(&req.other_uses) + .bind(&req.native_range).bind(&req.invasiveness).bind(&req.pollination_type) + .bind(&req.plant_layer).bind(req.nitrogen_fixer).bind(req.dynamic_accumulator) + .bind(&req.dynamic_accumulator_nutrients) + .bind(req.attracts_pollinators).bind(req.attracts_beneficial_insects) + .bind(&req.wildlife_value).bind(req.mulch_plant) + .bind(&req.ground_cover_quality).bind(req.allelopathic).bind(&req.guild_role) + .bind(&req.succession_stage).bind(req.heavy_metal_tolerance) + .bind(&req.wikidata_qid).bind(&req.gbif_id).bind(&req.eppo_code).bind(&req.pfaf_url) + .bind(&req.source_urls) + .fetch_one(pool) + .await + .map_err(Into::into) +} + +pub async fn update(pool: &PgPool, id: Uuid, req: &CreateSpecies) -> Result { + let _existing = sqlx::query("SELECT id FROM species WHERE id = $1") + .bind(id).fetch_optional(pool).await? + .ok_or_else(|| AppError::NotFound(format!("Species not found: {id}")))?; + + let slug = slug::slugify(&req.name_scientific); + + sqlx::query_as::<_, Species>( + "UPDATE species SET slug=$2, family_id=$3, name_scientific=$4, name_en=$5, name_de=$6, + description=$7, soil_moisture=$8, drainage_requirement=$9, ph_min=$10, ph_max=$11, + soil_texture_preference=$12, hardiness_zone_usda=$13, hardiness_zone_at=$14, + min_temp=$15, max_temp=$16, + drought_tolerance=$17::drought_tolerance, salt_tolerance=$18::salt_tolerance, + edibility_rating=$19, food_uses=$20, medicinal_uses=$21, other_uses=$22, + native_range=$23, invasiveness=$24::invasiveness_level, pollination_type=$25, + plant_layer=$26::plant_layer, nitrogen_fixer=$27, dynamic_accumulator=$28, + dynamic_accumulator_nutrients=$29, attracts_pollinators=$30, attracts_beneficial_insects=$31, + wildlife_value=$32, mulch_plant=$33, ground_cover_quality=$34, allelopathic=$35, + guild_role=$36, succession_stage=$37::succession_stage, heavy_metal_tolerance=$38, + wikidata_qid=$39, gbif_id=$40, eppo_code=$41, pfaf_url=$42, source_urls=$43, + updated_at=NOW() + WHERE id=$1 RETURNING *" + ) + .bind(id).bind(&slug).bind(req.family_id).bind(&req.name_scientific) + .bind(&req.name_en).bind(&req.name_de).bind(&req.description) + .bind(&req.soil_moisture).bind(&req.drainage_requirement) + .bind(req.ph_min).bind(req.ph_max).bind(&req.soil_texture_preference) + .bind(&req.hardiness_zone_usda).bind(&req.hardiness_zone_at) + .bind(req.min_temp).bind(req.max_temp) + .bind(&req.drought_tolerance).bind(&req.salt_tolerance).bind(req.edibility_rating) + .bind(&req.food_uses).bind(&req.medicinal_uses).bind(&req.other_uses) + .bind(&req.native_range).bind(&req.invasiveness).bind(&req.pollination_type) + .bind(&req.plant_layer).bind(req.nitrogen_fixer).bind(req.dynamic_accumulator) + .bind(&req.dynamic_accumulator_nutrients) + .bind(req.attracts_pollinators).bind(req.attracts_beneficial_insects) + .bind(&req.wildlife_value).bind(req.mulch_plant) + .bind(&req.ground_cover_quality).bind(req.allelopathic).bind(&req.guild_role) + .bind(&req.succession_stage).bind(req.heavy_metal_tolerance) + .bind(&req.wikidata_qid).bind(&req.gbif_id).bind(&req.eppo_code).bind(&req.pfaf_url) + .bind(&req.source_urls) + .fetch_one(pool) + .await + .map_err(Into::into) +} + +pub async fn delete(pool: &PgPool, id: Uuid) -> Result<()> { + let result = sqlx::query("DELETE FROM species WHERE id = $1") + .bind(id).execute(pool).await?; + if result.rows_affected() == 0 { + return Err(AppError::NotFound(format!("Species not found: {id}"))); + } + Ok(()) +} diff --git a/herbapi-api/src/db/suppliers.rs b/herbapi-api/src/db/suppliers.rs new file mode 100644 index 0000000..31ebdd4 --- /dev/null +++ b/herbapi-api/src/db/suppliers.rs @@ -0,0 +1,102 @@ +use sqlx::PgPool; +use uuid::Uuid; + +use crate::error::{AppError, Result}; +use super::models::{CreateCultivarSupplier, CreateSupplier, CultivarSupplier, Supplier}; + +pub async fn list(pool: &PgPool) -> Result> { + sqlx::query_as::<_, Supplier>("SELECT * FROM suppliers ORDER BY name") + .fetch_all(pool) + .await + .map_err(Into::into) +} + +pub async fn get_by_slug(pool: &PgPool, slug: &str) -> Result { + sqlx::query_as::<_, Supplier>("SELECT * FROM suppliers WHERE slug = $1") + .bind(slug) + .fetch_optional(pool) + .await? + .ok_or_else(|| AppError::NotFound(format!("Supplier not found: {slug}"))) +} + +pub async fn create(pool: &PgPool, req: &CreateSupplier) -> Result { + let id = Uuid::now_v7(); + let s = slug::slugify(&req.name); + + sqlx::query_as::<_, Supplier>( + "INSERT INTO suppliers (id, slug, name, url, is_organic, is_demeter, country, notes) + VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING *" + ) + .bind(id).bind(&s).bind(&req.name).bind(&req.url) + .bind(req.is_organic.unwrap_or(false)).bind(req.is_demeter.unwrap_or(false)) + .bind(&req.country).bind(&req.notes) + .fetch_one(pool) + .await + .map_err(Into::into) +} + +pub async fn update(pool: &PgPool, id: Uuid, req: &CreateSupplier) -> Result { + let s = slug::slugify(&req.name); + sqlx::query_as::<_, Supplier>( + "UPDATE suppliers SET slug=$2, name=$3, url=$4, is_organic=$5, is_demeter=$6, + country=$7, notes=$8, updated_at=NOW() WHERE id=$1 RETURNING *" + ) + .bind(id).bind(&s).bind(&req.name).bind(&req.url) + .bind(req.is_organic.unwrap_or(false)).bind(req.is_demeter.unwrap_or(false)) + .bind(&req.country).bind(&req.notes) + .fetch_one(pool) + .await + .map_err(|e| match e { + sqlx::Error::RowNotFound => AppError::NotFound(format!("Supplier not found: {id}")), + other => AppError::Database(other), + }) +} + +pub async fn delete(pool: &PgPool, id: Uuid) -> Result<()> { + let result = sqlx::query("DELETE FROM suppliers WHERE id = $1") + .bind(id).execute(pool).await?; + if result.rows_affected() == 0 { + return Err(AppError::NotFound(format!("Supplier not found: {id}"))); + } + Ok(()) +} + +// Cultivar-Supplier links + +pub async fn list_for_cultivar(pool: &PgPool, cultivar_id: Uuid) -> Result> { + sqlx::query_as::<_, CultivarSupplier>( + "SELECT * FROM cultivar_suppliers WHERE cultivar_id = $1 ORDER BY created_at" + ) + .bind(cultivar_id) + .fetch_all(pool) + .await + .map_err(Into::into) +} + +pub async fn link_cultivar(pool: &PgPool, cultivar_id: Uuid, req: &CreateCultivarSupplier) -> Result { + let id = Uuid::now_v7(); + sqlx::query_as::<_, CultivarSupplier>( + "INSERT INTO cultivar_suppliers (id, cultivar_id, supplier_id, article_number, product_url, + price_eur, pack_size, pack_unit) + VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING *" + ) + .bind(id).bind(cultivar_id).bind(req.supplier_id) + .bind(&req.article_number).bind(&req.product_url) + .bind(req.price_eur).bind(req.pack_size).bind(&req.pack_unit) + .fetch_one(pool) + .await + .map_err(Into::into) +} + +pub async fn unlink_cultivar(pool: &PgPool, cultivar_id: Uuid, supplier_id: Uuid) -> Result<()> { + let result = sqlx::query( + "DELETE FROM cultivar_suppliers WHERE cultivar_id = $1 AND supplier_id = $2" + ) + .bind(cultivar_id).bind(supplier_id) + .execute(pool) + .await?; + if result.rows_affected() == 0 { + return Err(AppError::NotFound("Link not found".into())); + } + Ok(()) +} diff --git a/herbapi-api/src/db/users.rs b/herbapi-api/src/db/users.rs new file mode 100644 index 0000000..447c57e --- /dev/null +++ b/herbapi-api/src/db/users.rs @@ -0,0 +1,33 @@ +use sqlx::PgPool; +use uuid::Uuid; + +use crate::error::Result; +use super::models::User; + +pub async fn upsert_oidc_user( + pool: &PgPool, + email: &str, + name: Option<&str>, + nickname: Option<&str>, + provider_id: &str, +) -> Result { + sqlx::query_as::<_, User>( + "INSERT INTO users (email, name, nickname, provider, provider_id) + VALUES ($1, $2, $3, 'authentik', $4) + ON CONFLICT (provider, provider_id) + DO UPDATE SET email = $1, name = $2, nickname = $3, updated_at = NOW() + RETURNING *" + ) + .bind(email).bind(name).bind(nickname).bind(provider_id) + .fetch_one(pool) + .await + .map_err(Into::into) +} + +pub async fn find_user_by_id(pool: &PgPool, id: Uuid) -> Result> { + sqlx::query_as::<_, User>("SELECT * FROM users WHERE id = $1") + .bind(id) + .fetch_optional(pool) + .await + .map_err(Into::into) +} diff --git a/herbapi-api/src/error.rs b/herbapi-api/src/error.rs new file mode 100644 index 0000000..db99994 --- /dev/null +++ b/herbapi-api/src/error.rs @@ -0,0 +1,62 @@ +use axum::http::StatusCode; +use axum::response::{IntoResponse, Response}; +use serde_json::json; + +pub type Result = std::result::Result; + +#[derive(Debug, thiserror::Error)] +pub enum AppError { + #[error("Not found: {0}")] + NotFound(String), + + #[error("Unauthorized: {0}")] + #[allow(dead_code)] + Unauthorized(String), + + #[error("Bad request: {0}")] + BadRequest(String), + + #[error("Forbidden")] + Forbidden, + + #[error("Database error: {0}")] + Database(#[from] sqlx::Error), + + #[error("S3 error: {0}")] + S3(String), + + #[error("Internal error: {0}")] + Internal(String), +} + +impl IntoResponse for AppError { + fn into_response(self) -> Response { + let (status, message) = match &self { + AppError::NotFound(msg) => (StatusCode::NOT_FOUND, msg.clone()), + AppError::Unauthorized(msg) => (StatusCode::UNAUTHORIZED, msg.clone()), + AppError::BadRequest(msg) => (StatusCode::BAD_REQUEST, msg.clone()), + AppError::Forbidden => (StatusCode::FORBIDDEN, "Forbidden".to_string()), + AppError::Database(e) => { + tracing::error!("Database error: {e}"); + ( + StatusCode::INTERNAL_SERVER_ERROR, + "Database error".to_string(), + ) + } + AppError::S3(msg) => { + tracing::error!("S3 error: {msg}"); + (StatusCode::INTERNAL_SERVER_ERROR, "Storage error".to_string()) + } + AppError::Internal(msg) => { + tracing::error!("Internal error: {msg}"); + ( + StatusCode::INTERNAL_SERVER_ERROR, + "Internal error".to_string(), + ) + } + }; + + let body = axum::Json(json!({ "error": message })); + (status, body).into_response() + } +} diff --git a/herbapi-api/src/main.rs b/herbapi-api/src/main.rs new file mode 100644 index 0000000..c7054aa --- /dev/null +++ b/herbapi-api/src/main.rs @@ -0,0 +1,101 @@ +mod api; +mod auth; +mod config; +mod db; +mod error; +mod state; + +use std::net::SocketAddr; +use std::sync::Arc; + +use sqlx::postgres::PgPoolOptions; +use tower_http::cors::CorsLayer; +use tower_sessions::cookie::time::Duration; +use tower_sessions::{Expiry, MemoryStore, SessionManagerLayer}; +use tracing_subscriber::EnvFilter; + +use crate::config::Config; +use crate::state::AppState; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + rustls::crypto::aws_lc_rs::default_provider() + .install_default() + .expect("Failed to install rustls crypto provider"); + + tracing_subscriber::fmt() + .with_env_filter(EnvFilter::try_from_default_env().unwrap_or_else(|_| { + EnvFilter::new("herbapi_api=info,sqlx=warn,tower_http=info") + })) + .init(); + + let config = Config::from_env()?; + tracing::info!("HerbAPI starting on port {}", config.port); + + let pool = PgPoolOptions::new() + .max_connections(10) + .connect(&config.database_url) + .await?; + + tracing::info!("Running migrations..."); + sqlx::migrate!("./migrations").run(&pool).await?; + tracing::info!("Migrations complete"); + + let s3 = db::s3::build_client(&config); + + let state = AppState { + pool, + config: Arc::new(config.clone()), + s3, + }; + + // Session layer for OIDC + let session_store = MemoryStore::default(); + let session_layer = SessionManagerLayer::new(session_store) + .with_expiry(Expiry::OnInactivity(Duration::hours(24))) + .with_same_site(tower_sessions::cookie::SameSite::Lax) + .with_secure(config.tls_enabled()); + + if config.oidc_enabled() { + tracing::info!("OIDC enabled (issuer: {})", config.oidc_issuer); + } + + let app = api::router(state.clone()) + .layer(session_layer) + .layer(CorsLayer::permissive()); + + let addr = SocketAddr::from(([0, 0, 0, 0, 0, 0, 0, 0], config.port)); + + if config.tls_enabled() { + let cert_path = config.tls_cert_path.as_ref().unwrap(); + let key_path = config.tls_key_path.as_ref().unwrap(); + + tracing::info!("TLS enabled, loading certificates from {} and {}", cert_path, key_path); + + let rustls_config = load_rustls_config(cert_path, key_path)?; + tracing::info!("Listening on {} (TLS)", addr); + + axum_server::bind_rustls(addr, rustls_config) + .serve(app.into_make_service()) + .await?; + } else { + tracing::info!("Listening on {} (plain HTTP)", addr); + let listener = tokio::net::TcpListener::bind(addr).await?; + axum::serve(listener, app).await?; + } + + Ok(()) +} + +fn load_rustls_config( + cert_path: &str, + key_path: &str, +) -> anyhow::Result { + use axum_server::tls_rustls::RustlsConfig; + + let config = RustlsConfig::from_pem_file(cert_path, key_path); + let config = + tokio::task::block_in_place(|| tokio::runtime::Handle::current().block_on(config))?; + + Ok(config) +} diff --git a/herbapi-api/src/state.rs b/herbapi-api/src/state.rs new file mode 100644 index 0000000..e47c2bf --- /dev/null +++ b/herbapi-api/src/state.rs @@ -0,0 +1,13 @@ +use std::sync::Arc; + +use aws_sdk_s3::Client as S3Client; +use sqlx::PgPool; + +use crate::config::Config; + +#[derive(Clone)] +pub struct AppState { + pub pool: PgPool, + pub config: Arc, + pub s3: S3Client, +} diff --git a/herbapi-ui/Cargo.lock b/herbapi-ui/Cargo.lock new file mode 100644 index 0000000..3a36e93 --- /dev/null +++ b/herbapi-ui/Cargo.lock @@ -0,0 +1,3814 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "aho-corasick" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" +dependencies = [ + "memchr", +] + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anyhow" +version = "1.0.102" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" + +[[package]] +name = "async-stream" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" +dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "async-trait" +version = "0.1.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "async-tungstenite" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee88b4c88ac8c9ea446ad43498955750a4bbe64c4392f21ccfe5d952865e318f" +dependencies = [ + "atomic-waker", + "futures-core", + "futures-io", + "futures-task", + "futures-util", + "log", + "pin-project-lite", + "tungstenite", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "autocfg" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" + +[[package]] +name = "axum" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b52af3cb4058c895d37317bb27508dccc8e5f2d39454016b297bf4a400597b8" +dependencies = [ + "axum-core", + "bytes", + "form_urlencoded", + "futures-util", + "http", + "http-body", + "http-body-util", + "itoa", + "matchit", + "memchr", + "mime", + "multer", + "percent-encoding", + "pin-project-lite", + "serde_core", + "serde_json", + "serde_path_to_error", + "serde_urlencoded", + "sync_wrapper", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum-core" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08c78f31d7b1291f7ee735c1c6780ccde7785daae9a9206026862dab7d8792d1" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "http-body-util", + "mime", + "pin-project-lite", + "sync_wrapper", + "tower-layer", + "tower-service", +] + +[[package]] +name = "base16" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d27c3610c36aee21ce8ac510e6224498de4228ad772a171ed65643a24693a5a8" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bitflags" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af" + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bumpalo" +version = "3.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" +dependencies = [ + "serde", +] + +[[package]] +name = "cc" +version = "1.2.56" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aebf35691d1bfb0ac386a69bac2fde4dd276fb618cf8bf4f5318fe285e821bb2" +dependencies = [ + "find-msvc-tools", + "shlex", +] + +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + +[[package]] +name = "cfb" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d38f2da7a0a2c4ccf0065be06397cc26a81f4e528be095826eee9d4adbb8c60f" +dependencies = [ + "byteorder", + "fnv", + "uuid", +] + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + +[[package]] +name = "charset" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1f927b07c74ba84c7e5fe4db2baeb3e996ab2688992e39ac68ce3220a677c7e" +dependencies = [ + "base64", + "encoding_rs", +] + +[[package]] +name = "chrono" +version = "0.4.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0" +dependencies = [ + "iana-time-zone", + "js-sys", + "num-traits", + "serde", + "wasm-bindgen", + "windows-link", +] + +[[package]] +name = "ciborium" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" +dependencies = [ + "ciborium-io", + "ciborium-ll", + "serde", +] + +[[package]] +name = "ciborium-io" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" + +[[package]] +name = "ciborium-ll" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" +dependencies = [ + "ciborium-io", + "half", +] + +[[package]] +name = "combine" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "console_error_panic_hook" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" +dependencies = [ + "cfg-if", + "wasm-bindgen", +] + +[[package]] +name = "const-serialize" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad7154afa56de2f290e3c82c2c6dc4f5b282b6870903f56ef3509aba95866edc" +dependencies = [ + "const-serialize-macro 0.7.2", +] + +[[package]] +name = "const-serialize" +version = "0.8.0-alpha.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e42cd5aabba86f128b3763da1fec1491c0f728ce99245062cd49b6f9e6d235b" +dependencies = [ + "const-serialize 0.7.2", + "const-serialize-macro 0.8.0-alpha.0", + "serde", +] + +[[package]] +name = "const-serialize-macro" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f160aad86b4343e8d4e261fee9965c3005b2fd6bc117d172ab65948779e4acf" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "const-serialize-macro" +version = "0.8.0-alpha.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42571ed01eb46d2e1adcf99c8ca576f081e46f2623d13500eba70d1d99a4c439" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "const-str" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0664d2867b4a32697dfe655557f5c3b187e9b605b38612a748e5ec99811d160" + +[[package]] +name = "const_format" +version = "0.2.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7faa7469a93a566e9ccc1c73fe783b4a65c274c5ace346038dca9c39fe0030ad" +dependencies = [ + "const_format_proc_macros", +] + +[[package]] +name = "const_format_proc_macros" +version = "0.2.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d57c2eccfb16dbac1f4e61e206105db5820c9d26c3c472bc17c774259ef7744" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] +name = "content_disposition" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc14a88e1463ddd193906285abe5c360c7e8564e05ccc5d501755f7fbc9ca9c" +dependencies = [ + "charset", +] + +[[package]] +name = "convert_case" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baaaa0ecca5b51987b9423ccdc971514dd8b0bb7b4060b983d3664dad3f1f89f" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "convert_case" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "633458d4ef8c78b72454de2d54fd6ab2e60f9e02be22f3c6104cdc8a4e0fceb9" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "cookie" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ddef33a339a91ea89fb53151bd0a4689cfce27055c291dfa69945475d22c747" +dependencies = [ + "percent-encoding", + "time", + "version_check", +] + +[[package]] +name = "cookie_store" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15b2c103cf610ec6cae3da84a766285b42fd16aad564758459e6ecf128c75206" +dependencies = [ + "cookie", + "document-features", + "idna", + "log", + "publicsuffix", + "serde", + "serde_derive", + "serde_json", + "time", + "url", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crunchy" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" + +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "darling" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1247195ecd7e3c85f83c8d2a366e4210d588e802133e1e355180a9870b517ea4" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "darling_macro" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" +dependencies = [ + "darling_core", + "quote", + "syn", +] + +[[package]] +name = "data-encoding" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7a1e2f27636f116493b8b860f5546edb47c8d8f8ea73e1d2a20be88e28d1fea" + +[[package]] +name = "deranged" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "derive_more" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" +dependencies = [ + "convert_case 0.10.0", + "proc-macro2", + "quote", + "rustc_version", + "syn", + "unicode-xid", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "dioxus" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92b583b48ac77158495e6678fe3a2b5954fc8866fc04cb9695dd146e88bc329d" +dependencies = [ + "dioxus-asset-resolver", + "dioxus-cli-config", + "dioxus-config-macro", + "dioxus-config-macros", + "dioxus-core", + "dioxus-core-macro", + "dioxus-devtools", + "dioxus-document", + "dioxus-fullstack", + "dioxus-history", + "dioxus-hooks", + "dioxus-html", + "dioxus-logger", + "dioxus-router", + "dioxus-signals", + "dioxus-stores", + "dioxus-web", + "manganis", + "subsecond", + "warnings", +] + +[[package]] +name = "dioxus-asset-resolver" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0161af1d3cfc8ff31503ff1b7ee0068c97771fc38d0cc6566e23483142ddf4f" +dependencies = [ + "dioxus-cli-config", + "http", + "infer", + "jni", + "js-sys", + "ndk", + "ndk-context", + "ndk-sys", + "percent-encoding", + "thiserror 2.0.18", + "tokio", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "dioxus-cli-config" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccd67ab405e1915a47df9769cd5408545d1b559d5c01ce7a0f442caef520d1f3" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "dioxus-config-macro" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f040ec7c41aa5428283f56bb0670afba9631bfe3ffd885f4814807f12c8c9d91" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "dioxus-config-macros" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10c41b47b55a433b61f7c12327c85ba650572bacbcc42c342ba2e87a57975264" + +[[package]] +name = "dioxus-core" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b389b0e3cc01c7da292ad9b884b088835fdd1671d45fbd2f737506152b22eef0" +dependencies = [ + "anyhow", + "const_format", + "dioxus-core-types", + "futures-channel", + "futures-util", + "generational-box", + "longest-increasing-subsequence", + "rustc-hash 2.1.1", + "rustversion", + "serde", + "slab", + "slotmap", + "subsecond", + "tracing", +] + +[[package]] +name = "dioxus-core-macro" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a82d65f0024fc86f01911a16156d280eea583be5a82a3bed85e7e8e4194302d" +dependencies = [ + "convert_case 0.8.0", + "dioxus-rsx", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "dioxus-core-types" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfc4b8cdc440a55c17355542fc2089d97949bba674255d84cac77805e1db8c9f" + +[[package]] +name = "dioxus-devtools" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcf89488bad8fb0f18b9086ee2db01f95f709801c10c68be42691a36378a0f2d" +dependencies = [ + "dioxus-cli-config", + "dioxus-core", + "dioxus-devtools-types", + "dioxus-signals", + "serde", + "serde_json", + "subsecond", + "thiserror 2.0.18", + "tracing", + "tungstenite", +] + +[[package]] +name = "dioxus-devtools-types" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e7381d9d7d0a0f66b9d5082d584853c3d53be21d34007073daca98ddf26fc4d" +dependencies = [ + "dioxus-core", + "serde", + "subsecond-types", +] + +[[package]] +name = "dioxus-document" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba0aeeff26d9d06441f59fd8d7f4f76098ba30ca9728e047c94486161185ceb" +dependencies = [ + "dioxus-core", + "dioxus-core-macro", + "dioxus-core-types", + "dioxus-html", + "futures-channel", + "futures-util", + "generational-box", + "lazy-js-bundle", + "serde", + "serde_json", + "tracing", +] + +[[package]] +name = "dioxus-fullstack" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7db1f8b70338072ec408b48d09c96559cf071f87847465d8161294197504c498" +dependencies = [ + "anyhow", + "async-stream", + "async-tungstenite", + "axum", + "axum-core", + "base64", + "bytes", + "ciborium", + "const-str", + "const_format", + "content_disposition", + "derive_more", + "dioxus-asset-resolver", + "dioxus-cli-config", + "dioxus-core", + "dioxus-fullstack-core", + "dioxus-fullstack-macro", + "dioxus-hooks", + "dioxus-html", + "dioxus-signals", + "form_urlencoded", + "futures", + "futures-channel", + "futures-util", + "gloo-net", + "headers", + "http", + "http-body", + "http-body-util", + "js-sys", + "mime", + "pin-project", + "reqwest", + "rustversion", + "send_wrapper", + "serde", + "serde_json", + "serde_qs", + "serde_urlencoded", + "thiserror 2.0.18", + "tokio-util", + "tracing", + "tungstenite", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", + "xxhash-rust", +] + +[[package]] +name = "dioxus-fullstack-core" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cda8b152e85121243741b9d5f2a3d8cb3c47a7b2299e902f98b6a7719915b0a2" +dependencies = [ + "anyhow", + "axum-core", + "base64", + "ciborium", + "dioxus-core", + "dioxus-document", + "dioxus-history", + "dioxus-hooks", + "dioxus-signals", + "futures-channel", + "futures-util", + "generational-box", + "http", + "inventory", + "parking_lot", + "serde", + "serde_json", + "thiserror 2.0.18", + "tokio", + "tracing", +] + +[[package]] +name = "dioxus-fullstack-macro" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "255104d4a4f278f1a8482fa30536c91d22260c561c954b753e72987df8d65b2e" +dependencies = [ + "const_format", + "convert_case 0.8.0", + "proc-macro2", + "quote", + "syn", + "xxhash-rust", +] + +[[package]] +name = "dioxus-history" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d00ba43bfe6e5ca226fef6128f240ca970bea73cac0462416188026360ccdcf" +dependencies = [ + "dioxus-core", + "tracing", +] + +[[package]] +name = "dioxus-hooks" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dab2da4f038c33cb38caa37ffc3f5d6dfbc018f05da35b238210a533bb075823" +dependencies = [ + "dioxus-core", + "dioxus-signals", + "futures-channel", + "futures-util", + "generational-box", + "rustversion", + "slab", + "tracing", +] + +[[package]] +name = "dioxus-html" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eded5fa6d2e677b7442a93f4228bf3c0ad2597a8bd3292cae50c869d015f3a99" +dependencies = [ + "async-trait", + "bytes", + "dioxus-core", + "dioxus-core-macro", + "dioxus-core-types", + "dioxus-hooks", + "dioxus-html-internal-macro", + "enumset", + "euclid", + "futures-channel", + "futures-util", + "generational-box", + "keyboard-types", + "lazy-js-bundle", + "rustversion", + "tracing", +] + +[[package]] +name = "dioxus-html-internal-macro" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45462ab85fe059a36841508d40545109fd0e25855012d22583a61908eb5cd02a" +dependencies = [ + "convert_case 0.8.0", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "dioxus-interpreter-js" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a42a7f73ad32a5054bd8c1014f4ac78cca3b7f6889210ee2b57ea31b33b6d32f" +dependencies = [ + "js-sys", + "lazy-js-bundle", + "rustc-hash 2.1.1", + "sledgehammer_bindgen", + "sledgehammer_utils", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "dioxus-logger" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1eeab114cb009d9e6b85ea10639a18cfc54bb342f3b837770b004c4daeb89c2" +dependencies = [ + "dioxus-cli-config", + "tracing", + "tracing-subscriber", + "tracing-wasm", +] + +[[package]] +name = "dioxus-router" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d5b31f9e27231389bf5a117b7074d22d8c58358b484a2558e56fbab20e64ca4" +dependencies = [ + "dioxus-cli-config", + "dioxus-core", + "dioxus-core-macro", + "dioxus-history", + "dioxus-hooks", + "dioxus-html", + "dioxus-router-macro", + "dioxus-signals", + "percent-encoding", + "rustversion", + "tracing", + "url", +] + +[[package]] +name = "dioxus-router-macro" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "838b9b441a95da62b39cae4defd240b5ebb0ec9f2daea1126099e00a838dc86f" +dependencies = [ + "base16", + "digest", + "proc-macro2", + "quote", + "sha2", + "slab", + "syn", +] + +[[package]] +name = "dioxus-rsx" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53128858f0ccca9de54292a4d48409fda1df75fd5012c6243f664042f0225d68" +dependencies = [ + "proc-macro2", + "proc-macro2-diagnostics", + "quote", + "rustversion", + "syn", +] + +[[package]] +name = "dioxus-signals" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f48020bc23bc9766e7cce986c0fd6de9af0b8cbfd432652ec6b1094439c1ec6" +dependencies = [ + "dioxus-core", + "futures-channel", + "futures-util", + "generational-box", + "parking_lot", + "rustc-hash 2.1.1", + "tracing", + "warnings", +] + +[[package]] +name = "dioxus-stores" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77aaa9ac56d781bb506cf3c0d23bea96b768064b89fe50d3b4d4659cc6bd8058" +dependencies = [ + "dioxus-core", + "dioxus-signals", + "dioxus-stores-macro", + "generational-box", +] + +[[package]] +name = "dioxus-stores-macro" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b1a728622e7b63db45774f75e71504335dd4e6115b235bbcff272980499493a" +dependencies = [ + "convert_case 0.8.0", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "dioxus-web" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b33fe739fed4e8143dac222a9153593f8e2451662ce8fc4c9d167a9d6ec0923" +dependencies = [ + "dioxus-cli-config", + "dioxus-core", + "dioxus-core-types", + "dioxus-devtools", + "dioxus-document", + "dioxus-history", + "dioxus-html", + "dioxus-interpreter-js", + "dioxus-signals", + "futures-channel", + "futures-util", + "generational-box", + "gloo-timers", + "js-sys", + "lazy-js-bundle", + "rustc-hash 2.1.1", + "send_wrapper", + "serde", + "serde-wasm-bindgen", + "serde_json", + "tracing", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "document-features" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4b8a88685455ed29a21542a33abd9cb6510b6b129abadabdcef0f4c55bc8f61" +dependencies = [ + "litrs", +] + +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + +[[package]] +name = "encoding_rs" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "enumset" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25b07a8dfbbbfc0064c0a6bdf9edcf966de6b1c33ce344bdeca3b41615452634" +dependencies = [ + "enumset_derive", +] + +[[package]] +name = "enumset_derive" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f43e744e4ea338060faee68ed933e46e722fb7f3617e722a5772d7e856d8b3ce" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "euclid" +version = "0.22.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df61bf483e837f88d5c2291dcf55c67be7e676b3a51acc48db3a7b163b91ed63" +dependencies = [ + "num-traits", +] + +[[package]] +name = "find-msvc-tools" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b147ee9d1f6d097cef9ce628cd2ee62288d963e16fb287bd9286455b241382d" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" + +[[package]] +name = "futures-executor" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf29c38818342a3b26b5b923639e7b1f4a61fc5e76102d4b1981c6dc7a7579d" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" + +[[package]] +name = "futures-macro" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "futures-sink" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" + +[[package]] +name = "futures-task" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" + +[[package]] +name = "futures-util" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "slab", +] + +[[package]] +name = "generational-box" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc4ed190b9de8e734d47a70be59b1e7588b9e8e0d0036e332f4c014e8aed1bc5" +dependencies = [ + "parking_lot", + "tracing", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +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]] +name = "getrandom" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" +dependencies = [ + "cfg-if", + "libc", + "r-efi 6.0.0", + "wasip2", + "wasip3", +] + +[[package]] +name = "gloo-net" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06f627b1a58ca3d42b45d6104bf1e1a03799df472df00988b6ba21accc10580" +dependencies = [ + "futures-channel", + "futures-core", + "futures-sink", + "gloo-utils", + "http", + "js-sys", + "pin-project", + "serde", + "serde_json", + "thiserror 1.0.69", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "gloo-storage" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbc8031e8c92758af912f9bc08fbbadd3c6f3cfcbf6b64cdf3d6a81f0139277a" +dependencies = [ + "gloo-utils", + "js-sys", + "serde", + "serde_json", + "thiserror 1.0.69", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "gloo-timers" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbb143cf96099802033e0d4f4963b19fd2e0b728bcf076cd9cf7f6634f092994" +dependencies = [ + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "gloo-utils" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5555354113b18c547c1d3a98fbf7fb32a9ff4f6fa112ce823a21641a0ba3aa" +dependencies = [ + "js-sys", + "serde", + "serde_json", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "half" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" +dependencies = [ + "cfg-if", + "crunchy", + "zerocopy", +] + +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "foldhash", +] + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" + +[[package]] +name = "headers" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3314d5adb5d94bcdf56771f2e50dbbc80bb4bdf88967526706205ac9eff24eb" +dependencies = [ + "base64", + "bytes", + "headers-core", + "http", + "httpdate", + "mime", + "sha1", +] + +[[package]] +name = "headers-core" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54b4a22553d4242c49fddb9ba998a99962b5cc6f22cb5a3482bec22522403ce4" +dependencies = [ + "http", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "herbapi-ui" +version = "0.1.0" +dependencies = [ + "chrono", + "console_error_panic_hook", + "dioxus", + "getrandom 0.3.4", + "gloo-net", + "gloo-storage", + "js-sys", + "serde", + "serde_json", + "tracing", + "uuid", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "http" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" +dependencies = [ + "bytes", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "pin-utils", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" +dependencies = [ + "http", + "hyper", + "hyper-util", + "rustls", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tower-service", + "webpki-roots", +] + +[[package]] +name = "hyper-util" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" +dependencies = [ + "base64", + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "icu_collections" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" +dependencies = [ + "displaydoc", + "potential_utf", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" + +[[package]] +name = "icu_properties" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" + +[[package]] +name = "icu_provider" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "id-arena" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "indexmap" +version = "2.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" +dependencies = [ + "equivalent", + "hashbrown 0.16.1", + "serde", + "serde_core", +] + +[[package]] +name = "infer" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a588916bfdfd92e71cacef98a63d9b1f0d74d6599980d11894290e7ddefffcf7" +dependencies = [ + "cfb", +] + +[[package]] +name = "inventory" +version = "0.3.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "009ae045c87e7082cb72dab0ccd01ae075dd00141ddc108f43a0ea150a9e7227" +dependencies = [ + "rustversion", +] + +[[package]] +name = "ipnet" +version = "2.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" + +[[package]] +name = "iri-string" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c91338f0783edbd6195decb37bae672fd3b165faffb89bf7b9e6942f8b1a731a" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "itoa" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" + +[[package]] +name = "jni" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +dependencies = [ + "cesu8", + "cfg-if", + "combine", + "jni-sys", + "log", + "thiserror 1.0.69", + "walkdir", + "windows-sys 0.45.0", +] + +[[package]] +name = "jni-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" + +[[package]] +name = "js-sys" +version = "0.3.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b49715b7073f385ba4bc528e5747d02e66cb39c6146efb66b781f131f0fb399c" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "keyboard-types" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b750dcadc39a09dbadd74e118f6dd6598df77fa01df0cfcdc52c28dece74528a" +dependencies = [ + "bitflags", +] + +[[package]] +name = "lazy-js-bundle" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7b88b715ab1496c6e6b8f5e927be961c4235196121b6ae59bcb51077a21dd36" + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "leb128fmt" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" + +[[package]] +name = "libc" +version = "0.2.183" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d" + +[[package]] +name = "libloading" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" +dependencies = [ + "cfg-if", + "windows-link", +] + +[[package]] +name = "linux-raw-sys" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + +[[package]] +name = "litemap" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" + +[[package]] +name = "litrs" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" + +[[package]] +name = "longest-increasing-subsequence" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3bd0dd2cd90571056fdb71f6275fada10131182f84899f4b2a916e565d81d86" + +[[package]] +name = "lru-slab" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" + +[[package]] +name = "macro-string" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b27834086c65ec3f9387b096d66e99f221cf081c2b738042aa252bcd41204e3" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "manganis" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6cce7d688848bf9d034168513b9a2ffbfe5f61df2ff14ae15e6cfc866efdd344" +dependencies = [ + "const-serialize 0.7.2", + "const-serialize 0.8.0-alpha.0", + "manganis-core", + "manganis-macro", +] + +[[package]] +name = "manganis-core" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84ce917b978268fe8a7db49e216343ec7c8f471f7e686feb70940d67293f19d4" +dependencies = [ + "const-serialize 0.7.2", + "const-serialize 0.8.0-alpha.0", + "dioxus-cli-config", + "dioxus-core-types", + "serde", + "winnow", +] + +[[package]] +name = "manganis-macro" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad513e990f7c0bca86aa68659a7a3dc4c705572ed4c22fd6af32ccf261334cc2" +dependencies = [ + "dunce", + "macro-string", + "manganis-core", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "matchers" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" +dependencies = [ + "regex-automata", +] + +[[package]] +name = "matchit" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" + +[[package]] +name = "memchr" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" + +[[package]] +name = "memfd" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad38eb12aea514a0466ea40a80fd8cc83637065948eb4a426e4aa46261175227" +dependencies = [ + "rustix", +] + +[[package]] +name = "memmap2" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "714098028fe011992e1c3962653c96b2d578c4b4bce9036e15ff220319b1e0e3" +dependencies = [ + "libc", +] + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "mime_guess" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +dependencies = [ + "mime", + "unicase", +] + +[[package]] +name = "mio" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "multer" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83e87776546dc87511aa5ee218730c92b666d7264ab6ed41f9d215af9cd5224b" +dependencies = [ + "bytes", + "encoding_rs", + "futures-util", + "http", + "httparse", + "memchr", + "mime", + "spin", + "version_check", +] + +[[package]] +name = "ndk" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" +dependencies = [ + "bitflags", + "jni-sys", + "log", + "ndk-sys", + "num_enum", + "raw-window-handle", + "thiserror 1.0.69", +] + +[[package]] +name = "ndk-context" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" + +[[package]] +name = "ndk-sys" +version = "0.6.0+11769913" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" +dependencies = [ + "jni-sys", +] + +[[package]] +name = "num-conv" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf97ec579c3c42f953ef76dbf8d55ac91fb219dde70e49aa4a6b7d74e9919050" + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_enum" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1207a7e20ad57b847bbddc6776b968420d38292bbfe2089accff5e19e82454c" +dependencies = [ + "num_enum_derive", + "rustversion", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff32365de1b6743cb203b710788263c44a03de03802daf96092f2da4fe6ba4d7" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-link", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "pin-project" +version = "1.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1749c7ed4bcaf4c3d0a3efc28538844fb29bcdd7d2b67b2be7e20ba861ff517" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b20ed30f105399776b9c883e68e536ef602a16ae6f596d2c473591d6ad64c6" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "potential_utf" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" +dependencies = [ + "zerovec", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn", +] + +[[package]] +name = "proc-macro-crate" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "proc-macro2" +version = "1.0.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "proc-macro2-diagnostics" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "version_check", +] + +[[package]] +name = "psl-types" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33cb294fe86a74cbcf50d4445b37da762029549ebeea341421c7c70370f86cac" + +[[package]] +name = "publicsuffix" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f42ea446cab60335f76979ec15e12619a2165b5ae2c12166bef27d283a9fadf" +dependencies = [ + "idna", + "psl-types", +] + +[[package]] +name = "quinn" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20" +dependencies = [ + "bytes", + "cfg_aliases", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash 2.1.1", + "rustls", + "socket2", + "thiserror 2.0.18", + "tokio", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-proto" +version = "0.11.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "434b42fec591c96ef50e21e886936e66d3cc3f737104fdb9b737c40ffb94c098" +dependencies = [ + "bytes", + "getrandom 0.3.4", + "lru-slab", + "rand", + "ring", + "rustc-hash 2.1.1", + "rustls", + "rustls-pki-types", + "slab", + "thiserror 2.0.18", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.60.2", +] + +[[package]] +name = "quote" +version = "1.0.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] +name = "rand" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +dependencies = [ + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" +dependencies = [ + "getrandom 0.3.4", +] + +[[package]] +name = "raw-window-handle" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags", +] + +[[package]] +name = "regex-automata" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" + +[[package]] +name = "reqwest" +version = "0.12.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" +dependencies = [ + "base64", + "bytes", + "cookie", + "cookie_store", + "futures-core", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-util", + "js-sys", + "log", + "mime_guess", + "percent-encoding", + "pin-project-lite", + "quinn", + "rustls", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-rustls", + "tokio-util", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", + "webpki-roots", +] + +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.17", + "libc", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc-hash" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustls" +version = "0.23.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "758025cb5fccfd3bc2fd74708fd4682be41d99e5dff73c377c0646c6012c73a4" +dependencies = [ + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pki-types" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd" +dependencies = [ + "web-time", + "zeroize", +] + +[[package]] +name = "rustls-webpki" +version = "0.103.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7df23109aa6c1567d1c575b9952556388da57401e4ace1d15f79eedad0d8f53" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" + +[[package]] +name = "ryu" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "semver" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" + +[[package]] +name = "send_wrapper" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" +dependencies = [ + "futures-core", +] + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde-wasm-bindgen" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8302e169f0eddcc139c70f139d19d6467353af16f9fce27e8c30158036a1e16b" +dependencies = [ + "js-sys", + "serde", + "wasm-bindgen", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.149" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "serde_path_to_error" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10a9ff822e371bb5403e391ecd83e182e0e77ba7f6fe0160b795797109d1b457" +dependencies = [ + "itoa", + "serde", + "serde_core", +] + +[[package]] +name = "serde_qs" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3faaf9e727533a19351a43cc5a8de957372163c7d35cc48c90b75cdda13c352" +dependencies = [ + "percent-encoding", + "serde", + "thiserror 2.0.18", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "sledgehammer_bindgen" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49e83e178d176459c92bc129cfd0958afac3ced925471b889b3a75546cfc4133" +dependencies = [ + "sledgehammer_bindgen_macro", + "wasm-bindgen", +] + +[[package]] +name = "sledgehammer_bindgen_macro" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb251b407f50028476a600541542b605bb864d35d9ee1de4f6cab45d88475e6d" +dependencies = [ + "quote", + "syn", +] + +[[package]] +name = "sledgehammer_utils" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "debdd4b83524961983cea3c55383b3910fd2f24fd13a188f5b091d2d504a61ae" +dependencies = [ + "rustc-hash 1.1.0", +] + +[[package]] +name = "slotmap" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdd58c3c93c3d278ca835519292445cb4b0d4dc59ccfdf7ceadaab3f8aeb4038" +dependencies = [ + "serde", + "version_check", +] + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "socket2" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "subsecond" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8438668e545834d795d04c4335aafc332ce046106521a29f0a5c6501de34187c" +dependencies = [ + "js-sys", + "libc", + "libloading", + "memfd", + "memmap2", + "serde", + "subsecond-types", + "thiserror 2.0.18", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "subsecond-types" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e72f747606fc19fe81d6c59e491af93ed7dcbcb6aad9d1d18b05129914ec298" +dependencies = [ + "serde", +] + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "syn" +version = "2.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" +dependencies = [ + "thiserror-impl 2.0.18", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thread_local" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "time" +version = "0.3.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde_core", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" + +[[package]] +name = "time-macros" +version = "0.2.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tinystr" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27ad5e34374e03cfffefc301becb44e9dc3c17584f414349ebe29ed26661822d" +dependencies = [ + "bytes", + "libc", + "mio", + "pin-project-lite", + "socket2", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" +dependencies = [ + "bytes", + "futures-core", + "futures-io", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml_datetime" +version = "1.0.0+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32c2555c699578a4f59f0cc68e5116c8d7cabbd45e1409b989d4be085b53f13e" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_edit" +version = "0.25.4+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7193cbd0ce53dc966037f54351dbbcf0d5a642c7f0038c382ef9e677ce8c13f2" +dependencies = [ + "indexmap", + "toml_datetime", + "toml_parser", + "winnow", +] + +[[package]] +name = "toml_parser" +version = "1.0.9+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "702d4415e08923e7e1ef96cd5727c0dfed80b4d2fa25db9647fe5eb6f7c5a4c4" +dependencies = [ + "winnow", +] + +[[package]] +name = "tower" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" +dependencies = [ + "bitflags", + "bytes", + "futures-util", + "http", + "http-body", + "iri-string", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e" +dependencies = [ + "matchers", + "once_cell", + "regex-automata", + "sharded-slab", + "thread_local", + "tracing", + "tracing-core", +] + +[[package]] +name = "tracing-wasm" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4575c663a174420fa2d78f4108ff68f65bf2fbb7dd89f33749b6e826b3626e07" +dependencies = [ + "tracing", + "tracing-subscriber", + "wasm-bindgen", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "tungstenite" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eadc29d668c91fcc564941132e17b28a7ceb2f3ebf0b9dae3e03fd7a6748eb0d" +dependencies = [ + "bytes", + "data-encoding", + "http", + "httparse", + "log", + "rand", + "sha1", + "thiserror 2.0.18", + "utf-8", +] + +[[package]] +name = "typenum" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" + +[[package]] +name = "unicase" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" + +[[package]] +name = "unicode-ident" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" + +[[package]] +name = "unicode-segmentation" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "uuid" +version = "1.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a68d3c8f01c0cfa54a75291d83601161799e4a89a39e0929f4b0354d88757a37" +dependencies = [ + "getrandom 0.4.2", + "js-sys", + "serde_core", + "wasm-bindgen", +] + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "warnings" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64f68998838dab65727c9b30465595c6f7c953313559371ca8bf31759b3680ad" +dependencies = [ + "pin-project", + "tracing", + "warnings-macro", +] + +[[package]] +name = "warnings-macro" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59195a1db0e95b920366d949ba5e0d3fc0e70b67c09be15ce5abb790106b0571" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.2+wasi-0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasip3" +version = "0.4.0+wasi-0.3.0-rc-2026-01-06" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.114" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6532f9a5c1ece3798cb1c2cfdba640b9b3ba884f5db45973a6f442510a87d38e" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9c5522b3a28661442748e09d40924dfb9ca614b21c00d3fd135720e48b67db8" +dependencies = [ + "cfg-if", + "futures-util", + "js-sys", + "once_cell", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.114" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18a2d50fcf105fb33bb15f00e7a77b772945a2ee45dcf454961fd843e74c18e6" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.114" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03ce4caeaac547cdf713d280eda22a730824dd11e6b8c3ca9e42247b25c631e3" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.114" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75a326b8c223ee17883a4251907455a2431acc2791c98c26279376490c378c16" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wasm-encoder" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" +dependencies = [ + "leb128fmt", + "wasmparser", +] + +[[package]] +name = "wasm-metadata" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" +dependencies = [ + "anyhow", + "indexmap", + "wasm-encoder", + "wasmparser", +] + +[[package]] +name = "wasm-streams" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "wasmparser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" +dependencies = [ + "bitflags", + "hashbrown 0.15.5", + "indexmap", + "semver", +] + +[[package]] +name = "web-sys" +version = "0.3.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "854ba17bb104abfb26ba36da9729addc7ce7f06f5c0f90f3c391f8461cca21f9" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-roots" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22cfaf3c063993ff62e73cb4311efde4db1efb31ab78a3e5c457939ad5cc0bed" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "windows-core" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +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_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.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +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.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" +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.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + +[[package]] +name = "windows_i686_gnu" +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.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +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.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnu" +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.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_gnullvm" +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.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "windows_x86_64_msvc" +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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" +dependencies = [ + "memchr", +] + +[[package]] +name = "wit-bindgen" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" +dependencies = [ + "wit-bindgen-rust-macro", +] + +[[package]] +name = "wit-bindgen-core" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" +dependencies = [ + "anyhow", + "heck", + "wit-parser", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" +dependencies = [ + "anyhow", + "heck", + "indexmap", + "prettyplease", + "syn", + "wasm-metadata", + "wit-bindgen-core", + "wit-component", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn", + "wit-bindgen-core", + "wit-bindgen-rust", +] + +[[package]] +name = "wit-component" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" +dependencies = [ + "anyhow", + "bitflags", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder", + "wasm-metadata", + "wasmparser", + "wit-parser", +] + +[[package]] +name = "wit-parser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser", +] + +[[package]] +name = "writeable" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" + +[[package]] +name = "xxhash-rust" +version = "0.8.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdd20c5420375476fbd4394763288da7eb0cc0b8c11deed431a91562af7335d3" + +[[package]] +name = "yoke" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.8.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2578b716f8a7a858b7f02d5bd870c14bf4ddbbcf3a4c05414ba6503640505e3" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e6cc098ea4d3bd6246687de65af3f920c430e236bee1e3bf2e441463f08a02f" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" + +[[package]] +name = "zerotrie" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zmij" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" diff --git a/herbapi-ui/Cargo.toml b/herbapi-ui/Cargo.toml new file mode 100644 index 0000000..b515498 --- /dev/null +++ b/herbapi-ui/Cargo.toml @@ -0,0 +1,20 @@ +[package] +name = "herbapi-ui" +version = "0.1.0" +edition = "2024" + +[dependencies] +dioxus = { version = "0.7", features = ["router", "web"] } +gloo-net = { version = "0.6", features = ["http", "json"] } +gloo-storage = "0.3" +serde = { version = "1", features = ["derive"] } +serde_json = "1" +uuid = { version = "1", features = ["serde", "v4", "js"] } +chrono = { version = "0.4", features = ["serde"] } +web-sys = { version = "0.3", features = ["Document", "Element", "RequestCredentials", "Window", "HtmlInputElement", "FormData"] } +wasm-bindgen = "0.2" +wasm-bindgen-futures = "0.4" +js-sys = "0.3" +console_error_panic_hook = "0.1" +tracing = "0.1" +getrandom = { version = "0.3", features = ["wasm_js"] } diff --git a/herbapi-ui/Dioxus.toml b/herbapi-ui/Dioxus.toml new file mode 100644 index 0000000..d0df303 --- /dev/null +++ b/herbapi-ui/Dioxus.toml @@ -0,0 +1,15 @@ +[application] +name = "herbapi-ui" +default_platform = "web" + +[web.app] +title = "HerbAPI — Plant Database" + +[web.watcher] +watch_path = ["src", "assets"] + +[web.resource.dev] +style = ["/assets/herbapi.css"] + +[web.resource.release] +style = ["/assets/herbapi.css"] diff --git a/herbapi-ui/assets/herbapi.css b/herbapi-ui/assets/herbapi.css new file mode 100644 index 0000000..4d382f8 --- /dev/null +++ b/herbapi-ui/assets/herbapi.css @@ -0,0 +1,557 @@ +/* HerbAPI — Plant Database Stylesheet */ + +:root { + --bg: #faf9f6; + --bg-card: #ffffff; + --bg-sidebar: #2d3a2e; + --text: #1a1a1a; + --text-muted: #666; + --text-sidebar: #e0e0e0; + --accent: #4a7c59; + --accent-hover: #3d6b4a; + --accent-light: #e8f0ea; + --border: #ddd; + --radius: 6px; + --shadow: 0 1px 3px rgba(0,0,0,0.08); + + /* Planting calendar colors */ + --cal-indoor: #7b68ee; + --cal-direct: #3cb371; + --cal-transplant: #ff8c00; + --cal-glass: #87ceeb; + --cal-harvest: #dc143c; +} + +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +body { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif; + background: var(--bg); + color: var(--text); + line-height: 1.6; +} + +a { + color: var(--accent); + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +em { + font-style: italic; +} + +/* Layout */ + +.app-layout { + display: flex; + min-height: 100vh; +} + +.sidebar { + width: 220px; + background: var(--bg-sidebar); + color: var(--text-sidebar); + display: flex; + flex-direction: column; + padding: 1.5rem 0; + flex-shrink: 0; + position: sticky; + top: 0; + height: 100vh; +} + +.sidebar-brand { + display: flex; + align-items: center; + gap: 0.75rem; + padding: 0 1.25rem 1.5rem; + border-bottom: 1px solid rgba(255,255,255,0.1); +} + +.brand-icon { + font-size: 1.5rem; +} + +.brand-text-group { + display: flex; + flex-direction: column; +} + +.brand-text { + font-size: 1.1rem; + font-weight: 700; + letter-spacing: 0.5px; +} + +.brand-sub { + font-size: 0.7rem; + opacity: 0.6; + text-transform: uppercase; + letter-spacing: 1px; +} + +.sidebar-nav { + display: flex; + flex-direction: column; + padding: 1rem 0; +} + +.nav-link { + display: flex; + align-items: center; + gap: 0.5rem; + padding: 0.5rem 1.25rem; + color: var(--text-sidebar); + text-decoration: none; + transition: background 0.15s; + font-size: 0.9rem; +} + +.nav-link:hover { + background: rgba(255,255,255,0.08); + text-decoration: none; +} + +.sidebar-user { + margin-top: auto; + padding: 1rem 1.25rem; + border-top: 1px solid rgba(255,255,255,0.1); + display: flex; + flex-direction: column; + gap: 0.5rem; + font-size: 0.85rem; +} + +.user-name { + font-weight: 500; +} + +.logout-link, +.login-link { + color: rgba(255,255,255,0.6); + font-size: 0.8rem; +} + +.logout-link:hover, +.login-link:hover { + color: #fff; +} + +/* Content */ + +.content { + flex: 1; + padding: 2rem 3rem; + max-width: 1200px; +} + +.page { + animation: fadeIn 0.2s ease; +} + +@keyframes fadeIn { + from { opacity: 0; transform: translateY(4px); } + to { opacity: 1; transform: translateY(0); } +} + +h1 { + font-size: 1.8rem; + margin-bottom: 0.5rem; + font-weight: 600; +} + +h2 { + font-size: 1.3rem; + margin: 2rem 0 0.75rem; + font-weight: 600; + color: var(--accent); +} + +.subtitle { + color: var(--text-muted); + margin-bottom: 1.5rem; +} + +.name-common { + color: var(--text-muted); + font-size: 1rem; + margin-bottom: 0.25rem; +} + +.description { + margin: 1rem 0; + line-height: 1.7; +} + +/* Search */ + +.search-bar { + display: flex; + gap: 0.5rem; + margin-bottom: 1.5rem; +} + +.search-bar input { + flex: 1; + padding: 0.6rem 1rem; + border: 1px solid var(--border); + border-radius: var(--radius); + font-size: 0.95rem; + background: var(--bg-card); + transition: border-color 0.15s; +} + +.search-bar input:focus { + outline: none; + border-color: var(--accent); +} + +.search-bar button { + padding: 0.6rem 1.2rem; + background: var(--accent); + color: #fff; + border: none; + border-radius: var(--radius); + cursor: pointer; + font-size: 0.9rem; +} + +.search-bar button:hover { + background: var(--accent-hover); +} + +/* Cards */ + +.card-grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); + gap: 1rem; +} + +.plant-card { + background: var(--bg-card); + border: 1px solid var(--border); + border-radius: var(--radius); + padding: 1rem; + box-shadow: var(--shadow); + transition: box-shadow 0.15s, transform 0.15s; +} + +.plant-card:hover { + box-shadow: 0 2px 8px rgba(0,0,0,0.12); + transform: translateY(-1px); +} + +.card-scientific { + font-size: 1rem; + display: block; + margin-bottom: 0.25rem; +} + +.card-common { + font-size: 0.85rem; + color: var(--text-muted); +} + +/* Tables */ + +.table-wrap { + overflow-x: auto; +} + +table { + width: 100%; + border-collapse: collapse; + background: var(--bg-card); + border-radius: var(--radius); + overflow: hidden; + box-shadow: var(--shadow); +} + +thead { + background: var(--accent-light); +} + +th { + text-align: left; + padding: 0.75rem 1rem; + font-weight: 600; + font-size: 0.85rem; + text-transform: uppercase; + letter-spacing: 0.5px; + color: var(--accent); +} + +td { + padding: 0.6rem 1rem; + border-top: 1px solid var(--border); + font-size: 0.9rem; +} + +tr:hover td { + background: var(--accent-light); +} + +/* Badges */ + +.badges { + display: flex; + flex-wrap: wrap; + gap: 0.5rem; + margin: 0.75rem 0; +} + +.badge { + display: inline-block; + padding: 0.2rem 0.6rem; + border-radius: 3px; + font-size: 0.75rem; + font-weight: 500; + background: var(--accent-light); + color: var(--accent); +} + +.badge.organic { + background: #e8f5e9; + color: #2e7d32; +} + +.badge.demeter { + background: #fff3e0; + color: #e65100; +} + +/* Info grid (species detail) */ + +.info-grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); + gap: 0.75rem; + margin: 1rem 0; +} + +.info-item { + background: var(--bg-card); + border: 1px solid var(--border); + border-radius: var(--radius); + padding: 0.6rem 0.8rem; +} + +.info-item.badge { + background: var(--accent-light); + border-color: var(--accent); + color: var(--accent); + font-weight: 600; + text-align: center; +} + +.info-label { + display: block; + font-size: 0.7rem; + text-transform: uppercase; + letter-spacing: 0.5px; + color: var(--text-muted); + margin-bottom: 0.15rem; +} + +.info-value { + font-size: 0.95rem; + font-weight: 500; +} + +/* Planting Calendar */ + +.planting-calendar { + background: var(--bg-card); + border: 1px solid var(--border); + border-radius: var(--radius); + padding: 1rem; + overflow-x: auto; + box-shadow: var(--shadow); +} + +.cal-row { + display: grid; + grid-template-columns: 120px repeat(12, 1fr); + gap: 2px; + margin-bottom: 2px; +} + +.cal-header { + font-size: 0.75rem; + font-weight: 600; + color: var(--text-muted); + text-align: center; +} + +.cal-label { + font-size: 0.8rem; + padding: 0.3rem 0.5rem; + white-space: nowrap; +} + +.cal-cell { + height: 28px; + border-radius: 3px; + background: #f0f0f0; + text-align: center; + line-height: 28px; +} + +.cal-cell.active.cal-indoor { + background: var(--cal-indoor); +} + +.cal-cell.active.cal-direct { + background: var(--cal-direct); +} + +.cal-cell.active.cal-transplant { + background: var(--cal-transplant); +} + +.cal-cell.active.cal-glass { + background: var(--cal-glass); +} + +.cal-cell.active.cal-harvest { + background: var(--cal-harvest); +} + +/* Pagination */ + +.pagination { + display: flex; + align-items: center; + gap: 1rem; + margin-top: 1.5rem; + justify-content: center; +} + +.pagination button { + padding: 0.4rem 1rem; + border: 1px solid var(--border); + border-radius: var(--radius); + background: var(--bg-card); + cursor: pointer; + font-size: 0.85rem; +} + +.pagination button:hover:not(:disabled) { + background: var(--accent-light); +} + +.pagination button:disabled { + opacity: 0.4; + cursor: default; +} + +.pagination span { + font-size: 0.85rem; + color: var(--text-muted); +} + +/* Search results */ + +.result-count { + color: var(--text-muted); + margin-bottom: 1rem; + font-size: 0.9rem; +} + +.search-results { + display: flex; + flex-direction: column; + gap: 0.75rem; +} + +.search-result { + background: var(--bg-card); + border: 1px solid var(--border); + border-radius: var(--radius); + padding: 0.75rem 1rem; + display: flex; + align-items: baseline; + gap: 0.75rem; + flex-wrap: wrap; + box-shadow: var(--shadow); +} + +.result-type { + font-size: 0.65rem; + text-transform: uppercase; + letter-spacing: 0.5px; + flex-shrink: 0; +} + +.result-desc { + width: 100%; + color: var(--text-muted); + font-size: 0.85rem; +} + +/* 404 */ + +.not-found { + text-align: center; + padding: 4rem 0; +} + +.not-found h1 { + font-size: 4rem; + color: var(--text-muted); +} + +/* Empty states */ + +.empty { + color: var(--text-muted); + font-style: italic; + padding: 1rem 0; +} + +.error { + color: #c62828; + background: #ffebee; + padding: 0.5rem 1rem; + border-radius: var(--radius); +} + +/* Responsive */ + +@media (max-width: 768px) { + .sidebar { + width: 60px; + overflow: hidden; + } + + .sidebar-brand, + .sidebar-user, + .brand-text-group { + display: none; + } + + .nav-label { + display: none; + } + + .content { + padding: 1.5rem; + } + + .card-grid { + grid-template-columns: 1fr; + } + + .info-grid { + grid-template-columns: 1fr 1fr; + } +} diff --git a/herbapi-ui/src/api.rs b/herbapi-ui/src/api.rs new file mode 100644 index 0000000..151cbfd --- /dev/null +++ b/herbapi-ui/src/api.rs @@ -0,0 +1,159 @@ +use gloo_net::http::Request; +use serde::de::DeserializeOwned; +use uuid::Uuid; + +use crate::types::*; + +const API_BASE: &str = "/api/v1"; + +async fn get_json(path: &str) -> Result { + let resp = Request::get(path) + .credentials(web_sys::RequestCredentials::Include) + .send() + .await + .map_err(|e| format!("Request failed: {e}"))?; + + if !resp.ok() { + let body = resp.text().await.unwrap_or_default(); + return Err(format!("HTTP {}: {}", resp.status(), body)); + } + + resp.json().await.map_err(|e| format!("JSON parse error: {e}")) +} + +async fn post_json( + path: &str, + body: &B, +) -> Result { + let resp = Request::post(path) + .credentials(web_sys::RequestCredentials::Include) + .header("Content-Type", "application/json") + .body(serde_json::to_string(body).map_err(|e| e.to_string())?) + .map_err(|e| format!("Request build error: {e}"))? + .send() + .await + .map_err(|e| format!("Request failed: {e}"))?; + + if !resp.ok() { + let body = resp.text().await.unwrap_or_default(); + return Err(format!("HTTP {}: {}", resp.status(), body)); + } + + resp.json().await.map_err(|e| format!("JSON parse error: {e}")) +} + +#[allow(dead_code)] +async fn put_json( + path: &str, + body: &B, +) -> Result { + let resp = Request::put(path) + .credentials(web_sys::RequestCredentials::Include) + .header("Content-Type", "application/json") + .body(serde_json::to_string(body).map_err(|e| e.to_string())?) + .map_err(|e| format!("Request build error: {e}"))? + .send() + .await + .map_err(|e| format!("Request failed: {e}"))?; + + if !resp.ok() { + let body = resp.text().await.unwrap_or_default(); + return Err(format!("HTTP {}: {}", resp.status(), body)); + } + + resp.json().await.map_err(|e| format!("JSON parse error: {e}")) +} + +#[allow(dead_code)] +async fn delete_req(path: &str) -> Result<(), String> { + let resp = Request::delete(path) + .credentials(web_sys::RequestCredentials::Include) + .send() + .await + .map_err(|e| format!("Request failed: {e}"))?; + + if !resp.ok() { + let body = resp.text().await.unwrap_or_default(); + return Err(format!("HTTP {}: {}", resp.status(), body)); + } + + Ok(()) +} + +// --- Auth --- +pub async fn get_current_user() -> Result { + get_json("/auth/me").await +} + +// --- Families --- +pub async fn list_families(page: i64, search: Option<&str>) -> Result, String> { + let mut url = format!("{API_BASE}/families?page={page}&per_page=25"); + if let Some(q) = search { + url.push_str(&format!("&search={q}")); + } + get_json(&url).await +} + +pub async fn get_family(slug: &str) -> Result { + get_json(&format!("{API_BASE}/families/{slug}")).await +} + +// --- Species --- +pub async fn list_species(page: i64, family: Option<&str>, search: Option<&str>) -> Result, String> { + let mut url = format!("{API_BASE}/species?page={page}&per_page=25"); + if let Some(f) = family { + url.push_str(&format!("&family={f}")); + } + if let Some(q) = search { + url.push_str(&format!("&search={q}")); + } + get_json(&url).await +} + +pub async fn get_species(slug: &str) -> Result { + get_json(&format!("{API_BASE}/species/{slug}")).await +} + +// --- Cultivars --- +pub async fn list_cultivars(page: i64, species: Option<&str>, search: Option<&str>) -> Result, String> { + let mut url = format!("{API_BASE}/cultivars?page={page}&per_page=25"); + if let Some(s) = species { + url.push_str(&format!("&species={s}")); + } + if let Some(q) = search { + url.push_str(&format!("&search={q}")); + } + get_json(&url).await +} + +pub async fn get_cultivar(slug: &str) -> Result { + get_json(&format!("{API_BASE}/cultivars/{slug}")).await +} + +// --- Suppliers --- +pub async fn list_suppliers() -> Result, String> { + get_json(&format!("{API_BASE}/suppliers")).await +} + +pub async fn get_supplier(slug: &str) -> Result { + get_json(&format!("{API_BASE}/suppliers/{slug}")).await +} + +pub async fn get_cultivar_suppliers(id: Uuid) -> Result, String> { + get_json(&format!("{API_BASE}/cultivars/{id}/suppliers")).await +} + +// --- Companions --- +pub async fn get_companions(species_id: Uuid) -> Result, String> { + get_json(&format!("{API_BASE}/species/{species_id}/companions")).await +} + +// --- Images --- +pub async fn get_images(entity_type: &str, entity_id: Uuid) -> Result, String> { + get_json(&format!("{API_BASE}/images/{entity_type}/{entity_id}")).await +} + +// --- Search --- +pub async fn search(query: &str, limit: i64) -> Result, String> { + get_json(&format!("{API_BASE}/search?q={query}&limit={limit}")).await +} diff --git a/herbapi-ui/src/app.rs b/herbapi-ui/src/app.rs new file mode 100644 index 0000000..0903330 --- /dev/null +++ b/herbapi-ui/src/app.rs @@ -0,0 +1,108 @@ +use dioxus::prelude::*; + +use crate::api; +use crate::types::MeResponse; + +#[derive(Routable, Clone, Debug, PartialEq)] +#[rustfmt::skip] +pub enum Route { + #[layout(Layout)] + #[route("/")] + Home {}, + #[route("/families")] + FamilyList {}, + #[route("/families/:slug")] + FamilyDetail { slug: String }, + #[route("/species")] + SpeciesList {}, + #[route("/species/:slug")] + SpeciesDetail { slug: String }, + #[route("/cultivars")] + CultivarList {}, + #[route("/cultivars/:slug")] + CultivarDetail { slug: String }, + #[route("/suppliers")] + SupplierList {}, + #[route("/suppliers/:slug")] + SupplierDetail { slug: String }, + #[route("/search")] + SearchPage {}, + #[end_layout] + #[route("/:..segments")] + NotFound { segments: Vec }, +} + +#[component] +pub fn App() -> Element { + rsx! { + Router:: {} + } +} + +#[component] +fn Layout() -> Element { + // Try to get current user (may be None for public access) + let auth = use_resource(|| async { api::get_current_user().await.ok() }); + let user: Option = auth.read().as_ref().and_then(|r| r.clone()); + + rsx! { + div { class: "app-layout", + nav { class: "sidebar", + div { class: "sidebar-brand", + span { class: "brand-icon", "\u{1F33F}" } + div { class: "brand-text-group", + span { class: "brand-text", "HerbAPI" } + span { class: "brand-sub", "Plant Database" } + } + } + div { class: "sidebar-nav", + NavLink { to: Route::Home {}, label: "Home" } + NavLink { to: Route::FamilyList {}, label: "Families" } + NavLink { to: Route::SpeciesList {}, label: "Species" } + NavLink { to: Route::CultivarList {}, label: "Cultivars" } + NavLink { to: Route::SupplierList {}, label: "Suppliers" } + NavLink { to: Route::SearchPage {}, label: "Search" } + } + div { class: "sidebar-user", + if let Some(ref u) = user { + span { class: "user-name", "{u.nickname.as_deref().or(u.name.as_deref()).unwrap_or(&u.email)}" } + a { class: "logout-link", href: "/auth/oidc/logout", "Logout" } + } else { + a { class: "login-link", href: "/auth/oidc/login", "Login" } + } + } + } + main { class: "content", + Outlet:: {} + } + } + } +} + +#[component] +fn NavLink(to: Route, label: &'static str) -> Element { + rsx! { + Link { to: to, class: "nav-link", + span { class: "nav-label", "{label}" } + } + } +} + +#[component] +fn NotFound(segments: Vec) -> Element { + rsx! { + div { class: "not-found", + h1 { "404" } + p { "Page not found: /{segments.join(\"/\")}" } + Link { to: Route::Home {}, "Back to Home" } + } + } +} + +// Re-export page components for the router +pub use crate::pages::cultivars::{CultivarDetail, CultivarList}; +pub use crate::pages::families::{FamilyDetail, FamilyList}; +pub use crate::pages::home::Home; +pub use crate::pages::search::SearchPage; +pub use crate::pages::species::{SpeciesDetail, SpeciesList}; +pub use crate::pages::suppliers::{SupplierDetail, SupplierList}; diff --git a/herbapi-ui/src/components/mod.rs b/herbapi-ui/src/components/mod.rs new file mode 100644 index 0000000..f6c0d45 --- /dev/null +++ b/herbapi-ui/src/components/mod.rs @@ -0,0 +1,2 @@ +pub mod plant_card; +pub mod planting_calendar; diff --git a/herbapi-ui/src/components/plant_card.rs b/herbapi-ui/src/components/plant_card.rs new file mode 100644 index 0000000..60553b0 --- /dev/null +++ b/herbapi-ui/src/components/plant_card.rs @@ -0,0 +1,24 @@ +use dioxus::prelude::*; + +use crate::app::Route; + +#[component] +pub fn PlantCard(slug: String, name: String, name_common: Option, entity_type: String) -> Element { + let route = match entity_type.as_str() { + "species" => Route::SpeciesDetail { slug: slug.clone() }, + "cultivar" => Route::CultivarDetail { slug: slug.clone() }, + "family" => Route::FamilyDetail { slug: slug.clone() }, + _ => Route::Home {}, + }; + + rsx! { + div { class: "plant-card", + Link { to: route, + em { class: "card-scientific", "{name}" } + } + if let Some(ref common) = name_common { + p { class: "card-common", "{common}" } + } + } + } +} diff --git a/herbapi-ui/src/components/planting_calendar.rs b/herbapi-ui/src/components/planting_calendar.rs new file mode 100644 index 0000000..1e72d5e --- /dev/null +++ b/herbapi-ui/src/components/planting_calendar.rs @@ -0,0 +1,58 @@ +use dioxus::prelude::*; + +const MONTH_LABELS: [&str; 12] = ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"]; + +#[component] +pub fn PlantingCalendar( + indoor_sowing: Option>, + direct_sowing: Option>, + transplanting: Option>, + glasshouse: Option>, + harvesting: Option>, +) -> Element { + let rows: Vec<(&str, &str, &Option>)> = vec![ + ("Indoor Sowing", "cal-indoor", &indoor_sowing), + ("Direct Sowing", "cal-direct", &direct_sowing), + ("Transplanting", "cal-transplant", &transplanting), + ("Glasshouse", "cal-glass", &glasshouse), + ("Harvesting", "cal-harvest", &harvesting), + ]; + + // Check if any data exists + let has_data = rows.iter().any(|(_, _, months)| months.is_some()); + if !has_data { + return rsx! { p { class: "empty", "No planting calendar data." } }; + } + + rsx! { + div { class: "planting-calendar", + // Header row with month labels + div { class: "cal-row cal-header", + div { class: "cal-label" } + for label in MONTH_LABELS.iter() { + div { class: "cal-cell", "{label}" } + } + } + // Data rows + for (name, class, months) in rows.iter() { + if months.is_some() { + div { class: "cal-row", + div { class: "cal-label", "{name}" } + for month in 1..=12i32 { + { + let active = months.as_ref() + .map(|m| m.contains(&month)) + .unwrap_or(false); + rsx! { + div { + class: if active { format!("cal-cell {class} active") } else { "cal-cell".to_string() }, + } + } + } + } + } + } + } + } + } +} diff --git a/herbapi-ui/src/main.rs b/herbapi-ui/src/main.rs new file mode 100644 index 0000000..1bdf3c5 --- /dev/null +++ b/herbapi-ui/src/main.rs @@ -0,0 +1,10 @@ +mod api; +mod app; +mod components; +mod pages; +mod types; + +fn main() { + console_error_panic_hook::set_once(); + dioxus::launch(app::App); +} diff --git a/herbapi-ui/src/pages/cultivars.rs b/herbapi-ui/src/pages/cultivars.rs new file mode 100644 index 0000000..b886aa2 --- /dev/null +++ b/herbapi-ui/src/pages/cultivars.rs @@ -0,0 +1,154 @@ +use dioxus::prelude::*; + +use crate::api; +use crate::app::Route; +use crate::components::planting_calendar::PlantingCalendar; + +#[component] +pub fn CultivarList() -> Element { + let mut page = use_signal(|| 1i64); + let mut search = use_signal(|| String::new()); + let current_page = *page.read(); + let search_str = search.read().clone(); + + let cultivars = use_resource(move || { + let s = search_str.clone(); + async move { + let q = if s.is_empty() { None } else { Some(s.as_str()) }; + api::list_cultivars(current_page, None, q).await + } + }); + + rsx! { + div { class: "page", + h1 { "Cultivars" } + + div { class: "search-bar", + input { + r#type: "text", + placeholder: "Search cultivars...", + value: "{search}", + oninput: move |e| { + search.set(e.value()); + page.set(1); + }, + } + } + + match &*cultivars.read() { + None => rsx! { p { "Loading..." } }, + Some(Err(e)) => rsx! { p { class: "error", "Error: {e}" } }, + Some(Ok(data)) => rsx! { + div { class: "table-wrap", + table { + thead { + tr { + th { "Name" } + th { "Organic" } + th { "Perennial" } + th { "Frost Tolerance" } + } + } + tbody { + for c in data.data.iter() { + tr { + td { + Link { to: Route::CultivarDetail { slug: c.slug.clone() }, + strong { "{c.name}" } + } + } + td { if c.is_organic { "Yes" } else { "-" } } + td { if c.perennial { "Yes" } else { "Annual" } } + td { "{c.frost_tolerance.as_deref().unwrap_or(\"-\")}" } + } + } + } + } + } + if data.total > data.per_page { + div { class: "pagination", + button { + disabled: current_page <= 1, + onclick: move |_| page.set(current_page - 1), + "Previous" + } + span { "Page {current_page}" } + button { + disabled: current_page * data.per_page >= data.total, + onclick: move |_| page.set(current_page + 1), + "Next" + } + } + } + }, + } + } + } +} + +#[component] +pub fn CultivarDetail(slug: String) -> Element { + let slug_clone = slug.clone(); + let cultivar = use_resource(move || { + let s = slug_clone.clone(); + async move { api::get_cultivar(&s).await } + }); + + rsx! { + div { class: "page cultivar-detail", + match &*cultivar.read() { + None => rsx! { p { "Loading..." } }, + Some(Err(e)) => rsx! { p { class: "error", "Error: {e}" } }, + Some(Ok(c)) => rsx! { + h1 { "{c.name}" } + if let Some(ref en) = c.name_en { + p { class: "name-common", "{en}" } + } + if let Some(ref desc) = c.description { + div { class: "description", "{desc}" } + } + + div { class: "badges", + if c.is_organic { + span { class: "badge organic", "Organic" } + } + if c.perennial { + span { class: "badge", "Perennial" } + } + if let Some(ref ft) = c.frost_tolerance { + span { class: "badge", "Frost: {ft}" } + } + } + + if let Some(ref dtg) = c.days_to_germination { + p { "Days to germination: {dtg}" } + } + if let Some(ref gtd) = c.growing_time_days { + p { "Growing time: {gtd} days" } + } + + // Planting calendar + h2 { "Planting Calendar" } + PlantingCalendar { + indoor_sowing: c.indoor_sowing_months.clone(), + direct_sowing: c.direct_sowing_months.clone(), + transplanting: c.transplanting_months.clone(), + glasshouse: c.glasshouse_months.clone(), + harvesting: c.harvesting_months.clone(), + } + + if let Some(ref pg) = c.pollination_group { + p { "Pollination group: {pg}" } + } + if let Some(sf) = c.self_fertile { + if sf { + p { "Self-fertile: Yes" } + } else { + p { "Self-fertile: No" } + } + } + }, + } + } + } +} diff --git a/herbapi-ui/src/pages/families.rs b/herbapi-ui/src/pages/families.rs new file mode 100644 index 0000000..8add23a --- /dev/null +++ b/herbapi-ui/src/pages/families.rs @@ -0,0 +1,140 @@ +use dioxus::prelude::*; + +use crate::api; +use crate::app::Route; + +#[component] +pub fn FamilyList() -> Element { + let mut page = use_signal(|| 1i64); + let mut search = use_signal(|| String::new()); + let current_page = *page.read(); + let search_str = search.read().clone(); + + let families = use_resource(move || { + let s = search_str.clone(); + async move { + let q = if s.is_empty() { None } else { Some(s.as_str()) }; + api::list_families(current_page, q).await + } + }); + + rsx! { + div { class: "page", + h1 { "Plant Families" } + + div { class: "search-bar", + input { + r#type: "text", + placeholder: "Search families...", + value: "{search}", + oninput: move |e| { + search.set(e.value()); + page.set(1); + }, + } + } + + match &*families.read() { + None => rsx! { p { "Loading..." } }, + Some(Err(e)) => rsx! { p { class: "error", "Error: {e}" } }, + Some(Ok(data)) => rsx! { + div { class: "table-wrap", + table { + thead { + tr { + th { "Scientific Name" } + th { "English" } + th { "German" } + } + } + tbody { + for f in data.data.iter() { + tr { + td { + Link { to: Route::FamilyDetail { slug: f.slug.clone() }, + em { "{f.name_scientific}" } + } + } + td { "{f.name_en.as_deref().unwrap_or(\"-\")}" } + td { "{f.name_de.as_deref().unwrap_or(\"-\")}" } + } + } + } + } + } + if data.total > data.per_page { + div { class: "pagination", + button { + disabled: current_page <= 1, + onclick: move |_| page.set(current_page - 1), + "Previous" + } + span { "Page {current_page} of {(data.total + data.per_page - 1) / data.per_page}" } + button { + disabled: current_page * data.per_page >= data.total, + onclick: move |_| page.set(current_page + 1), + "Next" + } + } + } + }, + } + } + } +} + +#[component] +pub fn FamilyDetail(slug: String) -> Element { + let slug_clone = slug.clone(); + let family = use_resource(move || { + let s = slug_clone.clone(); + async move { api::get_family(&s).await } + }); + + let slug_for_species = slug.clone(); + let species = use_resource(move || { + let s = slug_for_species.clone(); + async move { api::list_species(1, Some(&s), None).await } + }); + + rsx! { + div { class: "page", + match &*family.read() { + None => rsx! { p { "Loading..." } }, + Some(Err(e)) => rsx! { p { class: "error", "Error: {e}" } }, + Some(Ok(f)) => rsx! { + h1 { em { "{f.name_scientific}" } } + if let Some(ref en) = f.name_en { + p { class: "name-common", "{en}" } + } + if let Some(ref de) = f.name_de { + p { class: "name-common", "{de}" } + } + if let Some(ref desc) = f.description { + p { "{desc}" } + } + }, + } + + h2 { "Species in this Family" } + match &*species.read() { + None => rsx! { p { "Loading..." } }, + Some(Err(e)) => rsx! { p { class: "error", "Error: {e}" } }, + Some(Ok(data)) => rsx! { + div { class: "card-grid", + for s in data.data.iter() { + div { class: "plant-card", + Link { to: Route::SpeciesDetail { slug: s.slug.clone() }, + em { "{s.name_scientific}" } + } + if let Some(ref en) = s.name_en { + p { class: "card-common", "{en}" } + } + } + } + } + }, + } + } + } +} diff --git a/herbapi-ui/src/pages/home.rs b/herbapi-ui/src/pages/home.rs new file mode 100644 index 0000000..8982776 --- /dev/null +++ b/herbapi-ui/src/pages/home.rs @@ -0,0 +1,52 @@ +use dioxus::prelude::*; + +use crate::api; +use crate::app::Route; +use crate::components::plant_card::PlantCard; + +#[component] +pub fn Home() -> Element { + let mut search_query = use_signal(|| String::new()); + let species = use_resource(|| async { api::list_species(1, None, None).await }); + + rsx! { + div { class: "page home-page", + h1 { "HerbAPI" } + p { class: "subtitle", "Trilingual plant reference database" } + + div { class: "search-bar", + input { + r#type: "text", + placeholder: "Search plants...", + value: "{search_query}", + oninput: move |e| search_query.set(e.value()), + onkeydown: move |e| { + if e.key() == Key::Enter { + let nav = navigator(); + nav.push(Route::SearchPage {}); + } + }, + } + } + + h2 { "Recent Species" } + match &*species.read() { + None => rsx! { p { "Loading..." } }, + Some(Err(e)) => rsx! { p { class: "error", "Error: {e}" } }, + Some(Ok(data)) => rsx! { + div { class: "card-grid", + for s in data.data.iter().take(12) { + PlantCard { + key: "{s.id}", + slug: s.slug.clone(), + name: s.name_scientific.clone(), + name_common: s.name_en.clone(), + entity_type: "species".to_string(), + } + } + } + }, + } + } + } +} diff --git a/herbapi-ui/src/pages/mod.rs b/herbapi-ui/src/pages/mod.rs new file mode 100644 index 0000000..9ae842d --- /dev/null +++ b/herbapi-ui/src/pages/mod.rs @@ -0,0 +1,6 @@ +pub mod cultivars; +pub mod families; +pub mod home; +pub mod search; +pub mod species; +pub mod suppliers; diff --git a/herbapi-ui/src/pages/search.rs b/herbapi-ui/src/pages/search.rs new file mode 100644 index 0000000..c9829e7 --- /dev/null +++ b/herbapi-ui/src/pages/search.rs @@ -0,0 +1,77 @@ +use dioxus::prelude::*; + +use crate::api; +use crate::app::Route; + +#[component] +pub fn SearchPage() -> Element { + let mut query = use_signal(|| String::new()); + let mut results = use_signal(|| None::, String>>); + + let trigger_search = move || { + let q = query.read().clone(); + if !q.is_empty() { + spawn(async move { + let res = api::search(&q, 50).await; + results.set(Some(res)); + }); + } + }; + + rsx! { + div { class: "page search-page", + h1 { "Search" } + + div { class: "search-bar", + input { + r#type: "text", + placeholder: "Search plants, families, cultivars...", + value: "{query}", + oninput: move |e| query.set(e.value()), + onkeydown: move |e| { + if e.key() == Key::Enter { + trigger_search(); + } + }, + } + button { onclick: move |_| trigger_search(), "Search" } + } + + match &*results.read() { + None => rsx! {}, + Some(Err(e)) => rsx! { p { class: "error", "Error: {e}" } }, + Some(Ok(data)) => rsx! { + p { class: "result-count", "{data.len()} results" } + div { class: "search-results", + for r in data.iter() { + div { class: "search-result", + span { class: "result-type badge", "{r.entity_type}" } + match r.entity_type.as_str() { + "family" => rsx! { + Link { to: Route::FamilyDetail { slug: r.slug.clone() }, + em { "{r.name}" } + } + }, + "species" => rsx! { + Link { to: Route::SpeciesDetail { slug: r.slug.clone() }, + em { "{r.name}" } + } + }, + "cultivar" => rsx! { + Link { to: Route::CultivarDetail { slug: r.slug.clone() }, + strong { "{r.name}" } + } + }, + _ => rsx! { span { "{r.name}" } }, + } + if let Some(ref desc) = r.description { + p { class: "result-desc", "{desc}" } + } + } + } + } + }, + } + } + } +} diff --git a/herbapi-ui/src/pages/species.rs b/herbapi-ui/src/pages/species.rs new file mode 100644 index 0000000..5370053 --- /dev/null +++ b/herbapi-ui/src/pages/species.rs @@ -0,0 +1,190 @@ +use dioxus::prelude::*; + +use crate::api; +use crate::app::Route; +use crate::components::plant_card::PlantCard; + +#[component] +pub fn SpeciesList() -> Element { + let mut page = use_signal(|| 1i64); + let mut search = use_signal(|| String::new()); + let current_page = *page.read(); + let search_str = search.read().clone(); + + let species = use_resource(move || { + let s = search_str.clone(); + async move { + let q = if s.is_empty() { None } else { Some(s.as_str()) }; + api::list_species(current_page, None, q).await + } + }); + + rsx! { + div { class: "page", + h1 { "Species" } + + div { class: "search-bar", + input { + r#type: "text", + placeholder: "Search species...", + value: "{search}", + oninput: move |e| { + search.set(e.value()); + page.set(1); + }, + } + } + + match &*species.read() { + None => rsx! { p { "Loading..." } }, + Some(Err(e)) => rsx! { p { class: "error", "Error: {e}" } }, + Some(Ok(data)) => rsx! { + div { class: "card-grid", + for s in data.data.iter() { + PlantCard { + key: "{s.id}", + slug: s.slug.clone(), + name: s.name_scientific.clone(), + name_common: s.name_en.clone(), + entity_type: "species".to_string(), + } + } + } + if data.total > data.per_page { + div { class: "pagination", + button { + disabled: current_page <= 1, + onclick: move |_| page.set(current_page - 1), + "Previous" + } + span { "Page {current_page} of {(data.total + data.per_page - 1) / data.per_page}" } + button { + disabled: current_page * data.per_page >= data.total, + onclick: move |_| page.set(current_page + 1), + "Next" + } + } + } + }, + } + } + } +} + +#[component] +pub fn SpeciesDetail(slug: String) -> Element { + let slug_clone = slug.clone(); + let species = use_resource(move || { + let s = slug_clone.clone(); + async move { api::get_species(&s).await } + }); + + rsx! { + div { class: "page species-detail", + match &*species.read() { + None => rsx! { p { "Loading..." } }, + Some(Err(e)) => rsx! { p { class: "error", "Error: {e}" } }, + Some(Ok(s)) => { + let species_slug = s.slug.clone(); + rsx! { + h1 { em { "{s.name_scientific}" } } + if let Some(ref en) = s.name_en { + p { class: "name-common", "{en}" } + } + if let Some(ref de) = s.name_de { + p { class: "name-common", "{de}" } + } + if let Some(ref desc) = s.description { + div { class: "description", "{desc}" } + } + + // Info grid + div { class: "info-grid", + if let Some(ref layer) = s.plant_layer { + div { class: "info-item", + span { class: "info-label", "Layer" } + span { class: "info-value", "{layer}" } + } + } + if let Some(ref dt) = s.drought_tolerance { + div { class: "info-item", + span { class: "info-label", "Drought Tolerance" } + span { class: "info-value", "{dt}" } + } + } + if let Some(ref hz) = s.hardiness_zone_usda { + div { class: "info-item", + span { class: "info-label", "USDA Zone" } + span { class: "info-value", "{hz}" } + } + } + if let Some(rating) = s.edibility_rating { + div { class: "info-item", + span { class: "info-label", "Edibility" } + span { class: "info-value", "{rating}/5" } + } + } + if let Some(nf) = s.nitrogen_fixer { + if nf { + div { class: "info-item badge", + "Nitrogen Fixer" + } + } + } + if let Some(da) = s.dynamic_accumulator { + if da { + div { class: "info-item badge", + "Dynamic Accumulator" + } + } + } + } + + // Cultivars for this species + h2 { "Cultivars" } + CultivarListForSpecies { species_slug: species_slug } + } + }, + } + } + } +} + +#[component] +fn CultivarListForSpecies(species_slug: String) -> Element { + let slug = species_slug.clone(); + let cultivars = use_resource(move || { + let s = slug.clone(); + async move { api::list_cultivars(1, Some(&s), None).await } + }); + + rsx! { + match &*cultivars.read() { + None => rsx! { p { "Loading..." } }, + Some(Err(e)) => rsx! { p { class: "error", "Error: {e}" } }, + Some(Ok(data)) => { + if data.data.is_empty() { + rsx! { p { class: "empty", "No cultivars yet." } } + } else { + rsx! { + div { class: "card-grid", + for c in data.data.iter() { + div { class: "plant-card", + Link { to: Route::CultivarDetail { slug: c.slug.clone() }, + strong { "{c.name}" } + } + if let Some(ref en) = c.name_en { + p { class: "card-common", "{en}" } + } + if c.is_organic { + span { class: "badge organic", "Organic" } + } + } + } + } + } + } + }, + } + } +} diff --git a/herbapi-ui/src/pages/suppliers.rs b/herbapi-ui/src/pages/suppliers.rs new file mode 100644 index 0000000..03b675c --- /dev/null +++ b/herbapi-ui/src/pages/suppliers.rs @@ -0,0 +1,86 @@ +use dioxus::prelude::*; + +use crate::api; +use crate::app::Route; + +#[component] +pub fn SupplierList() -> Element { + let suppliers = use_resource(|| async { api::list_suppliers().await }); + + rsx! { + div { class: "page", + h1 { "Suppliers" } + + match &*suppliers.read() { + None => rsx! { p { "Loading..." } }, + Some(Err(e)) => rsx! { p { class: "error", "Error: {e}" } }, + Some(Ok(data)) => rsx! { + div { class: "table-wrap", + table { + thead { + tr { + th { "Name" } + th { "Country" } + th { "Organic" } + th { "Demeter" } + } + } + tbody { + for s in data.iter() { + tr { + td { + Link { to: Route::SupplierDetail { slug: s.slug.clone() }, + strong { "{s.name}" } + } + } + td { "{s.country.as_deref().unwrap_or(\"-\")}" } + td { if s.is_organic { "Yes" } else { "-" } } + td { if s.is_demeter { "Yes" } else { "-" } } + } + } + } + } + } + }, + } + } + } +} + +#[component] +pub fn SupplierDetail(slug: String) -> Element { + let slug_clone = slug.clone(); + let supplier = use_resource(move || { + let s = slug_clone.clone(); + async move { api::get_supplier(&s).await } + }); + + rsx! { + div { class: "page", + match &*supplier.read() { + None => rsx! { p { "Loading..." } }, + Some(Err(e)) => rsx! { p { class: "error", "Error: {e}" } }, + Some(Ok(s)) => rsx! { + h1 { "{s.name}" } + if let Some(ref url) = s.url { + p { a { href: "{url}", target: "_blank", "{url}" } } + } + div { class: "badges", + if s.is_organic { + span { class: "badge organic", "Organic" } + } + if s.is_demeter { + span { class: "badge demeter", "Demeter" } + } + if let Some(ref country) = s.country { + span { class: "badge", "{country}" } + } + } + if let Some(ref notes) = s.notes { + p { "{notes}" } + } + }, + } + } + } +} diff --git a/herbapi-ui/src/types.rs b/herbapi-ui/src/types.rs new file mode 100644 index 0000000..badd50b --- /dev/null +++ b/herbapi-ui/src/types.rs @@ -0,0 +1,141 @@ +use chrono::{DateTime, Utc}; +use serde::{Deserialize, Serialize}; +use uuid::Uuid; + +#[derive(Debug, Clone, Deserialize, Serialize)] +pub struct PaginatedResponse { + pub data: Vec, + pub total: i64, + pub page: i64, + pub per_page: i64, +} + +#[derive(Debug, Clone, Deserialize, Serialize)] +pub struct Family { + pub id: Uuid, + pub slug: String, + pub name_scientific: String, + pub name_en: Option, + pub name_de: Option, + pub description: Option, + pub created_at: DateTime, + pub updated_at: DateTime, +} + +#[derive(Debug, Clone, Deserialize, Serialize)] +pub struct Species { + pub id: Uuid, + pub slug: String, + pub family_id: Uuid, + pub name_scientific: String, + pub name_en: Option, + pub name_de: Option, + pub description: Option, + pub soil_moisture: Option, + pub ph_min: Option, + pub ph_max: Option, + pub hardiness_zone_usda: Option, + pub hardiness_zone_at: Option, + pub drought_tolerance: Option, + pub edibility_rating: Option, + pub food_uses: Option, + pub medicinal_uses: Option, + pub other_uses: Option, + pub native_range: Option, + pub plant_layer: Option, + pub nitrogen_fixer: Option, + pub dynamic_accumulator: Option, + pub wikidata_qid: Option, + pub primary_image_key: Option, + pub created_at: DateTime, + pub updated_at: DateTime, +} + +#[derive(Debug, Clone, Deserialize, Serialize)] +pub struct Cultivar { + pub id: Uuid, + pub slug: String, + pub species_id: Uuid, + pub name: String, + pub name_en: Option, + pub name_de: Option, + pub description: Option, + pub is_organic: bool, + pub perennial: bool, + pub growing_time_days: Option, + pub days_to_germination: Option, + pub frost_tolerance: Option, + pub indoor_sowing_months: Option>, + pub direct_sowing_months: Option>, + pub transplanting_months: Option>, + pub glasshouse_months: Option>, + pub harvesting_months: Option>, + pub pollination_group: Option, + pub self_fertile: Option, + pub primary_image_key: Option, + pub created_at: DateTime, + pub updated_at: DateTime, +} + +#[derive(Debug, Clone, Deserialize, Serialize)] +pub struct Supplier { + pub id: Uuid, + pub slug: String, + pub name: String, + pub url: Option, + pub is_organic: bool, + pub is_demeter: bool, + pub country: Option, + pub notes: Option, +} + +#[derive(Debug, Clone, Deserialize, Serialize)] +pub struct CultivarSupplier { + pub id: Uuid, + pub cultivar_id: Uuid, + pub supplier_id: Uuid, + pub article_number: Option, + pub product_url: Option, + pub price_eur: Option, + pub pack_size: Option, + pub pack_unit: Option, +} + +#[derive(Debug, Clone, Deserialize, Serialize)] +pub struct CompanionRelationship { + pub id: Uuid, + pub species_a_id: Uuid, + pub species_b_id: Uuid, + pub relationship: String, + pub mechanism: Option, + pub source_url: Option, +} + +#[derive(Debug, Clone, Deserialize, Serialize)] +pub struct Image { + pub id: Uuid, + pub entity_type: String, + pub entity_id: Uuid, + pub s3_key: String, + pub caption: Option, + pub is_primary: bool, +} + +#[derive(Debug, Clone, Deserialize, Serialize)] +pub struct SearchResult { + pub entity_type: String, + pub id: Uuid, + pub slug: String, + pub name: String, + pub description: Option, + pub rank: f32, +} + +#[derive(Debug, Clone, Deserialize, Serialize)] +pub struct MeResponse { + pub id: Uuid, + pub email: String, + pub name: Option, + pub nickname: Option, + pub admin: bool, +}