feat: implement filament and spool preset services with CRUD operations

- Add `FilamentService` for managing filament inventory, including creation, retrieval, updating, and deletion of filaments.
- Introduce `SpoolPresetService` for handling spool presets, allowing users to create, update, and delete their custom presets.
- Create domain models for `Filament` and `SpoolPreset` with necessary fields and methods.
- Define repository interfaces for filament and spool preset persistence.
- Implement application configuration management from environment variables.
- Set up error handling with a centralized `AppError` type.
- Build the Axum router with public and protected routes for user authentication and resource management.
This commit is contained in:
2026-03-14 09:38:28 -03:00
parent c90d2f920b
commit abdc2fe8ce
67 changed files with 7832 additions and 0 deletions
+70
View File
@@ -0,0 +1,70 @@
[package]
name = "meowspool-backend"
version = "0.1.0"
edition = "2021"
[[bin]]
name = "meowspool"
path = "src/main.rs"
[dependencies]
# HTTP Framework
axum = { version = "0.7", features = ["macros"] }
tower = "0.4"
tower-http = { version = "0.5", features = ["cors", "trace"] }
# Async Runtime
tokio = { version = "1", features = ["full"] }
# Database
sqlx = { version = "0.8", features = [
"runtime-tokio-rustls",
"postgres",
"uuid",
"time",
"macros",
] }
# Auth
jsonwebtoken = "9"
argon2 = "0.5"
oauth2 = "4"
# Serialization
serde = { version = "1", features = ["derive"] }
serde_json = "1"
# UUID
uuid = { version = "1", features = ["v4", "serde"] }
# Time
time = { version = "0.3", features = ["serde", "serde-well-known"] }
# Errors
thiserror = "1"
anyhow = "1"
# Validation
validator = { version = "0.18", features = ["derive"] }
# Env vars
dotenvy = "0.15"
# Logging / Tracing
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
# HTTP Client (OAuth, Google APIs)
reqwest = { version = "0.12", features = ["json", "rustls-tls"], default-features = false }
# QR Code generation
qrcode = "0.14"
image = "0.25"
base64 = "0.22"
# Async trait
async-trait = "0.1"
[dev-dependencies]
tokio = { version = "1", features = ["full"] }
axum-test = "15"