CI includes a full test-system installation and create-system run on a real DB. Only on Ubuntu server.
Information management systems have administration interfaces. University admin, legal system admin, and so on. The normal database administration UI, like PGAdmin or PocketBase, is almost all the UI you need for the project after you have built the DB, but not quite friendly enough. So why should I then have to spend a month repeating all the MVC from a ERD / DDL that already describes everything that is needed... with a few YAML comments to point the way?
create-system introspects a live PostgreSQL schema and generates a complete, functional and ready, WinterCMS plugin: models, migrations, backend controllers, list/form field definitions, language files, etc. It makes use of the in-built artisan create:model|controller commands and then adds a lot of flavor. The schema is the single source of truth — with optional YAML comments — to control every aspect of the generated output.
- Connects to a PostgreSQL database and reads the schema (tables, columns, foreign keys, constraints, triggers).
- Classifies each table by structural pattern:
ContentTable,PivotTable,SemiPivotTable,CentralTable,ReportTable. - Infers ORM relation types from FK structure (BelongsTo, HasMany, BelongsToMany, etc.).
- Generates a full WinterCMS plugin directory under
plugins/<author>/<name>/. - Optionally commits and pushes the generated plugin via git.
- Optionally generates functional Pentaho Mondrian OLAP reporting cubes from DB views.
# From your WinterCMS root, with the schema already migrated:
/path/to/acorn-create-system myplugin
# Generate all plugins detected in the schema:
/path/to/acorn-create-system all
# Generate and push to git:
/path/to/acorn-create-system myplugin pushgit clone https://github.com/anewholm/create-system /var/www/scripts/acorn-create-system-dir
composer install -d /var/www/scripts/acorn-create-system-dirTable, column, and FK comments in PostgreSQL can contain YAML fragments to control generation. See PATTERNS.md for the full catalogue of patterns and their YAML keys.
-- table comment
COMMENT ON TABLE acorn_calendar_events IS 'table-type: content
label: Event
label_plural: Events';
-- column comment
COMMENT ON COLUMN acorn_calendar_events.name IS 'field-type: text
tab: details';
-- FK comment
COMMENT ON CONSTRAINT event_location_id_fkey ON acorn_calendar_events IS 'type: Xto1
read-only: true';For a table acorn_myapp_widgets the generator produces:
plugins/acorn/myapp/
models/
Widget.php
widget/
columns.yaml
fields.yaml
controllers/
Widgets.php
widgets/
list.htm
update.htm
create.htm
lang/
en/
lang.php
updates/
create_acorn_myapp_widgets_table.php
version.yaml
Plugin.php
PATTERNS.md documents every pattern the tool recognises — table classification, relation type inference, field rendering, OLAP support, and YAML override keys. This is the design reference for extending or modifying the generator.
| OS (LTS) | WinterCMS (target) | Composer | PHP | PostgreSQL |
|---|---|---|---|---|
| Ubuntu 22+ | v1.2+ | 2 | v8.1+ | v15+ |
- anewholm/scripts — setup scripts that install WinterCMS environments for generated plugins
- anewholm/acorn — base module that generated plugins extend
MIT
