Backend: - routes/databases.rs: full CRUD for MariaDB databases + users - mysql -u root via stdin pipe (unix socket auth, API runs as root) - cPanel-style naming: username_dbname / username_dbuser - Identifier validation (alphanumeric + underscore only) - Password escaping for mysql string literals - Safety guard: refuses to drop DBs without account prefix - GET /api/databases (admin all), GET /api/databases/:username (per-account) - POST /api/databases (create DB + user + GRANT ALL + nixpanel record) - DELETE /api/databases/name/:db_name (drop DB + user + nixpanel record) - routes/mod.rs: add databases module - main.rs: register database routes NixServer: - DatabaseManager page: table across all accounts, create form with account selector + live name preview, drop with confirmation modal NixClient: - MySQLDatabases page: per-account view, create form with password confirm + connection-details card, drop with confirmation modal - api.ts: listMyDatabases, createDatabase, deleteDatabase CHANGELOG.md: v0.4.0-alpha entry Cargo.toml: version bump 0.3.0-alpha -> 0.4.0-alpha
31 lines
835 B
TOML
31 lines
835 B
TOML
[package]
|
|
name = "nixpanel"
|
|
version = "0.4.0-alpha"
|
|
edition = "2021"
|
|
|
|
[[bin]]
|
|
name = "nixpanel"
|
|
path = "src/main.rs"
|
|
|
|
[dependencies]
|
|
nixpanel-common = { path = "../nixpanel-common" }
|
|
|
|
axum = { version = "0.7", features = ["macros"] }
|
|
tokio = { version = "1", features = ["full"] }
|
|
tower-http = { version = "0.5", features = ["cors"] }
|
|
|
|
sqlx = { version = "0.7", features = ["mysql", "runtime-tokio-rustls", "chrono"] }
|
|
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
|
|
jsonwebtoken = "9"
|
|
argon2 = { version = "0.5", features = ["std"] }
|
|
|
|
tracing = "0.1"
|
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
|
dotenvy = "0.15"
|
|
chrono = { version = "0.4", features = ["serde"] }
|
|
thiserror = "1"
|
|
anyhow = "1"
|