Nu Design System
A lightweight foundation for content-driven Astro websites. Shared tokens, reusable components, and themeable patterns grew out of this portfolio and now have their own documentation and starter.
I designed and built Nu end to end — components, design tokens, layout themes, and the build pipeline — with AI coding tools supporting implementation and iteration.
From a site template to a shared core
The first Nu explored how the same content could support very different visual identities. As this portfolio evolved, the next problem became keeping its foundations consistent without replaying changes across two copies. I extracted the reusable tokens, styles, and components into one core, with documentation and a standalone starter using the same artifact.
- One maintained foundation
- Fourteen Astro components, generated token CSS, and API references drawn from the component source.
- A clearer visual contract
- Cool neutral light and dark themes, neutral emphasis for primary actions, and restrained orange accents.
- A working way in
- Download the starter, render a real component, and change a semantic theme value. The docs demonstrate the installed core.
Start with a working example or browse the current components.
Nu Design System
Content-first. Theme-agnostic. AI-ready.
View WorkAI Ready
Content stored in structured Markdown and JSON — easy for AI to read, generate, and update.
Theme Agnostic
Swap themes without touching content. Light, dark, or custom — it's just a token swap.
Static & Fast
Built with Astro. Zero JavaScript by default. Ships only what's needed.
01Why I built this
Separate what it says from how it looks
Most sites tangle their words and their design together, so changing one means touching the other. Nu draws one hard line: everything the site says lives in plain files, and everything it looks like lives in swappable themes and tokens. Restyle a whole site without rewriting a sentence — or hand the content to a machine without dragging the design along.
- Content is files. Pages are Markdown with frontmatter; collections, navigation, and themes are JSON.
- Themes are disposable. A layout theme is one config and one stylesheet — add or delete one without touching content.
- Tokens carry the look. Colors, spacing, and type compile from JSON into CSS custom properties at build time.
02The content model
The prototype started with sixteen files
Every page, card, theme, and token in the early prototype lived in sixteen plain Markdown and JSON files. These are historical excerpts from the earlier prototype — select a file to read it.
content/pages/index.md
---
title: "Nu Design System"
description: "A lightweight, AI-ready design
system for the modern web."
layout: "default"
hero:
heading: "Nu Design System"
subheading: "Content-first. Theme-agnostic.
AI-ready."
cta:
label: "View Work"
href: "#projects"
enhancement: "grain-gradient"
--- A page is Markdown with YAML frontmatter. The hero block is content, not markup.
Historical prototype file excerpts — long collections elided. Current shared source lives in the extracted core package.
- 14
- exported components
- 2
- color themes
- 3
- appearance preferences
- 1
- shared core package
- 1
- Markdown dependency
Current counts from the exported package contract — attributes, not outcomes.
03Tokens
From JSON to pixels in one build step
Styling starts as data. Primitive colors, semantic roles, and dark overrides compile from JSON into namespaced CSS custom properties. The current generator checks for missing and cyclic aliases before it emits the shared stylesheet. This earlier accent demo shows the basic relationship: change one value and the components follow.
tokens/light.json
{
"color": {
"accent": "#2F6FAB",
…
}
} src/styles/tokens.css (generated)
:root {
--nu-color-accent: #2F6FAB;
…
} Historical pipeline demonstration. The current generator preserves semantic aliases and validates missing or cyclic references.
Historical palettes: Minimal used warm sepia and Experimental stayed dark. The current shared preset uses cool neutral light/dark mappings, neutral emphasis, and a restrained orange accent.
04The components
A shared grammar, then and now
The early prototype let a Card stay static, carry an animated gradient, or run a WebGL splash, with each theme deciding which effects to allow. These historical specimens preserve that prototype’s local markup and styles. Switch its theme here or in the machine to explore that original direction. The live documentation renders the current shared components, with their actual props, states, and limits.
Button — primary · secondary · ghost · gradient
Typography — the five-step scale
Heading One
Heading Two
Heading Three
Body text in the default size.
Small text for captions.
Card — none · gradient · webgl-splash
Default Card
A basic card with no enhancement.
Gradient Card
Card with an animated gradient background.
Splash Card
Card with a live WebGL color splash.
Accordion — native details, zero JavaScript
What is a layout theme?
What happens without JavaScript?
Testimonial
Rebuilding the look took an afternoon. The content never knew it happened.
Historical theme specimens: Minimal hides the icons, stops the canvas, and changes the typography.
05You're looking at it
This website is the proof
Nu and adnan.nyc grew from the same foundation. The original repositories share their first 44 commits and forked on June 1st: one continued as a template, the other became this portfolio. Features were replayed between them, including the interactive hero. The shared core is the next step: a versioned foundation that each consumer can deliberately adopt while keeping its own content and identity.
Select a commit — every hash is real and in this site's own history.
Historical lineage snapshot of the earlier repositories. The new extraction starts fresh reviewed source history; it does not copy either repository’s history.
Inspect the page you're reading
Every color, space, and radius on this page resolves through Nu's token variables. Read them live from this document — the same --nu-* properties the miniature above is assembled from.
<html data-layout="…" data-theme="…>
Read live via getComputedStyle(document.documentElement) at the moment you opened this panel — not a transcription. The devtools will tell you the same story.
06Built for machines too
AI-ready is a file format decision
The original template kept content in predictable Markdown and JSON, so tools could update it without changing layout code. Its validator checked that content before each build. The extracted core applies the same principle to a smaller contract: explicit component props, generated references, and executable usage examples. It does not add an AI backend or a general application builder.
validate-contentgenerate-tokensoptimize-imagesastro checkastro build
✓ content valid — 2 pages, 7 collections, 2 themes Historical prototype build sequence. The extraction now generates tokens and a package, then builds its docs and starter as separate consumers.
07What this demonstrates
What Nu demonstrates
- Systems design
- A reusable foundation with documentation and a starter consuming the same core.
- Token architecture
- Primitive values, semantic roles, and light/dark mappings compiled into shared CSS.
- Progressive enhancement
- Native HTML where possible, with interaction added where a component needs it.
- Craft under constraint
- An expressive early prototype refined into a focused, independently usable core.
- Proof by use
- Foundations developed in this portfolio, exercised through working documentation and a standalone starter.
Where it stands
- Live documentation with 14 Astro component references, foundations, and examples
- A downloadable starter and core artifact; no npm registry release is claimed
- Shared foundations tested in a separate portfolio integration preview
- Built independently, with AI coding tools assisting implementation
Swap the world. Keep every word.