gisila_studio
What it is
Section titled “What it is”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.
Install
Section titled “Install”dependencies: gisila_orm: ^0.2.0 gisila_studio: ^0.3.0 shelf: ^1.4.1 shelf_router: ^1.1.430-second example
Section titled “30-second example”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);}STUDIO_USERNAME=admin STUDIO_PASSWORD='a-long-unique-password' dart run bin/server.dartWhen to use it
Section titled “When to use it”- 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.
When not to use it
Section titled “When not to use it”- 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
publicschema.
See When to use the studio for more detail.
Map of this section
Section titled “Map of this section”ConceptsWhen the studio fits, its security model and how it works.
GuidesAdd an admin, customize lists and forms, secure it, save hooks and custom actions.
ReferenceGisilaStudio, ModelAdmin and the auth classes.
Concepts
Guides