A Rust-based admin system using Poem web framework.
- JWT-based authentication system
- Role-based access control with Casbin
- PostgreSQL database with SQLx
- User, role, and organization management
- Operation logging
- RESTful API with Poem framework
- Rust 1.75+
- PostgreSQL 14+
- Docker (for integration tests)
- Clone the repository:
git clone [email protected]:fan-tastic-z/poem-admin.gitSet up the database:
# Create database and run migrations
cargo install sqlx-cli --no-default-features --features postgres
./scripts/init_db.shInit base data:
cargo run --bin poem-admin init-data -c ./dev/config.tomlCreate super user
cargo run --bin poem-admin create-super-user -c ./dev/config.toml -p 12345678Start server
cargo run --bin poem-admin server -c ./dev/config.tomlI use AI generate front-end code
git clone [email protected]:fan-tastic-z/admin-web.gitStart front-end
pnpm devcargo test --lib# Requires Docker to be running
cargo test --test integration_tests
cargo test --test api_integration_testsThis project is licensed under the MIT License - see the LICENSE file for details.