adminx
A framework-neutral admin-panel framework for Rust. Define a resource once and serve it over Actix Web or Axum, backed by PostgreSQL / MySQL / SQLite (SeaORM) or MongoDB — with auto CRUD, a rendered HTML admin UI, JWT-cookie auth, and RBAC.
This crate is a thin facade: it re-exports the neutral core plus whichever
framework and storage adapters you enable via Cargo features, so you depend on a
single crate and type adminx::… everywhere.
[]
# Axum + PostgreSQL/MySQL/SQLite:
= { = "2", = ["axum", "seaorm"] }
# Actix + MongoDB:
# adminx = { version = "2", features = ["actix", "mongo"] }
= { = "1", = ["full"] }
= "0.8" # or actix-web = "4"
= "1"
= "0.1"
Feature flags — frameworks: actix, axum; storage: seaorm, mongo.
Pick one of each. Crates you don't select are never compiled.
Usage
use *; // Resource, ReqCtx, ApiResponse, auth, ...
use async_trait;
;
async
On Actix, the only difference is the server: mount adminx::actix::scope() on
your App. On MongoDB, call adminx::mongo::init(uri, db) and set
fn primary_key(&self) -> &'static str { "_id" } on your resources.
What you get per resource
- REST/JSON API —
GET/POST /adminx/{base}/api,GET/PUT/DELETE /adminx/{base}/api/{id} - HTML admin UI — dashboard, list (with pagination/sort), create/edit forms, detail view
- Auth + RBAC —
configure_auth(..), JWT-in-cookie login, role-gated routes - Custom actions and CSV/JSON export
See the workspace README for the full guide, architecture, and the runnable demo.
Versioning
adminx 2.x is the framework-neutral redesign. The 1.x line was a monolithic
Actix + MongoDB crate; 2.x supersedes it and is not API-compatible.
License
MIT