MinMaxHub
Documentation
  • Introduction
  • Architecture
  • Frontend
Domains
  • Nodes
  • Entities
  • Consensus
  • Suggestions
Resources
  • API Reference

Copyright 2026 MinMaxHub

  • Documentation
  • Domains
  • API Reference
NodesEntitiesSuggestionsVotesConsensusUsersRulesMedia
powered by Zudoku
Domains

Suggestions

The Suggestions domain implements the "Chaos" half of the architecture. It captures competing user inputs -- proposed content changes that the community evaluates through voting. Every suggestion is validated against a JSON Schema before storage, enforcing data integrity.

How Suggestions Work

A suggestion proposes a value for a specific section of an entity page. Unlike collaborative editors that track character-by-character patches, MinMaxHub uses atomic object replacement: a suggestion provides the entire value for a section (e.g., the complete stats block for a spell), validated as a whole before storage.

Targeting

Every suggestion has precise coordinates:

CoordinateFieldExample
PageentityId"Fireball" entity
SectiontopicKey"stats-block" layout section
ItemitemKey"spell-fireball" for collections, null for singletons

Operations

OperationTargetDescription
SETSingletonReplace the content of a single section
ADDCollectionPropose adding a new item to a list
UPDATECollectionPropose changing an existing item
DELETECollectionPropose removing an item (no value needed)

Validation

Every non-DELETE suggestion is validated before storage:

  1. The entity's layout is checked to find the targeted topic.
  2. The appropriate JSON Schema rule is resolved.
  3. The submitted value is validated against the schema.
  4. If the collection uses "closed" mode, only predefined item keys are accepted.
  5. If the item has locked fields, submitted values must match the defaults for those fields.

Invalid suggestions are rejected with detailed error messages.

Suggestion Lifecycle

Code
Submission --> Validation --> Storage (active) --> Voting --> Consensus --> Merge
  1. User submits a suggestion.
  2. System validates against the entity layout and JSON Schema.
  3. Stored with active status and a score of 0.
  4. Community casts votes, updating scores.
  5. Consensus computation ranks suggestions by Wilson Score.
  6. The winning suggestion's status becomes merged.

Suggestion Fields

FieldTypeDescription
suggestionIdUUIDUnique identifier
authorIdstringUser who created the suggestion
entityIdstringTarget entity
topicKeystringTarget layout section
itemKeystring or nullTarget item (null for singletons)
operationSET, ADD, UPDATE, or DELETEOperation type
valueobjectSchema-validated content
statusactive, rejected, merged, spam, or deletedLifecycle state
scorenumberWilson Score
upvotes / downvotesnumberVote tallies
createdAt / updatedAtISO dateTimestamps
createdBy / updatedByobject{ userId, username, photoUrl }

Editing and Deletion

  • Only the original author can update a suggestion's value. Updated values are re-validated against the schema.
  • Only the original author can delete their suggestion. Deletion is a soft operation -- the suggestion is marked as deleted with a timestamp, preserving the audit trail.

API Endpoints

MethodEndpointPurposeAuth
GET/suggestions?entityId={id}List suggestions for an entityRequired
GET/suggestions/{suggestionId}Get a single suggestionRequired
GET/suggestions/target?entityId={id}&topicKey={key}&itemKey={key}Get competing suggestions for a targetRequired
GET/suggestions/author/{userId}Get a user's suggestionsRequired
POST/suggestionsCreate a new suggestionRequired
PATCH/suggestions/{suggestionId}Update a suggestion's valueRequired
DELETE/suggestions/{suggestionId}Soft-delete a suggestionRequired
Last modified on April 2, 2026
EntitiesVotes
On this page
  • How Suggestions Work
    • Targeting
    • Operations
  • Validation
  • Suggestion Lifecycle
  • Suggestion Fields
  • Editing and Deletion
  • API Endpoints