Tokens as a single source of truth pipeline
end-to-end token architecture.
define tiered tokens in standardized JSON, transform per platform with a build tool, publish versioned packages, and automate in CI.
What's really being asked
This evaluates whether you can architect a token system with one authoritative source feeding many platforms automatically and reliably.
The full answer
Establish one source of truth: token definitions in a standardized, platform-neutral JSON format, ideally following the W3C Design Tokens Community Group spec so tooling interoperates. Structure them in tiers, primitive, semantic, and component, with semantic tokens referencing primitives. A build tool, commonly Style Dictionary, ingests the JSON, resolves aliases, applies platform-specific transforms for units, color formats, and naming conventions, and uses formatters to emit concrete outputs: CSS custom properties for web, a Swift file for iOS, and a Kotlin object or Android XML resource. Package and version each platform output with semantic versioning and publish to the appropriate registry so consumers pin and upgrade deliberately. Run the entire pipeline in CI triggered by changes to the source, with validation and visual regression checks, so a single token edit regenerates and republishes all platform artifacts consistently. Designers can author tokens via a plugin that exports the same JSON, keeping design and code aligned.
The mistakes people make
Allowing multiple sources of truth, such as separate hand-maintained files per platform, which drift. Skipping the transform stage so units and colors are wrong on some platforms. Not versioning or automating, forcing manual republishing. Ignoring alias resolution between semantic and primitive tiers.
What usually comes next
Why standardize on the W3C token format. How do designers feed tokens into the source without breaking it. How do you handle composite tokens like typography and shadows across platforms.
A concrete example
A color.action.primary semantic token aliases color.blue.500. On commit, CI runs Style Dictionary, emits --color-action-primary for web, a Swift constant for iOS, and an XML color for Android, bumps the package versions, and publishes, so all three platforms get the same decision from one edit.
Interview question
What is the defining property of a token system that acts as a single source of truth?
- a.Each platform maintains its own token file for flexibility
- b.One platform-neutral source is transformed into all platform outputs automaticallyCorrect
- c.Designers and developers keep separate token lists that are reconciled weekly
- d.Tokens are stored only as CSS variables and copied to mobile by hand
Why? this is the answer
A single source of truth means one authoritative definition that tooling transforms into every platform's output, preventing drift. Per-platform files, manual copying, or separate lists all create multiple sources that diverge.
Just read this? Test yourself on what you have been reading.
Read the original → w3.org
- #design-tokens
- #single-source-of-truth
- #cross-platform
- #build-pipeline
- #w3c
Put your scrolling time to good use
Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Open roles that interview on design-tokens — each one lists the topics its interview covers.
See open roles