Files
corrosion-admin-panel/backend/Cargo.toml
Vantz Stockwell 18da1838c4
All checks were successful
Test Asgard Runner / test (push) Successful in 2s
feat: Implement Phase 4 module licensing backend
Build complete module activation and license-module binding system with
marketplace catalog, purchase tracking, and installation status monitoring.

Database schema (migration 009):
- modules table — Registry with pricing, features, plugin URLs
- module_purchases — License-module ownership with transaction logging
- module_installations — Deployment status tracking
- Seed data: Loot Manager module ($9.99)

Backend implementation:
- Domain models with rust_decimal pricing support
- 11 data access functions (catalog, ownership, purchases, installation)
- 5 REST endpoints with JWT auth and license scoping
- Multi-tenant enforcement via license_id from claims

Purchase flow stub:
- Immediate purchase recording without payment gateway
- PayPal integration deferred to XO's direct implementation
- Transaction ID and amount fields ready for real gateway

Module installation:
- Integration with ModuleInstaller service
- NATS-based deployment to companion agent
- Real-time status tracking via polling endpoint

All queries compile-time verified. Zero cross-tenant exposure.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-15 14:51:04 -05:00

84 lines
1.9 KiB
TOML

[package]
name = "corrosion-api"
version = "0.1.0"
edition = "2021"
description = "Corrosion — Rust Server Management Platform API"
license = "Proprietary"
[dependencies]
# Web framework
axum = { version = "0.8", features = ["macros", "multipart", "ws"] }
axum-extra = { version = "0.10", features = ["typed-header"] }
tower = "0.5"
tower-http = { version = "0.6", features = ["cors", "trace", "limit", "fs"] }
hyper = { version = "1", features = ["full"] }
# Async runtime
tokio = { version = "1", features = ["full"] }
futures = "0.3"
# Database
sqlx = { version = "0.8", features = ["runtime-tokio-rustls", "postgres", "uuid", "chrono", "json", "migrate"] }
rust_decimal = { version = "1", features = ["serde"] }
# Messaging
async-nats = "0.38"
# Serialization
serde = { version = "1", features = ["derive"] }
serde_json = "1"
# Auth
jsonwebtoken = "9"
argon2 = "0.5"
totp-rs = { version = "5", features = ["qr", "gen_secret"] }
# Encryption
aes-gcm = "0.10"
hmac = "0.12"
sha2 = "0.10"
base64 = "0.22"
rand = "0.8"
# HTTP client (panel APIs, Cloudflare, Steam, PayPal)
reqwest = { version = "0.12", features = ["json", "rustls-tls"], default-features = false }
# Email
lettre = { version = "0.11", default-features = false, features = ["tokio1", "tokio1-rustls-tls", "builder", "hostname", "pool", "smtp-transport"] }
# Scheduling
tokio-cron-scheduler = "0.13"
cron = "0.12"
# Logging
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
# UUID
uuid = { version = "1", features = ["v4", "serde"] }
# Date/time
chrono = { version = "0.4", features = ["serde"] }
# Config
dotenvy = "0.15"
# Error handling
thiserror = "2"
anyhow = "1"
# Async trait support
async-trait = "0.1"
# Hex encoding
hex = "0.4"
# HTTP types
http = "1"
# Byte buffers (used by NATS bridge)
bytes = "1"
# URL encoding (used by Pterodactyl adapter)
urlencoding = "2"