The Nebula Design System is made of three parts, to use together:
- This repository, published at https://nethesis.github.io/nebula-design-system/: the rules shared by all products, whatever technology they are built with. Writing guidelines, the glossary of terms with their Italian translations and the visual foundations.
- vue-components: the Vue components and patterns, with their props and live examples in the Storybook.
- Nebula Figma file: the designs.
Unlike the other products, NethServer 8 uses the Carbon Design System: only the writing guidelines and the glossary apply to it.
- Carbon Design System v10: the design system.
- ns8-ui-lib Storybook: the NethServer 8 components.
- Carbon Components Vue Storybook: the Carbon components for Vue 2.
| File | Purpose |
|---|---|
glossary.yaml |
The glossary: single source of truth, edited through pull requests. The comment at the top describes the fields |
icons.yaml |
The icon dictionary: which icon to use for each meaning, shown on the Iconography page. The comment at the top describes the fields |
content/*.md |
The text pages (introduction, writing guidelines): plain markdown, no HTML or images. Tables with a "Do | Don't" header are shown with check and cross marks. Link other pages with ?page=<id>, for example [glossary](?page=glossary) |
glossary/it.tbx |
Italian glossary in the TermBase eXchange format, generated from glossary.yaml (do not edit) |
scripts/build-data.mjs |
Validates glossary.yaml and icons.yaml with scripts/validate-data.mjs (every icon must exist in its package; tests in validate-data.test.mjs) and generates the TBX files and the page data |
scripts/vite-plugin-markdown.mjs |
Compiles each content/*.md into a Vue component, rejecting raw HTML and unsafe links, and gives the search the text of each section (tests in vite-plugin-markdown.test.mjs) |
scripts/vite-plugin-glossary-watch.mjs |
Dev server only: reruns build-data.mjs when glossary.yaml or icons.yaml is saved |
src/pages.ts |
The pages of the site and their sidebar groups |
src/search.ts |
The search in the top bar: pages, sections, glossary terms, color tokens, text styles, icon meanings and custom icons. Loaded the first time the search gets the focus. Headings of the Vue pages are found only when they have a fixed id and text |
data/colors.json |
Color tokens exported from the Nebula Figma file (do not edit): see "Colors" below |
scripts/figma/export-colors.js, scripts/import-colors.mjs |
Export the color variables from Figma, then validate them and write data/colors.json |
src/foundations.ts |
Values of the foundations pages (typography, spacing and border, elevation and shadow), copied from the Nebula Figma file: update them when Figma changes |
scripts/vite-plugin-sources.ts |
Publishes the content as plain files for coding agents: see "Files for coding agents" below |
src/ |
The web site (Vue, @nethesis/vue-components), published on GitHub Pages |
figma-fixes.md |
Changes to make in the Nebula Figma file so that it agrees with this guide |
The pages of the site are built in the browser, so fetching them returns no content. The build also publishes the content as plain files, next to the site, generated from the same sources as the pages:
| File | Content |
|---|---|
llms.txt |
Index of the files below, and of the components.json of the vue-components Storybook |
writing-guidelines.md |
The writing guidelines |
glossary.json |
The glossary |
icons.json |
Which icon to use for each meaning, the icons to avoid, and the custom icons with no meaning yet |
colors.json |
The color tokens, with their Tailwind CSS classes |
foundations.json |
Typography, iconography, spacing, border, focus ring, elevation and shadow |
introduction.md |
The introduction |
Each file has a source, the page of the site it comes from, and each glossary term, icon meaning and color token has a link to its anchor in the site. In the markdown files, the links to other pages point to the matching file, such as glossary.json. index.html links llms.txt too, for tools that fetch the site without running it. The dev server serves the files as well, for example http://localhost:5179/llms.txt; restart it after changing scripts/vite-plugin-sources.ts.
- Edit
glossary.yaml,icons.yamlor a page incontent/. - Regenerate
glossary/it.tbxwithnpm run build:data(the dev server does it on save), and commit it. - Open a pull request. CI validates the glossary and the guidelines, and fails if the TBX files are not up to date.
- On merge, CI publishes the page.
glossary.yaml contains approved terms only: every entry is published, so add a term once it
has been agreed. In the TBX file, the translations listed under avoid.it become forbidden
translations.
The Colors page reads data/colors.json. To update it after a change in Figma:
- Run the code of
scripts/figma/export-colors.jswith theuse_figmatool of the Figma MCP server, on the Nebula Figma file, and save the returned JSON to a file. - Run
npm run import:colors -- <file>: it validates the export and rewritesdata/colors.json. - Review the diff and commit it.
Use the Node.js version in .nvmrc (Renovate keeps it up to date). With nvm or fnm:
nvm install # reads .nvmrc, installs that version and switches to it
npm install
npm run devIn a new shell, run nvm use: nvm doesn't switch version on its own when you enter the folder.
The dev server runs on http://localhost:5179 and regenerates the data whenever
glossary.yaml or icons.yaml is saved: validation errors appear in the terminal and in the browser.
In development only, each glossary entry has a "Reviewed" checkbox and the list has a Review filter: the marks are saved in the browser and an entry edited after its review shows "Changed since review".
npm test runs the tests of the markdown plugin, including the security ones, and of the files for coding agents (scripts/sources.test.mjs): every file listed in llms.txt exists, the JSON files parse, and every link points to a page and an anchor of the site. npm run build builds the page
into dist/.