The Svelte admin UI

dibs includes an autogenerated admin UI built with Svelte that gives you a full CRUD interface for your schema.

Screenshots coming soon.

What it provides

The admin UI automatically creates:

  • List views for each table with pagination and sorting
  • Detail views showing individual records
  • Create/edit forms with appropriate input types based on column metadata
  • Relationship navigation following foreign keys
  • Search and filtering based on your schema

UI attributes

Remember those admin UI attributes from the schema guide? Here's where they shine:

rust
#[derive(Facet)]
#[facet(dibs::table = "products")]
#[facet(dibs::icon = "package")]  // Shows a package icon in the UI
pub struct Product {
    #[facet(dibs::pk)]
    pub id: i64,

    #[facet(dibs::unique)]
    #[facet(dibs::subtype = "slug")]  // Renders as a slug input
    pub handle: String,

    #[facet(dibs::label)]  // Used as the display name for this record
    pub title: String,

    #[facet(dibs::long)]  // Renders as a textarea
    pub description: String,

    #[facet(dibs::lang = "markdown")]  // Syntax highlighting for markdown
    pub body: String,
}

Running the admin UI

Documentation for deploying and running the admin UI will be added here.