The Nodes domain is the backbone of MinMaxHub's content hierarchy. It provides the taxonomy (the tree that organizes all content) and routing (mapping URL slugs to content). Every page in the application -- whether a folder listing or a content page -- is rooted in the node tree.
Core Concepts
Nodes form a tree structure where each node is either a folder or an entity node:
| Kind | Purpose | Has Templates | Accepts Suggestions |
|---|---|---|---|
folder | Organize the tree (e.g., "Classes", "Items") | No | No |
entity | Content pages with layout configuration | Yes | Yes (via entities created under them) |
Root nodes sit at the top of the tree, and children can be nested to arbitrary depth.
Entity Nodes vs. Entities
An entity node defines the template for a category of content (e.g., "Classes" with a template for class stats, features, etc.). Entities are the actual content pages created under that node (e.g., "Bard", "Wizard", "Rogue"), each inheriting the node's layout templates.
URL Structure
Each node has a slugPath that maps directly to its URL. For example:
Code
Slug paths are globally unique for nodes. The system prevents duplicate slugs at the same level of the tree.
Node Fields
| Field | Type | Description |
|---|---|---|
id | UUID | Unique identifier |
parentId | string or null | null for root nodes |
slug | string | Single URL segment (no slashes) |
slugPath | string | Full URL path (e.g., dnd/classes) |
title | string | Display name |
nodeKind | folder or entity | Determines behavior |
status | draft, published, or archived | Lifecycle state |
content | object or null | Optional hero content: imageUrl, imageAlt, description |
templates | array | Entity nodes only: layout configuration for child entities |
configVersion | number | Template generation tracker |
depth | number | 0 = root, increments per level |
childCount | number | Number of immediate children |
createdAt / updatedAt | ISO date | Timestamps |
createdBy / updatedBy | object | { userId, username, photoUrl } |
Status Lifecycle
- Draft -- not visible to the public.
- Published -- visible in the public tree and URL-resolvable.
- Archived -- removed from public view. A node cannot be archived if it has children -- they must be moved or archived first. Archiving frees the slug for reuse.
Template Configuration
Only entity kind nodes can have templates. Templates define the sections (topics) that entities created under this node will have. See the Entities page for details on the layout template structure.
Template validation rules:
orderandtopicKeyvalues must be unique across the template array.singletopics require a component reference.collectionstopics require a rule reference.wrappertopics group child topics and are validated recursively.closedcollection mode requires at least one predefined item.
API Endpoints
| Method | Endpoint | Purpose | Auth |
|---|---|---|---|
GET | /nodes/path/{slugPath+} | Resolve a node by its URL slug | Public |
GET | /nodes/children/{slugPath+} | List immediate children of a node | Public |
GET | /nodes/ancestors/{slugPath+} | Get ancestor chain (breadcrumbs) | Public |
GET | /nodes/{id} | Get node by ID | Required |
GET | /nodes/descendants/{slugPath+} | Get all descendants of a node | Required |
POST | /nodes | Create a new node | Required |
PUT | /nodes/{id}/templates | Update layout templates | Required |
PATCH | /nodes/{id}/archive | Archive a node | Required |
PATCH | /nodes/{id}/content | Update node content (image, description) | Required |