Site ↗
Documentation sections
Start · 0.8.1

Knowledge base: sections, articles and publishing

A step-by-step model, Markdown editor, relationships, search and published-content access example.

On this page

Build a knowledge base with sections and articles. In the generated admin, an author can select a section, write text and change publication status. Connect the public website separately: generated record operations do not automatically expose drafts to visitors.

First initialize the project and start Generator UI. This example uses English technical names; user-facing labels can be written in Russian.

1. Create a module and section

In Content, click New module and create content. Select New entity in that module, with name Section, kind persistent, module content and table sections.

Use Add field:

Field Type selection Settings
id Identifier int64 Primary key with generated values; not entered by the author.
title String Section name, such as Guides.
slug String Stable URL name, Unique; for example guides.
position Integer/Number Section order. Enter it explicitly.

The Identifier preset configures the primary key and supported value generation together. A regular Number field remains a number and does not automatically become an identifier.

For title and slug, open Basic settings → Values and validation and enable Required. Check Unique for slug: section URLs must not repeat. Nullable separately allows NULL, the absence of a database value; this differs from requiring a nonempty string. Relation/image requirements use one coordinated setting. After Finish, check properties in the fields table.

2. Create an article

Create a persistent Article entity with table articles. Add id with the same Identifier preset, then the remaining fields:

Field Type Purpose
title String Article heading.
slug String Unique URL that does not change when the title is edited.
summary Text Short description for the list.
body Text Full article Markdown.
status Enum Values draft,published,archived, in that order.
position Integer/Number Order within the section.

For body, select Presentation → Markdown. The article form will have a visual editor and source mode. Text controls long-string storage; Presentation controls editing. This is sufficient for a regular article; a custom editor is needed for special requirements. Do not add required hashes or source revisions to an author's form unless the application fills them automatically.

3. Link the article to a section

In Article, click Create relation → Many-to-one. Set target Section, field name sectionId, a required reference and display field Section.title. Authors can then choose sections by name.

After Finish, the foreign-key field and its owning relationship appear. Enable an inverse view to display articles inside a section: it uses the same relationship without a second foreign key. See relationship details.

4. Check access and generation

Open Entity settings → Access → Entity CRUD access and retain the necessary admin operations. For a public website, enable only the required external List/Get operations. In External READ access, add status equal published: this server rule excludes drafts. Having an Enum alone imposes no restriction. External access can remain off until you have a website. Resulting API addresses appear in Generated routes. Continue with website integration through the standard external API.

In Generate, review the plan, conflicts and routes, then apply changes. Start the application with make dev. On first startup, create a superadmin at the terminal prompt.

5. Check the editor

In the generated admin, create a Section, then an Article. Select its section and fill slug, title, body, status and position. Save and reopen the record to confirm persistence.

Create another article and open the list. To control ordering, return to Generator UI: enable List behavior → Sortable for position, Searchable for title, and Filterable if needed. Generate and update the application. Search, filters and sorting run on the server. Change status in the admin to publish; the website receives only records matching the external read rule.

Optional: CLI

For scripts, build the same model through CLI: entities, fields, relationships. Use the interface for step-by-step configuration.

Example step references

For all parameters, see entities, fields, relationships, access, virtual entities. These references explain individual settings without repeating the example.