
Major architecture cleanup following CLAUDE.md rules: ## Admin Panel Conversion (1843 lines → TypeScript routes) - Remove public/admin/scripts/main.js (direct API calls violation) - Add proper Astro admin routes with TypeScript API endpoints - Add missing admin functions in church-core Rust crate - Update bindings.js to expose new admin functions ## Thumbnail Field Removal - Remove thumbnail upload section from event submission form - Clean up thumbnail-related JavaScript code ## Architecture Compliance Achieved ✅ Frontend → bindings.js → Rust FFI → church-core → API ❌ Frontend → fetch() → External API (eliminated) Files: +13 admin routes, -1843 line JS file, enhanced Rust core
100 lines
1.8 KiB
TOML
100 lines
1.8 KiB
TOML
[package]
|
|
name = "church-core"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
description = "Shared Rust crate for church application APIs and data models"
|
|
authors = ["Benjamin Slingo <benjamin@example.com>"]
|
|
license = "MIT"
|
|
|
|
[dependencies]
|
|
# HTTP client (using rustls to avoid OpenSSL cross-compilation issues)
|
|
reqwest = { version = "0.11", features = ["json", "multipart", "stream", "rustls-tls"], default-features = false }
|
|
tokio = { version = "1.0", features = ["full"] }
|
|
|
|
# JSON handling
|
|
serde = { version = "1.0", features = ["derive"] }
|
|
serde_json = "1.0"
|
|
|
|
# Date/time handling
|
|
chrono = { version = "0.4", features = ["serde"] }
|
|
|
|
# Error handling
|
|
thiserror = "1.0"
|
|
anyhow = "1.0"
|
|
|
|
# Caching and utilities
|
|
moka = { version = "0.12", features = ["future"] }
|
|
async-trait = "0.1"
|
|
rand = "0.8"
|
|
urlencoding = "2.1"
|
|
|
|
# UUID generation
|
|
uuid = { version = "1.0", features = ["v4", "serde"] }
|
|
|
|
# Base64 encoding for image caching
|
|
base64 = "0.21"
|
|
|
|
# URL handling
|
|
url = "2.4"
|
|
|
|
# Regular expressions
|
|
regex = "1.10"
|
|
|
|
# System calls for iOS device detection
|
|
libc = "0.2"
|
|
|
|
# HTML processing
|
|
html2text = "0.12"
|
|
|
|
|
|
|
|
# Testing dependencies
|
|
[dev-dependencies]
|
|
tokio-test = "0.4"
|
|
mockito = "0.31"
|
|
serde_json = "1.0"
|
|
tempfile = "3.8"
|
|
pretty_assertions = "1.4"
|
|
|
|
# Optional FFI support
|
|
[dependencies.wasm-bindgen]
|
|
version = "0.2"
|
|
optional = true
|
|
|
|
[dependencies.wasm-bindgen-futures]
|
|
version = "0.4"
|
|
optional = true
|
|
|
|
[dependencies.js-sys]
|
|
version = "0.3"
|
|
optional = true
|
|
|
|
[dependencies.web-sys]
|
|
version = "0.3"
|
|
optional = true
|
|
features = [
|
|
"console",
|
|
"Window",
|
|
"Document",
|
|
"Element",
|
|
"HtmlElement",
|
|
"Storage",
|
|
"Request",
|
|
"RequestInit",
|
|
"Response",
|
|
"Headers",
|
|
]
|
|
|
|
[features]
|
|
default = ["native"]
|
|
native = []
|
|
wasm = ["wasm-bindgen", "wasm-bindgen-futures", "js-sys", "web-sys"]
|
|
|
|
[lib]
|
|
crate-type = ["cdylib", "staticlib", "rlib"]
|
|
|
|
[[bin]]
|
|
name = "church-core-test"
|
|
path = "src/bin/test.rs"
|
|
|