Docs · Learn
Copy as Markdown
How to read a UJN drawing
You can read a UJN drawing without ever writing one: each shape, line and tab has one meaning, and this page shows them on small drawings.
UJN 0.1 draft · revision 23 · November 29, 2026 · Changes
The checkout, explained#
- 1Start The green ring with a play arrow is where the journey begins, and the plate under it says where the user comes from.
- 2View A box with a title bar is a screen the user sees: the bar names its type, and the monospace line at the bottom is its route.
- 3Legacy The L tab and the dotted border flag Bank transfer as legacy: an old page that is staying.
- 4Planned The » tab and the dotted border flag Pay later as future: planned for a later release, not built yet.
- 5Action A box with a gear and no title bar is something the system does between screens; the user sees only its outcome.
- 6External system Cut corners and a dark band mark a participant, a person or a service; the cloud and "System, external" say this one is a third-party service the flow calls while the user stays in the app.
- 7End, failure A red bullseye with a cross is an end without the outcome, reached by a red arrow with a cross because it is a failure path.
- 8Handoff A dashed box is where the user leaves the app, here for up to 5 minutes in their bank app, and the dashed arrows out of it are the ways back.
- 9Back in the app Another view: the user lands here after Approve, and the links to its requirement and test are in the file and the model, not in the drawing.
- 10End, success A green bullseye with a check is an end where the user got what they came for.
Read it the way the journey goes, from left to right. A solid arrow moves the user on. A dashed one goes back, or comes back from outside the app, as Approve does from the bank app (13.7). A red one with a cross is a failure. The pill on an arrow names what the user does, such as Pay or Approve; out of an action, where nobody clicks, it says when that way is taken (approval needed, card refused). Braces list what an arrow carries: {card, amount} goes to the payment provider and {result} comes back.
Arrows#
There are four kinds of line (13.2). The pill reads "Trigger · guard": what the user does, then when this way is the one taken (13.4).
Navigation#
A solid line with a filled head: the user moves on. The pill names the button or link.
Failure path#
Solid and red, with a cross: an error or a rejection. Both arrows start with Pay; the text after the dot says which one is taken.
@startujnjourney DOCS "How to read a drawing (2)"view checkout { title: "Checkout"; route: /checkout }view confirmed { title: "Order confirmed"; route: /orders/:id }view refused { type: toast; title: "Card refused" } checkout --> confirmed : [Pay] card acceptedcheckout -x-> refused : [Pay] card refused@endujnReturn#
Dashed, with an open head: the user goes back, as when a modal closes. It runs right under the arrow it answers (13.7).
Failed return#
Dashed and red, with a cross: the user goes back because something failed. Here a refused card sends the user straight back to Checkout, with no error screen.
@startujnjourney DOCS "How to read a drawing (4)"view checkout { title: "Checkout"; route: /checkout }action authorize { title: "Authorize payment" }view confirmed { title: "Order confirmed"; route: /orders/:id } checkout --> authorize : [Pay]authorize --> confirmed : approvedauthorize .x.> checkout : refused@endujnA call to a system and its reply#
An action calls a system with a solid arrow, and the system replies with a dashed one. Neither has a pill: the braces say what is sent and what comes back. The user stays in the app (14.5).
An arrow after a flag#
A flagged arrow is dotted, with the flag's tab right of its pill. Everything reachable only through it inherits the flag: Pay later and Payment plan get outlined tabs, and the arrow between them is dotted with no tab of its own (13.8).
@startujnjourney DOCS "How to read a drawing (6)"view checkout { title: "Checkout"; route: /checkout }view pay_later { title: "Pay later"; route: /checkout/later }view plan { title: "Payment plan"; route: /checkout/plan } checkout --> pay_later : [Pay later] { flags: [future] }pay_later --> plan : [Continue]@endujnFlags#
A flag never changes a shape. The border goes dotted, and a tab inside the right edge shows the flag: filled where it is set, outlined where it is inherited. UJN has eleven flags (section 8); these four say whether a part is built and whether it stays.
| Flag | Tab | Means | Carries down the journey |
|---|---|---|---|
future |
» | Planned for a later release | Yes |
deprecated |
↓ | Exists, and is being retired | Yes |
legacy |
L | Old, and staying | No, for now (23.3) |
needs-updates |
U | Exists, but its design or code is out of date | No |
future and deprecated carry down: everything reachable only through the flagged node inherits them. legacy and needs-updates stay where they are set. Their tabs show the letters L and U until their glyphs are designed (23.4, 23.28).
@startujnjourney DOCS "How to read a drawing (7)"start from_cart { description: "From the cart" }view checkout { title: "Checkout"; route: /checkout; flags: [needs-updates] }view pay_later { title: "Pay later"; route: /checkout/later; flags: [future] }view plan { title: "Payment plan"; route: /checkout/plan }view transfer { title: "Bank transfer"; route: /checkout/transfer; flags: [legacy] } from_cart --> checkoutcheckout --> pay_later : [Pay later]pay_later --> plan : [Continue]checkout -up-> transfer : [Bank transfer]@endujnPayment plan is planned too, because the only way to it is through Pay later: its tab is outlined and the arrow into it is dotted. Checkout needs updates, but the screens after it do not, so their arrows stay solid.
Every kind of node#
UJN has nine kinds of node. The shape tells you the kind, and the icon and the type name inside tell you the type (19.4).
Where a journey starts and ends#
- Start (17): a ring where the user enters the journey, one for each way in. Its types are plain, deep link, notification and handoff return.
- End (17): a bullseye for each way the journey can end: success, failure, or abandoned (an octagon).
- Actor (12): a person, in a box with cut corners and a dark band. The actor who starts the journey points at its start.
@startujnjourney DOCS "How to read a drawing (8)"actor customer { title: "Customer"; role: Shopper }start from_cart { description: "From the cart" }start from_email { type: deep-link; description: "Link in a reminder email"; route: /checkout }view checkout { title: "Checkout"; route: /checkout }end paid { type: success; description: "Order paid" }end refused { type: failure; description: "Card refused" }end left { type: abandoned; description: "Closed the page" } customer --> from_cartfrom_cart --> checkoutfrom_email --> checkoutcheckout --> paid : [Pay] card acceptedcheckout -x-> refused : [Pay] card refusedcheckout --> left : [Close]@endujnViews#
- View (11): anything the user sees as a window. The title bar names its type. Each view is its own box, so a modal is never drawn inside its page: an arrow goes in and a return comes out.
A page with what opens over it: a drawer (a panel at an edge), a popover (a small panel by a control), a modal (blocks the page until it closes) and a toast (a message that goes away by itself, so its return has no pill).
@startujnjourney DOCS "How to read a drawing (9)"view orders { title: "Orders"; route: /orders }view filters { type: drawer; title: "Filters" }view tip { type: popover; title: "What is pending?" }view cancel { type: modal; title: "Cancel order?" }view canceled { type: toast; title: "Order canceled" } orders --> filters : [Filter]filters ..> orders : [Apply]orders --> tip : [?]orders --> cancel : [Cancel order]cancel ..> orders : [Keep it]cancel --> canceled : [Yes, cancel]canceled ..> orders@endujnThe other types: tabs (one tab shown at a time), new window (opens in another browser tab or window), wizard (steps in order, each its own view), embedded (third-party content inside the app) and waiting (the user waits while the system works).
@startujnjourney DOCS "How to read a drawing (10)"view checkout { type: wizard; title: "Checkout"; description: "2 steps"; route: /checkout }view address { title: "Address"; description: "Step 1"; parent: checkout }view card { type: embedded; title: "Card form"; description: "Step 2, from the payment provider"; parent: checkout }view paying { type: waiting; title: "Paying"; description: "Waiting for the bank" }view account { type: tabs; title: "Your account"; description: "Orders · Addresses"; route: /account }view help { type: new-window; title: "Help center"; route: https://help.example.com } checkout --> address : [Start]address --> card : [Next]card --> paying : [Pay]paying ..> card : [Cancel]account --> help : [Help]@endujnActions#
- Action (14): something the system does between views. The user never sees it, only its outcome. Its box has no title bar.
Auth asks the user to log in or confirm who they are, action does the work, and message sends an email, an SMS or a push. Authorize payment has two exits without a guard, so both happen: the receipt goes out and the confirmation shows.
@startujnjourney DOCS "How to read a drawing (11)"view checkout { title: "Checkout"; route: /checkout }action step_up { type: auth; title: "Confirm it is you"; description: "Bank login" }action authorize { title: "Authorize payment" }action receipt { type: message; title: "Send receipt"; channel: email }view confirmed { title: "Order confirmed"; route: /orders/:id } checkout --> step_up : [Pay]step_up --> authorizeauthorize --> receiptauthorize --> confirmed@endujnWait is a delay; its exit guarded timeout is taken when the time runs out. Fork and join are bars: the paths between them run at the same time, and the join waits for all of them. Event is something that arrives on its own, and permission asks the user for consent.
@startujnjourney DOCS "How to read a drawing (12)"action window { type: wait; title: "Cancel window"; description: "Free to cancel"; timeout: 30 min }action split { type: fork }action reserve { title: "Reserve stock" }action invoice { title: "Create invoice" }action ready { type: join }action shipped { type: event; title: "Parcel shipped"; description: "From the warehouse" }action allow { type: permission; title: "Allow notifications" }view tracking { title: "Tracking"; route: /orders/:id/track } window --> split : timeoutsplit --> reservesplit --> invoicereserve --> readyinvoice --> readyready --> shippedshipped --> allowallow --> tracking@endujnSystems, data and people in the flow#
- System (12): a service an action calls while the user stays in the app. A server icon marks an internal one, a cloud an external one.
- Data (16): a store an action writes to or reads from, drawn as a cylinder. The arrow points the way the data moves.
- Actor inline (12.3): a person doing a manual task. Each arrow out is an outcome they pick.
@startujnjourney DOCS "How to read a drawing (13)"view checkout { title: "Checkout"; route: /checkout }action place { title: "Place order" }system fraud { title: "Fraud service"; host: fraud.internal }data orders_db { title: "Orders"; location: table orders }actor reviewer { title: "Fraud reviewer"; role: Back office }view confirmed { title: "Order confirmed"; route: /orders/:id }view held { title: "Order on hold"; route: /orders/:id/held } checkout --> place : [Place order]place --> fraud { payload: [order] }fraud ..> place { payload: [score] }place --> orders_db { payload: [order] }place --> confirmed : low riskplace --> reviewer : high riskreviewer --> confirmed : [Approve]reviewer -x-> held : [Hold]@endujnLeaving the app#
- Handoff (15): a dashed box where the user leaves the app, for a bank app, an email link or a phone call. The type name says whether they come back.
The bank app returns: Approve comes back through a start of type handoff return, and Decline goes back to Checkout. Call support does not return: the journey ends out there.
@startujnjourney DOCS "How to read a drawing (14)"start from_cart { description: "From the cart" }view checkout { title: "Checkout"; route: /checkout }handoff bank_app { title: "Bank app"; description: "Approve the payment"; channel: bank app; timeout: 5 min }start back { type: handoff-return; description: "Back from the bank"; route: /checkout/return }view confirmed { title: "Order confirmed"; route: /orders/:id }handoff call_us { type: no-return; title: "Call support"; channel: phone } from_cart --> checkoutcheckout --> bank_app : [Pay with bank app]bank_app ..> back : [Approve]bank_app .x.> checkout : [Decline]back --> confirmedcheckout -down-> call_us : [Call us]@endujnOther journeys#
- Journey reference (18): another journey, drawn in its own diagram. Its pointed side faces away from the arrow that leads in, and the other journey's id is on its bottom line.
Sign in is a call: the user comes back to Checkout by the dashed line beside the arrow. Return an item is a go-to: the user carries on in that journey.
@startujnjourney DOCS "How to read a drawing (15)"view checkout { title: "Checkout"; route: /checkout }ref sign_in { journey: LOGIN; title: "Sign in" }view confirmed { title: "Order confirmed"; route: /orders/:id }ref returns { journey: RETURNS; title: "Return an item" } checkout -up-> sign_in : [Sign in] { returns }checkout --> confirmed : [Pay]confirmed --> returns : [Return an item]@endujn