Skip to content

When to use the studio

gisila_studio is an internal admin, in the spirit of Django admin, for tables defined with gisila_orm. It knows each table from its generated TableMeta (table name, column names, primary key) and asks Postgres for column types, nullability and defaults. From that it renders list, add, edit and delete pages.

  • Operations and support. Staff need to find a record, correct a field, or delete spam without a database client.
  • Early back office. A small app or MVP needs an admin now; a custom one can come later.
  • Development. Browse and seed data while you build.
  • Single trusted admin group. Everyone who signs in is allowed to change every registered table.
Need Use instead
Customers or tenants editing their own data Your own gisila controllers with guards; see the framework section.
Per-user or per-model permissions, multiple admin accounts A custom admin built on gisila controllers, or a custom StudioAuth if you only need different login sources (all signed-in users still get full access).
Editing relations through pickers, inline child rows Not supported; foreign keys are edited as plain values.
File uploads, rich text, JSON editors Not supported; JSON and text columns use a plain textarea.
Custom bulk actions, workflows, audit history Not built in. Bulk delete is the only list action. See Save hooks and custom actions.
Per-column sorting or filters in the list Not supported; lists use the configured ordering and a text search.
Non-Postgres databases or schemas other than public Not supported; column introspection queries information_schema.columns for public.
  • You construct one GisilaStudio with a gisila_orm Database, call register per model, and mount handler(prefix: ...).
  • The studio writes with plain parameterized SQL (INSERT, UPDATE, DELETE) against the table, not through your models or services. Business rules in your services do not run; use onSave hooks for per-column transforms such as hashing.
  • Every page is server-rendered HTML with a little inline JavaScript. The stylesheet imports IBM Plex fonts from Google Fonts.

See How the studio works for the request flow.

A typical setup: the studio next to an API, both in one process.

import 'package:gisila_orm/gisila.dart';
import 'package:gisila_studio/gisila_studio.dart';
import 'package:shelf/shelf.dart';
import 'package:shelf_router/shelf_router.dart';
Router buildRouter(Database db, Handler api) {
final studio = GisilaStudio(db: db, title: 'Shop Admin')
..register<Product>(ProductTable.metadata, group: 'Catalog')
..register<Order>(OrderTable.metadata, group: 'Commerce', ordering: ['-createdAt']);
return Router()
..mount('/admin', studio.handler(prefix: '/admin'))
..mount('/', api);
}