The map model
Your map.ts or map.json exports one OnboardingMap object. The full TypeScript type is in
src/core/model.ts; this page explains the fields. For the idea behind each part, see
How it works. npx onboarding-map schema prints the JSON Schema.
Top level
Section titled “Top level”| Field | Required | Holds |
|---|---|---|
$schema | no | Schema reference for editors. Ignored by the renderer. |
id | no | Stable name, used to keep a learner’s progress apart from other maps. Defaults to the title. |
version | yes | The map’s own version. Bump minor for content, patch for fixes. |
title | yes | The map’s title. |
motto | yes | One line under the title. |
labels | no | Interface copy; anything left out uses the English defaults. |
goal | no | The finished thing the journey builds. A map without a goal still works as a plain journey. |
assistant | no | Settings for the agent that helps learners along the route; on unless enabled: false. See the assistant. |
kinds | yes | The kinds of item this map uses (category is built in). |
periods | no | Names for the groups stages fall into (a day, a week). |
documents | no | The source documents that refs point at. |
domains | yes | The regions of the map. |
nodes | yes | Every item. |
edges | yes | Cross-links outside the category tree. |
stages | yes | The journey, in order. |
The territory
Section titled “The territory”kinds/KindDefname the subject-specific items, such as atool,laworconcept. Each definition has anid, singularlabel,pluralanddescription. The built-in kindcategorygroups items; do not define it yourself.domains/Domainare the map regions. Give each anid,label, one-linetagline, a clockwiseorder(starting at 0) and a hexcolor.summaryandshortLabelare optional.nodes/MapNodeare the categories and subject items. Every node has anid,label,domain,kind,statusandsummary. Every non-category item needs aparentcategory.statusispath,contextoralternative; route items also name theirstage, and alternatives name the path item inalternativeTo. Optional fields adddocs, sourcerefs,variants, displaydetail, arevealstage andtags.edges/MapEdgeadd cross-links outside the parent/category tree:from,to,kindand optional displaylabel.
The journey
Section titled “The journey”periods/Periodgroup stages, for example into days or weeks. Each has a numericperiod, atitleand optionalsummary.stages/Stagemake up the route. A stage has anid,period,order,title, first-personfeeling,task,waypoints,do,observe,readand acheckpoint. Optionaldeliversandcontributesconnect it to goal modules;bridgeexplains its place in the goal.- A
Stepis a string, or{ text, tip?, tipKind?: 'copy'|'reveal', note?, nodes? }. Atipadds a prompt, hint or answer;notegives the learner a place to write;nodeslink the step to map items. goal/Goaldescribes the finished result withtitle,statement,doneWhen, optionalstoryandmodules.GoalModulehas anid,title,purpose,dependsOn,builtFromnode ids andproduces. Optionalrelationsname how modules connect;optionalmarks a module the learner can skip.
Sources and interface copy
Section titled “Sources and interface copy”documents lists the source material behind a map. refs on nodes, stages and goal modules point
back to those documents; docLink creates learner-facing links, while ref cites the source used
to write the map.
labels overrides interface text. See the labels reference for the groups and
the JSON Schema page for map.json editor support.