|
| 1 | +# Label Suite — Design System |
| 2 | + |
| 3 | +A living design system extracted from the **Label Suite** product — a config-driven NLP annotation platform with integrated annotator management, designed for academic research labs. |
| 4 | + |
| 5 | +> **Source repository:** `singyichen/label-suite` (GitHub) |
| 6 | +> **Canonical design doc:** `design/system/MASTER.md` in the source repo (46 KB, 2026-04-16) |
| 7 | +> **Pencil wireframe source:** `design/wireframes/design-system.pen` (encrypted; read via Pencil MCP) |
| 8 | +> **Prototype reference:** `design/prototype/pages/` (login, register, forgot/reset-password, profile, dashboard) |
| 9 | +
|
| 10 | +This design system was derived from real product HTML, not screenshots. Every token below traces back to a pen variable or CSS custom property in the source prototype. |
| 11 | + |
| 12 | +--- |
| 13 | + |
| 14 | +## What is Label Suite? |
| 15 | + |
| 16 | +Label Suite is an open-source, lightweight alternative to [Label Studio](https://labelstud.io/), purpose-built for academic NLP research teams. It replaces the fragmented "spreadsheet + ad-hoc scripts + external annotator management" workflow most labs inherit. |
| 17 | + |
| 18 | +**Core product claims:** |
| 19 | + |
| 20 | +1. **Config-driven task launch.** NLP annotation tasks (Single Sentence, Sentence Pairs, Sequence Labeling, Generative Labeling) are defined via YAML/JSON — no custom code. |
| 21 | +2. **Integrated annotator management.** Built-in account lifecycle, working-hours tracking, and salary estimation for part-time research assistants. |
| 22 | +3. **Dry Run / Official Run isolation.** Interfaces and configs can be validated in a sandboxed mode before formal data collection. |
| 23 | +4. **Built-in dataset analytics.** #Sentence, #Token, #Label statistics computed automatically. |
| 24 | +5. **Bilingual UI (zh-TW / EN).** Primary audience: Taiwan-based research labs; secondary: international collaborators. |
| 25 | + |
| 26 | +**Audience segments (roles in the prototype):** |
| 27 | +- **Super Admin** — platform operators; manage users and roles |
| 28 | +- **Project Leader** — a researcher who creates and configures annotation tasks |
| 29 | +- **Annotator** — typically a part-time RA who performs labeling |
| 30 | +- **Reviewer** — senior annotator or researcher who adjudicates |
| 31 | +- **User** — default role, graduates into the above through task actions |
| 32 | + |
| 33 | +**Tech stack (informational — for designers implementing in-app):** |
| 34 | +React + TypeScript + Vite · FastAPI · PostgreSQL · Redis · Celery · Playwright. |
| 35 | + |
| 36 | +**Category:** Micro SaaS / tool-based web app. Not a marketing site — no hero slabs, no parallax, no illustrations. |
| 37 | + |
| 38 | +--- |
| 39 | + |
| 40 | +## Content Fundamentals |
| 41 | + |
| 42 | +Label Suite writes like a **research tool that respects its users' time**. Copy is precise, bilingual-aware, and explains consequences before it asks for action. |
| 43 | + |
| 44 | +### Voice & Tone |
| 45 | +- **Calm and functional.** No hype, no "Let's go!" No emoji. No exclamation marks in primary flows. |
| 46 | +- **Second-person ("you" / "你"), never first-person plural.** The product describes what the user can do, not what "we" will do. |
| 47 | +- **Scholarly vocabulary is acceptable.** Terms like *IAA* (inter-annotator agreement), *Dry Run*, *Official Run*, *Sequence Labeling* are used without apology — audience knows them. |
| 48 | +- **Status language is neutral.** "Submitted", "In Progress", "Pending IAA confirmation" — never "🎉 You did it!" |
| 49 | + |
| 50 | +### Casing |
| 51 | +- **Sentence case** for button labels in English: *Create Your First Task*, *Continue with Google*, *Sign in*. Not ALL CAPS, not Title Case For Every Word. |
| 52 | +- **Labels above inputs** are short nouns: *Email*, *Password*, *電子郵件*, *密碼*. |
| 53 | +- **Table headers** use uppercase tracking: `text-xs uppercase tracking-wide text-slate-400`. |
| 54 | + |
| 55 | +### Bilingual Voice (zh-TW / EN) |
| 56 | +The product is bilingual-first. Both languages are peers; neither is a translation of the other. |
| 57 | + |
| 58 | +- **Chinese is conversational, not formal.** `登入你的帳號` (not `請登入您的帳戶`). Uses `你` not `您`. |
| 59 | +- **English mirrors Chinese directness.** `Sign in to your account`. No filler. |
| 60 | +- **Mixed-case handling** is browser-automatic — never hand-kern Chinese text. |
| 61 | +- Chinese body text uses `line-height: 1.8`; English uses `1.6`. |
| 62 | + |
| 63 | +### Real examples from the product |
| 64 | + |
| 65 | +| Context | Chinese | English | |
| 66 | +|---|---|---| |
| 67 | +| Login subtitle | `登入你的帳號` | `Sign in to your account` | |
| 68 | +| Primary CTA | `登入` | `Sign In` | |
| 69 | +| Google SSO | `使用 Google 帳號繼續` | `Continue with Google` | |
| 70 | +| Register link | `還沒有帳號?前往註冊` | `Don't have an account? Register` | |
| 71 | +| Forgot password | `忘記密碼?` | `Forgot password?` | |
| 72 | +| Dashboard title | `儀表板` | `Dashboard` | |
| 73 | +| Dashboard sub | `掌握任務進度與團隊協作狀態` | `Track task progress and team collaboration at a glance` | |
| 74 | +| Empty-state CTA | `建立第一個任務` | `Create Your First Task` | |
| 75 | +| Alert (login fail) | `帳號或密碼錯誤,請再試一次` | `Invalid email or password` | |
| 76 | +| Validation | `請輸入電子郵件` | `Email is required` | |
| 77 | +| Role pill | `標記員` / `審核員` / `專案負責人` | `Annotator` / `Reviewer` / `Project Leader` | |
| 78 | +| Status badge | `進行中` / `待確認` / `已送出` | `In Progress` / `Pending` / `Submitted` | |
| 79 | + |
| 80 | +### Anti-patterns in copy |
| 81 | +- ❌ Emoji as punctuation or in UI labels |
| 82 | +- ❌ "Oops!" or any apologetic filler |
| 83 | +- ❌ Marketing verbs: *supercharge*, *unlock*, *effortless* |
| 84 | +- ❌ First-person plural ("we", "our team") |
| 85 | +- ❌ Title Case For Every Button |
| 86 | + |
| 87 | +--- |
| 88 | + |
| 89 | +## Visual Foundations |
| 90 | + |
| 91 | +### Philosophy: Flat + one intentional exception |
| 92 | +Label Suite commits to **Flat Design** — 2D, bold colors, clean lines, typography-focused. The system allows **exactly one** interactive embellishment: a `translateY(-1px)` to `translateY(-2px)` lift on hover for primary buttons and interactive cards. Nothing else. |
| 93 | + |
| 94 | +| Effect | Allowed? | Notes | |
| 95 | +|---|---|---| |
| 96 | +| Opacity change on hover | ✅ | Preferred for buttons (`opacity: 0.9`) | |
| 97 | +| Color / border-color change on hover | ✅ | Preferred for cards and links | |
| 98 | +| `translateY(-1px)` to `-2px` | ✅ | **Only** exception; primary buttons + interactive cards | |
| 99 | +| `scale()` transform | ❌ | Causes layout shift | |
| 100 | +| Shadow enhancement on hover | ❌ | Violates flat rule | |
| 101 | +| Gradients (background, border, text) | ❌ | Never | |
| 102 | +| Glassmorphism / blur backdrops | ❌ (modal overlay only) | `backdrop-filter: blur(4px)` on `.modal-overlay` is the one exception | |
| 103 | + |
| 104 | +### Color Vibe |
| 105 | +**Indigo + Emerald on Violet-50.** Primary identity is `#6366F1` (Indigo 500); the single emerald CTA (`#10B981`) is the only saturated green. Backgrounds are **violet-tinted off-white** (`#F5F3FF`) — not gray, not pure white — which lends the UI a slightly scholarly, ink-on-paper feel. Inks are deep `#1E1B4B` (Indigo 950), never pure black. |
| 106 | + |
| 107 | +Imagery (when it appears — the product ships none by default) should skew cool, low-saturation, and fundamentally neutral. No grain, no warmth, no b&w photography tropes. |
| 108 | + |
| 109 | +### Type |
| 110 | +- **Crimson Pro** (serif) for headings and display — lends the academic, thesis-paper feel the product's research audience expects. |
| 111 | +- **Inter** (sans-serif) for UI body, buttons, inputs, labels. |
| 112 | +- **Atkinson Hyperlegible** appears in the dashboard as an accessibility-forward alternative for dense data; it's available as a secondary sans family. |
| 113 | +- **JetBrains Mono** — a reasonable default for the YAML config editor surface (the product is config-driven; this surface is implied by the product spec even if the prototype lacks it). |
| 114 | + |
| 115 | +Both Crimson Pro and Inter are Google Fonts — no substitution needed. See `fonts/README.md`. |
| 116 | + |
| 117 | +### Spacing & Rhythm |
| 118 | +8-based scale (`4 / 8 / 16 / 24 / 32 / 48 / 64`). Panels get `24px` padding; buttons get `12px 24px`; gutters between panels are `24px`. Tight density on data-heavy pages (dashboard), generous on forms (account pages). |
| 119 | + |
| 120 | +### Backgrounds |
| 121 | +- **Page:** flat `var(--color-surface)` — `#F5F3FF` violet off-white. |
| 122 | +- **Cards/panels:** flat `white` with `1px solid #E2E8F0` border. |
| 123 | +- **Full-bleed imagery:** none. No hero photography, no illustrations, no SVG scenes. The logo mark is the only illustrated element. |
| 124 | +- **Repeating patterns / textures:** none. |
| 125 | + |
| 126 | +### Animation |
| 127 | +- **Duration:** `150ms` (fast) or `200ms` (normal). Anything slower feels sluggish for a tool. |
| 128 | +- **Easing:** `cubic-bezier(0.4, 0, 0.2, 1)` (standard material-style). No bouncy springs; no overshoot. |
| 129 | +- **Transitions target:** `opacity`, `color`, `border-color`, `background`, `transform: translateY`. |
| 130 | +- **Never animate:** `box-shadow`, `scale`, filter, `width`/`height` layout. |
| 131 | +- **Reduced motion:** `@media (prefers-reduced-motion: reduce)` collapses durations to `0.01ms`. This is enforced in every prototype page — match. |
| 132 | + |
| 133 | +### Interactive states |
| 134 | +- **Hover:** border shifts to `--color-primary` (cards); background shifts to `#EEF2FF` (ghost buttons); opacity `0.9` (primary buttons); `translateY(-1px)`. |
| 135 | +- **Press / active:** `transform: translateY(1px)` on CTA buttons. |
| 136 | +- **Focus:** visible ring `0 0 0 3px rgba(99,102,241,0.12)` on inputs; `outline: 2px solid var(--color-primary); outline-offset: 2px` on buttons. **Focus must always be visible** — a pre-delivery checklist item. |
| 137 | +- **Disabled:** `opacity: 0.4; cursor: not-allowed; pointer-events: none`. |
| 138 | +- **Loading:** `opacity: 0.7` + inline spinner (2.5px white ring rotating 0.7s). |
| 139 | + |
| 140 | +### Borders & Dividers |
| 141 | +- Card border: `1px solid #E2E8F0` (slate-200). |
| 142 | +- List divider: `divide-y divide-slate-100` (`#F1F5F9`) — lighter than card borders for dense lists. |
| 143 | +- **Never:** colored left-border accents on cards. Not a Label Suite pattern. |
| 144 | + |
| 145 | +### Shadows |
| 146 | +Only on **modals**, **dropdowns**, **toasts**, and the **login card**. Cards, panels, and nav bars are shadow-free. The system defines `--shadow-sm` through `--shadow-xl` plus a bespoke `--shadow-card` (`0 4px 24px rgba(99, 102, 241, 0.10), 0 1px 4px rgba(0, 0, 0, 0.06)`) used on the login/auth card specifically. |
| 147 | + |
| 148 | +### Corner Radii |
| 149 | +- `4px` badges, chips |
| 150 | +- `8px` buttons, inputs, small cards |
| 151 | +- `12px` panels, dashboards |
| 152 | +- `16px` modals, login card |
| 153 | +- `9999px` avatars, pill badges, progress bars |
| 154 | + |
| 155 | +### Transparency & Blur |
| 156 | +- **Modal overlay only:** `rgba(0, 0, 0, 0.5)` + `backdrop-filter: blur(4px)`. |
| 157 | +- **Avatar border:** `2px solid rgba(99, 102, 241, 0.16)` — the single other translucency. |
| 158 | + |
| 159 | +### Layout Rules |
| 160 | +Three shell patterns, strictly: |
| 161 | + |
| 162 | +- **Pattern A (Header + Content)** — Dashboard, Settings. Sticky 64px top navbar; content `max-w-7xl mx-auto px-4…8`, `pt-6` below navbar. |
| 163 | +- **Pattern B (Sidebar + Content)** — Annotation task pages. Fixed 240px left sidebar holding label palette, task metadata, progress. |
| 164 | +- **Pattern C (Header + Sidebar + Content)** — Profile, multi-section settings. 64px navbar + 224px sidebar + `max-w-3xl` content. |
| 165 | + |
| 166 | +Mobile collapses Pattern A's navbar links into a hamburger drawer and adds a 56px bottom tab bar. `navbar-mobile-top-height: 64px`, `navbar-mobile-height: 84px`. |
| 167 | + |
| 168 | +--- |
| 169 | + |
| 170 | +## Iconography |
| 171 | + |
| 172 | +### What the product uses |
| 173 | +**Lucide / Feather-style 24×24 line icons, 2px stroke, `currentColor`.** Every icon in the prototype HTML is hand-authored inline SVG matching the Lucide/Feather visual grammar: `stroke-linecap="round"`, `stroke-linejoin="round"`, `fill="none"`, `stroke-width="2"`. |
| 174 | + |
| 175 | +The brand mark itself is a **price tag** glyph — drawn inline in every page's navbar instead of loaded as a file, though clean SVG versions are also shipped in `assets/logo/`. |
| 176 | + |
| 177 | +### Included in `assets/` |
| 178 | +- `assets/logo/banner.svg` — 1280×200 README banner (Label Suite wordmark + tag icon on indigo square). |
| 179 | +- `assets/logo/icon.svg` — 24×24 monochrome tag, stroke="currentColor". |
| 180 | +- `assets/logo/icon-colored.svg` — 48×48 white tag on `#6366F1` rounded square. |
| 181 | +- `assets/logo/logo-horizontal.svg` — icon + "Label Suite" wordmark at 200×48. |
| 182 | +- `assets/logo/social-preview.svg` — social card variant. |
| 183 | +- `assets/icons/` — UI glyphs: tag, globe, mail, lock, eye, eye-off, logout, user, settings, task, dashboard, chart, check, x, alert-circle, info, plus. All Lucide-matched. |
| 184 | +- `assets/google-g.svg` — the Google "G" SSO multi-color mark. |
| 185 | + |
| 186 | +### Rules |
| 187 | +- **SVG only.** No PNG icons, no icon fonts, no emoji. |
| 188 | +- **24×24 viewBox, 2px stroke, round caps/joins.** If you need a new icon, match this grammar. |
| 189 | +- **`currentColor` stroke** so icons inherit text color from context. |
| 190 | +- **`aria-hidden="true"`** by default; pair with an accessible label on the parent (`aria-label` on button, or adjacent `<span>` text). |
| 191 | +- **Google SSO icon** is the single full-color exception; ship Google's official multi-path G. |
| 192 | +- **Substitution:** if you need a glyph not present, fall back to [Lucide](https://lucide.dev/) via CDN — it matches the stroke weight and style exactly. Document the substitution inline as a code comment. |
| 193 | +- **Emoji & unicode dingbats:** never. `❌` in anti-pattern tables is allowed in *documentation markdown* only. |
| 194 | + |
| 195 | +--- |
| 196 | + |
| 197 | +## Index (root files) |
| 198 | + |
| 199 | +| File | Purpose | |
| 200 | +|---|---| |
| 201 | +| `README.md` | This file. Product context, content fundamentals, visual foundations, iconography. | |
| 202 | +| `colors_and_type.css` | Canonical CSS vars: colors, type, spacing, radii, shadows, z-index. Import this from every prototype. | |
| 203 | +| `SKILL.md` | Agent-Skill-compatible entry point. Read when invoking this as a Claude Code skill. | |
| 204 | +| `assets/logo/` | Logos (banner, icon, horizontal, social). | |
| 205 | +| `assets/icons/` | 24×24 line-icon set (Lucide-style, stroke `currentColor`). | |
| 206 | +| `assets/google-g.svg` | Google SSO mark. | |
| 207 | +| `fonts/README.md` | Font manifest + substitution notes. | |
| 208 | +| `preview/` | HTML cards that populate the Design System tab — one sub-concept per card. | |
| 209 | +| `ui_kits/web-app/` | React/JSX UI kit for the Label Suite web app (login, dashboard, task list, components). | |
| 210 | + |
| 211 | +See each subfolder's `README.md` for more. |
| 212 | + |
| 213 | +--- |
| 214 | + |
| 215 | +## Caveats |
| 216 | + |
| 217 | +- **No slide template was provided.** `slides/` is intentionally not created. |
| 218 | +- **Fonts** are 100% Google Fonts — no self-hosted TTFs needed, no substitutions flagged. |
| 219 | +- **Pencil (`.pen`) source** is encrypted and not read here; all tokens recovered from `design/system/MASTER.md` and the prototype HTML. |
| 220 | +- **Annotation task page (Pattern B)** is referenced in MASTER.md but the prototype never implemented it. The UI kit ships the login, dashboard, and shared components; annotation surface is not mocked. |
0 commit comments