Stack Specification
Section 10

Content & admin flows

From a concept on a sketchbook page to a published artwork in the library. Cultural review is a first‑class step, not an afterthought.

10.1 — Publishing pipeline

flowchart TD A[Artwork concept] —> B[Illustration / vector authoring] B —> C[Region segmentation] C —> D[Palette assignment] D —> E[Bundle generator] E —> F[Validator] F —> G{Valid?} G —>|No| H[Return errors] G —>|Yes| I[Cultural review] I —> J{Approved?} J —>|No| K[Notes back to artist] J —>|Yes| L[Upload to InsForge Storage] L —> M[Create / update metadata] M —> N[Internal preview] N —> O[Publish]

10.2 — Validator checklist

The validator enforces both structural correctness and visual usability. Failures are categorised error (block publish) or warn (require sign‑off).

  • Every path closes correctly
  • Every region has a position index
  • Every region has a colour ID
  • Every colour ID exists in the palette
  • Region count is within performance limits
  • Bounds and label points exist for every region
  • Tiny regions are flagged (< 24 px tap target at 1×)
  • Preview and thumbnail files exist
  • Manifest version is valid
  • Title, category, difficulty, publication state set
  • Adjacent regions don’t overlap or leave gaps
  • Palette colours pass minimum perceptual distance
  • Palette tested against deuteranopia / protanopia simulations

10.3 — Purchase validation

sequenceDiagram participant App participant Fn as validate-purchase participant Store as Apple ASSN v2 / Google Play API participant DB as PostgreSQL App->>Fn: Receipt + product ID + platform Fn->>Store: Validate (JWT signed) Store—>>Fn: Transaction + renewal info Fn->>DB: Insert purchase_receipt Fn->>DB: Upsert entitlement Fn—>>App: Active entitlement