feat: rewrite website API in Rust — axum, sqlx, Stripe, lettre, argon2, MariaDB
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
[package]
|
||||
name = "nixpanel-website-api"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
# Async runtime
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
|
||||
# Web framework
|
||||
axum = { version = "0.7", features = ["macros", "multipart"] }
|
||||
tower = { version = "0.4" }
|
||||
tower-http = { version = "0.5", features = ["cors", "trace", "limit"] }
|
||||
|
||||
# Database
|
||||
sqlx = { version = "0.7", features = ["runtime-tokio-rustls", "mysql", "uuid", "chrono", "migrate"] }
|
||||
|
||||
# Serialization
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
|
||||
# Auth
|
||||
jsonwebtoken = "9"
|
||||
argon2 = "0.5"
|
||||
|
||||
# IDs / time
|
||||
uuid = { version = "1", features = ["v4", "serde"] }
|
||||
chrono = { version = "0.4", features = ["serde"] }
|
||||
|
||||
# Config / env
|
||||
dotenvy = "0.15"
|
||||
|
||||
# HTTP client (for calling licensing server + Stripe)
|
||||
reqwest = { version = "0.12", features = ["json", "rustls-tls"], default-features = false }
|
||||
|
||||
# Stripe
|
||||
async-stripe = { version = "0.37", default-features = false, features = [
|
||||
"runtime-tokio-hyper-rustls",
|
||||
"checkout",
|
||||
"billing",
|
||||
"webhook",
|
||||
] }
|
||||
|
||||
# Email
|
||||
lettre = { version = "0.11", default-features = false, features = [
|
||||
"smtp-transport",
|
||||
"tokio1-rustls-tls",
|
||||
"builder",
|
||||
] }
|
||||
|
||||
# Error handling
|
||||
thiserror = "1"
|
||||
anyhow = "1"
|
||||
|
||||
# Crypto
|
||||
sha2 = "0.10"
|
||||
hex = "0.4"
|
||||
rand = "0.8"
|
||||
|
||||
# Logging
|
||||
tracing = "1"
|
||||
tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt"] }
|
||||
|
||||
[profile.release]
|
||||
opt-level = 3
|
||||
lto = true
|
||||
codegen-units = 1
|
||||
strip = true
|
||||
Reference in New Issue
Block a user