Skip to content

Repository files navigation

axum-admin

Rust License: MIT

An extensible Rust full-stack admin foundation for internal tools, SaaS consoles, and B2B operations. It pairs an Axum + SQLx + PostgreSQL API with a React + Vite Admin Console.

Live Demo · Quick Start · IAM Architecture · Swagger UI

Deploy existing projects with Vercel

axum-admin dashboard

Features

  • Axum REST API with SQLx, PostgreSQL, OpenAPI, and Swagger UI
  • React Admin Console with Vite, TanStack Query, TanStack Table, and shadcn/ui on Base UI
  • Authentication and IAM with users, roles, menus, page access, and concrete permissions
  • Departments, parameters, dictionaries, managed OpenDAL storage, files, profiles, and structured audit events
  • Separate API and Admin Console deployment projects on Vercel

Demo

These credentials are for the public demo only. Do not reuse them elsewhere.

Screenshots

Login

Dashboard

User management

Page and permission access catalog

Quick Start

You need the Rust toolchain pinned in rust-toolchain.toml, Node.js with pnpm, PostgreSQL, and Redis 8 or newer. Create the PostgreSQL database configured by DATABASE_URL, then start PostgreSQL and Redis.

cp .env.example .env
cargo run -p ava init
cargo run -p ava serve

In another terminal:

cd apps/desktop
pnpm install
pnpm dev

Open http://127.0.0.1:5173 and sign in with the ADMIN_USERNAME / ADMIN_PASSWORD values from .env. The API defaults to http://127.0.0.1:3000/api; override it with VITE_API_BASE_URL when needed.

File storage

The base schema and seed data create a default local OpenDAL storage rooted at ./uploads. Operators with the corresponding permissions can manage local and S3-compatible backends from System → Storages, enable or disable a backend, and switch the upload default without restarting the API.

Storage settings are stored in PostgreSQL and managed through the Admin Console or /api/storages. S3 access and secret keys are stored as plain text but are never returned by the API. The public base URL must map to the configured root path; uploaded file responses append the generated object name to that URL. See File storage architecture.

Deployment

The API and Admin Console deploy as separate Vercel projects. Configure the backend with the S3 storage driver because Vercel Functions do not provide durable local upload storage.

  • Maintainers: use the Deploy existing projects workflow.
  • New projects: use the deploy buttons below, then point VITE_API_BASE_URL at the deployed API URL with the /api suffix.

Backend:

Deploy with Vercel

Frontend:

Deploy with Vercel

See Vercel deployment for project settings, required secrets, and workflow behavior.

Architecture

apps/ava           CLI and backend composition root
apps/desktop       React/Vite Admin Console
crates/api         Axum HTTP adapter
crates/audit       business and security audit events
crates/auth        password, token, and captcha helpers
crates/db          database connection and migrations
crates/file-storage
crates/iam         accounts, roles, menus, and access control
crates/metadata    parameters and dictionaries
migrations         SQLx migrations

Successful API responses use a shared envelope:

{
  "code": "OK",
  "message": "ok",
  "data": {}
}

Development

cargo test --workspace
cd apps/desktop && pnpm test && pnpm build

The previous Vue 3 + Tauri is available in the v1.1.0.

Product layout and navigation patterns borrow ideas from gin-vue-admin. This repository is a separate Rust + React.

License

About

A full-stack admin system built with Axum, React, PostgreSQL, and Redis, featuring IAM, audit logs, file management, and Vercel deployment.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages