The actix-admin crate aims at creating a web admin interface similar to other admin interfaces (such as flask-admin in python).
Features #
- Async: Builds on sea-orm as the database backend
- Macros generate the required implementations for models
- Authentication: optionally pass authentication handler to implement authentication for views
- Supports custom validation rules
- Searchable attributes can be specified
- Supports custom views, handlers and groups in the Navbar
Example #
Check the examples and run cargo run --example basic
from the root folder for a basic in-memory sqlite version. The admin interface is accessible under localhost:5000/admin/
.
Minimal Cargo.toml #
[package]
name = "actix-admin-example"
description = "An admin interface for actix-web"
version = "0.8.0"
edition = "2021"
[[bin]]
name = "actix-admin-example"
path = "main.rs"
[dependencies]
actix-web = "^4.3.1"
actix-rt = "2.7.0"
actix-multipart = "^0.4.0"
sea-orm = { version = "^1.1", features = [ "sqlx-sqlite", "runtime-actix-native-tls", "macros" ], default-features = true }
chrono = "0.4.23"
tera = "^1.17.1"
serde = "^1.0.152"
serde_derive = "^1.0.152"
actix-admin = "0.8.0"
regex = "1.7.1"