Skip to content

gisila_studio

gisila_studio gives you a browser admin for your gisila_orm tables: a dashboard, paginated and searchable lists, add and edit forms, delete pages and bulk delete. You register each model’s generated TableMeta, and the studio builds the UI from it and from the live Postgres schema. It is a single Shelf Handler, so you mount it on any router. There is no frontend build step; pages are server-rendered HTML.

pubspec.yaml
dependencies:
gisila_orm: ^0.2.0
gisila_studio: ^0.3.0
shelf: ^1.4.1
shelf_router: ^1.1.4
import 'package:gisila_orm/gisila.dart';
import 'package:gisila_studio/gisila_studio.dart';
import 'package:shelf/shelf_io.dart' as io;
import 'package:shelf_router/shelf_router.dart';
import 'models/blog.gisila.g.dart'; // generated by gisila_orm
Future<void> main() async {
final db = await Database.connect(await DatabaseConfig.fromFile('database.yaml'));
// Credentials come from STUDIO_USERNAME / STUDIO_PASSWORD (and STUDIO_SECRET).
final studio = GisilaStudio(db: db, title: 'Blog Admin');
studio.register<User>(
UserTable.metadata,
listDisplay: ['id', 'firstName', 'email', 'dateJoined'],
searchFields: ['firstName', 'email'],
readonlyFields: ['id', 'dateJoined'],
ordering: ['-dateJoined'],
);
final router = Router()
..mount('/admin', studio.handler(prefix: '/admin'));
await io.serve(router.call, 'localhost', 8080);
}
8080/admin/
STUDIO_USERNAME=admin STUDIO_PASSWORD='a-long-unique-password' dart run bin/server.dart
  • Your team needs to look up, fix or create rows in production or staging without SQL access.
  • You want a back office for a small app or an MVP, before building a dedicated one.
  • You want a quick data browser during development.
  • End users (customers) need to manage their own data. The studio has a single admin login with full read/write access to every registered table and no per-user permissions.
  • You need workflows: approvals, custom actions beyond delete, relationship editing, file uploads, audit logs. Build those as gisila controllers.
  • Your database is not Postgres, or your tables are outside the public schema.

See When to use the studio for more detail.

Concepts

Guides