Living documentation
The team's shared brain for the UpNext design system. Versioned in the repo, rendered here next to the components it describes.
Why this exists
Everyone· 4 minThe problem in the current UpNext app, and what we're building instead.
The architecture
Everyone· 5 minThree layers — primitives, wrappers, app. The wrap-don't-use pattern and the lint guardrail.
Working with tokens
Everyone· 5 minPrimitive vs semantic, the only-touch-the-semantics rule, the four tokens per status color.
States & interaction
Everyone· 5 minEvery hover, focus, active state maps to a deliberate palette step. No random darken filters.
Adding a component
Engineers· 5 minStep-by-step recipe for wrapping a new shadcn primitive. Includes the template.
Changing a token
Designers· 4 minHow to shift the brand color, retheme, or remap state colors safely.
The migration playbook
Everyone· 6 minHow this moves into the real UpNext app, phase by phase. Anti-patterns to avoid.
Glossary
Everyone· 3 minThe vocabulary — token, primitive, semantic, wrapper, variant — defined once.
Inspiration — the shadcn docs page
Everyone· 5 minAnatomy of why the shadcn docs page works. The patterns to steal for our own component tabs.
UpNext design system — living documentation
This folder is the team's shared brain for the design system. It lives in the repo so it can't drift out of sync, and it's rendered inside the playground at /library/docs so you read it next to the components it describes.
How to read this
If you're new to design systems in code, read these in order:
- Why this exists — the problem we're solving, and why the system matters.
- The architecture — three layers (primitives → wrappers → app) and why we wrap instead of using shadcn directly.
- Working with tokens — primitive vs semantic, the only-touch-the-semantics rule.
- States and interaction — every hover/focus/active state maps to a deliberate palette step. No random darken filters.
- Adding a component — engineer walkthrough for wrapping a new shadcn primitive.
- Changing a token — designer walkthrough for retheming safely.
- The migration playbook — how this moves into the real UpNext app, phase by phase.
- Glossary — the vocabulary, defined once.
Audience
These docs speak to both designers and engineers. Sections that need code knowledge are clearly labeled Engineer note:. Sections that involve design judgment are labeled Designer note:. Everyone should be able to read the whole thing — the system only works if both sides understand it.
When to update these docs
Update a doc the same PR you change the thing it describes. The docs are part of the system, not commentary on it. If they fall out of sync, the system breaks down — people stop trusting them, then stop reading them, then the conventions erode.
Specific triggers:
- Add a token → update working-with-tokens.md
- Add a wrapper → update adding-a-component.md only if the pattern changed
- Change a state-color rule → update states-and-interaction.md
- Discover a migration gotcha → add to the-migration.md