| Crates.io | devui |
| lib.rs | devui |
| version | 0.1.1 |
| created_at | 2025-10-31 13:18:24.943031+00 |
| updated_at | 2025-11-12 20:14:20.089742+00 |
| description | A comprehensive development tools UI library |
| homepage | https://github.com/omprakashsridharan/devui |
| repository | https://github.com/omprakashsridharan/devui |
| max_upload_size | |
| id | 1910017 |
| size | 3,269,853 |
An Axum router that adds a /dev/ui route to your Axum application, serving a React-based development tools interface.
The DevUI home page provides an overview of all available development tools and services.

Browse and explore database tables with automatic schema discovery. View table relationships, column types, and foreign key constraints.

View table data with advanced filtering, pagination, and foreign key navigation. Supports all PostgreSQL data types.

Add devui to your project dependencies:
[dependencies]
devui = "0.0" # Check https://crates.io/crates/devui for the latest version
axum = "0.8"
tokio = { version = "1.0", features = ["full"] }
tower-http = { version = "0.6", features = ["cors"] }
tracing-subscriber = "0.3"
Note: Use
devui = "0.0"to automatically get the latest patch version (0.0.x), or specify an exact version likedevui = "0.0.1". Check crates.io/crates/devui for the latest available version.
Import the necessary types and register the DevUI router in your Axum application:
use axum::{response::Html, routing::get, Router};
use devui::{
dev_ui_router, DevUIConfigBuilder, PostgresConfig, SqlConfig,
};
use tower_http::cors::CorsLayer;
#[tokio::main]
async fn main() {
// Initialize tracing
tracing_subscriber::fmt::init();
// Configure SQL databases (optional)
let sql_config = SqlConfig::new()
.with_postgres(
"my-database".to_string(),
PostgresConfig {
host: "localhost".to_string(),
port: 5432,
database: "mydb".to_string(),
username: "postgres".to_string(),
password: "password".to_string(),
ssl_mode: Some("disable".to_string()),
},
);
// Build DevUI configuration
let dev_ui_config = DevUIConfigBuilder::default()
.sql_config(sql_config)
.build()
.expect("Error building dev ui config");
// Create DevUI router
let dev_ui_router = dev_ui_router(dev_ui_config)
.await
.expect("error constructing dev_ui_router");
// Create your main application router
let app = Router::new()
.route("/", get(|| async {
Html("<h1>Welcome to My App!</h1><p>Visit <a href='/dev/ui'>/dev/ui</a> for development tools.</p>")
}))
// Nest the DevUI router at /dev/ui
.nest("/dev/ui", dev_ui_router)
.layer(CorsLayer::permissive());
// Start the server
let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await.unwrap();
println!("π Server starting on http://localhost:3000");
println!("π οΈ DevUI: http://localhost:3000/dev/ui");
axum::serve(listener, app).await.unwrap();
}
Once your server is running, visit:
The project includes a complete example with a sample PostgreSQL database. Follow these steps:
The example uses a Docker Compose setup with PostgreSQL containing sample relational data:
# Navigate to the standalone example directory
cd standalone-example
# Start PostgreSQL with sample data
docker-compose up -d
# Verify the database is running
docker-compose ps
The database will be initialized with:
devui_sample_dbdevui_userdevui_password5432Sample tables include:
users - User accounts with email and profile informationproducts - Product catalog with categoriescategories - Hierarchical category structureorders - Customer ordersorder_items - Order line items (junction table)All tables contain sample data with proper foreign key relationships.
# Run the example server (from standalone-example directory)
cargo run
The server will start on http://localhost:3000 with:
//dev/ui/dev/ui/sqlWhen you're done, stop the database:
# Stop and remove containers (from standalone-example directory)
docker-compose down
# Remove volumes (optional - removes all data)
docker-compose down -v
The dev_ui_router function:
/dev/ui routes/dev/ui (assets embedded at compile time)/dev/ui/apiThe React frontend is embedded into the Rust binary at compile time using rust_embed. This means:
frontend/dist directory at runtimefrontend/dist folder is included in the published crate sourceβββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β HTTP Request βββββΆβ Axum Router βββββΆβ DevUI Router β
βββββββββββββββββββ β (Your App) β β (/dev/ui) β
ββββββββββββββββββββ βββββββββββββββββββ
β β
β βΌ
β ββββββββββββββββββββ
β β React SPA β
β β + API endpoints β
β ββββββββββββββββββββ
β
βΌ
ββββββββββββββββββββ
β Your Routes β
ββββββββββββββββββββ
Comprehensive PostgreSQL database management - Explore, query, and manage PostgreSQL databases with a rich set of features:
π See full PostgreSQL features documentation
The interface is designed to be extensible with tools like:
MIT