2022-10-24 19:15:52 +02:00
---
2023-01-17 12:08:24 +01:00
title: ""
date: 2023-01-17T11:44:56+01:00
draft: false
2022-10-24 19:15:52 +02:00
---
The actix-admin crate aims at creating a web admin interface similar to other admin interfaces (such as [flask-admin ](https://github.com/flask-admin/flask-admin ) in python).
## Features
2022-11-08 17:10:27 +01:00
1. Async: Builds on [sea-orm ](https://crates.io/crates/sea-orm ) as the database backend
2. Macros generate the required implementations for models
2022-10-24 19:15:52 +02:00
3. Authentication: optionally pass authentication handler to implement authentication for views
4. Supports custom validation rules
5. Searchable attributes can be specified
2022-11-08 17:10:27 +01:00
6. Supports custom views, handlers and groups in the Navbar
2022-10-24 19:15:52 +02:00
2022-10-24 20:09:59 +02:00
## Example
2023-03-20 17:42:10 +01:00
Check the [examples ](https://github.com/mgugger/actix-admin/tree/main/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
```toml
[package]
name = "actix-admin-example"
description = "An admin interface for actix-web"
2023-07-04 19:49:26 +02:00
version = "0.5.0"
2023-03-20 17:42:10 +01:00
edition = "2021"
[[bin]]
name = "actix-admin-example"
path = "main.rs"
[dependencies]
2023-06-15 11:33:08 +02:00
actix-web = "^4.3.1"
2023-03-20 17:42:10 +01:00
actix-rt = "2.7.0"
actix-multipart = "^0.4.0"
2023-06-15 11:33:08 +02:00
sea-orm = { version = "^0.11.3", features = [ "sqlx-sqlite", "runtime-actix-native-tls", "macros" ], default-features = true }
2023-03-20 17:42:10 +01:00
chrono = "0.4.23"
tera = "^1.17.1"
serde = "^1.0.152"
serde_derive = "^1.0.152"
2023-07-05 21:04:03 +02:00
actix-admin = "0.5.0"
2023-03-20 17:42:10 +01:00
regex = "1.7.1"
```