Dynamic Schema Modeling
The GN-Apex Schema Builder provides over 50 specialized field types—ranging from simple text and markdown to complex nested sections, geolocation coordinates, ratings, formulas, and JSON blobs.
“Model complete page architectures, nested component sections, and relational lists with zero SQL migrations.”
Singletons vs Collections
All content in GN-Apex is organized into two primary root primitives:
Singletons (Pages)
Fixed structural models with a 1:1 relationship to a unique URL slug. Ideal for Home, About, Pricing, and Landing pages.
Collections (Repeatables)
Dynamic, queryable lists of items with pagination, sorting, and full-text search. Ideal for Blog Posts, Products, and Authors.
Live Model Inspector
Here is how singletons and collections are modeled and validated:
50+ Field Type Catalog
The Studio groups field types into specialized categories:
| Parameter | Type | Requirement | Description |
|---|---|---|---|
| Page Builder | SECTION, OBJECT, COMPONENT_BLOCK | Optional | Repeatable modular layout blocks that empower editors to build landing pages with custom section ordering. |
| Text & Typography | TEXT_SHORT, TEXT_LONG, RICH_TEXT, SLUG, PASSWORD | Optional | Single-line inputs, textareas, markdown/HTML WYSIWYG editors, URL-safe slug generators, and hashed password fields. |
| Numeric & Metrics | NUMBER, PERCENT, CURRENCY, RATING, SCORE, PROGRESS | Optional | Integer/decimal values, percentage sliders, currency formatting, star ratings (1-5), and 0-100 progress bars. |
| Media & Assets | IMAGE, VIDEO, AUDIO, FILE, DOCUMENT, GALLERY, LOTTIE | Optional | Single files, ordered image galleries, streaming video embeds, audio players, and interactive vector Lottie animations. |
| Choice & Select | BOOLEAN, SELECT, MULTI_SELECT, TAG_SELECT | Optional | True/false toggles, single dropdowns, multiple selection chips, and free-form tag clouds. |
| Relational | REFERENCE, REFERENCE_LIST, ASSET_SELECT | Optional | Cross-document linking to other Singletons or Collection items by unique ID. |
| Data & Structures | KEY_VALUE, MATRIX, SORTABLE_LIST, ARRAY, JSON, CODE | Optional | Arbitrary key-value dictionaries, tabular attribute matrices, syntax-highlighted code editors, and raw JSON blobs. |
| Geographical | LOCATION, COORDINATES, ADDRESS, GEO_JSON, MAP | Optional | Physical street addresses, latitude/longitude coordinate pairs, interactive map embeds, and GeoJSON polygon boundaries. |
| Design & Style | COLOR, GRADIENT, ICON, BLEND_MODE | Optional | Hex/HSL color pickers with palette presets, CSS linear gradient builders, and Lucide icon selectors. |
| AI & Logic | AI_GENERATED, FORMULA, WORKFLOW_STATE, CHART | Optional | Real-time generative text drafting, calculated mathematical formulas, state machine pills, and metric charts. |
Constraint & Validation Engine
Every field can be configured with validation constraints that are enforced both client-side in the Studio and server-side during API writes:
required: true— Blocks saving if the field is empty or undefined.unique: true— Rejects duplicate values across collection records.minLength / maxLength— Enforces character counts for string fields.min / max— Sets numeric boundary limits.pattern: "^[A-Z0-9]+$"— Evaluates regular expressions against input values.
Declarative JSON Schema
Here is an excerpt of a compiled schema document:
| 1 | { |
| 2 | "schemaVersion": "5.0", |
| 3 | "projectId": "prj_clx1a2b3c4d5e6f7g8h9", |
| 4 | "config": { |
| 5 | "siteName": "Kipazi Foods", |
| 6 | "tagline": "Fresh organic farm products" |
| 7 | }, |
| 8 | "pages": [ |
| 9 | { |
| 10 | "id": "node_home", |
| 11 | "apiKey": "home", |
| 12 | "name": "Home Page", |
| 13 | "type": "SINGLETON", |
| 14 | "fields": [ |
| 15 | { |
| 16 | "id": "f_1", |
| 17 | "name": "hero_title", |
| 18 | "label": "Hero Title", |
| 19 | "type": "TEXT_SHORT", |
| 20 | "validation": { "required": true, "maxLength": 80 } |
| 21 | }, |
| 22 | { |
| 23 | "id": "f_2", |
| 24 | "name": "hero_image", |
| 25 | "label": "Hero Image", |
| 26 | "type": "IMAGE", |
| 27 | "validation": { "required": true } |
| 28 | } |
| 29 | ] |
| 30 | } |
| 31 | ], |
| 32 | "collections": [ |
| 33 | { |
| 34 | "id": "node_products", |
| 35 | "apiKey": "products", |
| 36 | "name": "Product Catalog", |
| 37 | "type": "COLLECTION", |
| 38 | "fields": [ |
| 39 | { |
| 40 | "id": "f_3", |
| 41 | "name": "name", |
| 42 | "label": "Product Name", |
| 43 | "type": "TEXT_SHORT", |
| 44 | "validation": { "required": true } |
| 45 | }, |
| 46 | { |
| 47 | "id": "f_4", |
| 48 | "name": "price", |
| 49 | "label": "Base Price", |
| 50 | "type": "CURRENCY", |
| 51 | "validation": { "required": true, "min": 0 } |
| 52 | } |
| 53 | ] |
| 54 | } |
| 55 | ] |
| 56 | } |