Metadata-Version: 2.4
Name: webapp-ui-design
Version: 3.1.0
Summary: Bộ quy chuẩn thiết kế UI cho AI agent: skill + catalog + engine `uid` (cài skill, tra cứu, xuất design token, kiểm contrast/UX)
Author: bynne2602
License-Expression: MIT
Project-URL: Homepage, https://github.com/bynne2602/webapp-ui-design
Project-URL: Issues, https://github.com/bynne2602/webapp-ui-design/issues
Keywords: design-system,ui,ux,design-tokens,agent,skill
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: User Interfaces
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: LICENSE-CONTENT.md
Requires-Dist: PyYAML>=6
Requires-Dist: jsonschema>=4.18
Requires-Dist: Jinja2>=3.1
Provides-Extra: image
Requires-Dist: Pillow>=10; extra == "image"
Provides-Extra: browser
Requires-Dist: playwright>=1.45; extra == "browser"
Provides-Extra: embed
Requires-Dist: sentence-transformers>=3; extra == "embed"
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == "dev"
Requires-Dist: Pillow>=10; extra == "dev"
Requires-Dist: pre-commit>=3; extra == "dev"
Dynamic: license-file

# webapp-ui-design

[![License: MIT](https://img.shields.io/badge/code-MIT-blue.svg)](LICENSE) [![Content: CC BY 4.0](https://img.shields.io/badge/content-CC%20BY%204.0-blue.svg)](LICENSE-CONTENT.md) ![Skill 3.1.0](https://img.shields.io/badge/skill-3.1.0-informational)

**A UI and graphic design rulebook for AI coding agents** (Claude Code, Codex, Cursor, Copilot, Gemini, Windsurf). The agent reads coded rules, each with a rationale, do/don't examples and an authoritative source, and builds web, iOS, Android, tablet and desktop interfaces that follow real design principles instead of looking "AI-made".

> Content is written in Vietnamese with English IDs and code. Tiếng Việt: [README.vi.md](README.vi.md).

- **18 rule files** (`skill/rules/`): visual principles, typography, color, grid, UX laws, components, motion, WCAG 2.2, content, anti-"AI look", review checklist, Material 3 / HIG / Fluent / GOV.UK, 32 industries, color library, light/dark theming, responsive, user behavior, component library.
- **Real-site data**: 1,062 sites in 32 industries, 92,465 component samples of 26 types measured at desktop, tablet, phone and in dark mode (`docs/dataset/`).
- **15 workflows**: screens, landing pages, dashboards, app flows, audits, redesigns, design systems, platform ports, responsive.
- **`uid` engine** (optional): search 239 catalog entities, export design tokens (CSS, Tailwind, SwiftUI, Compose, Flutter, Figma), check contrast and UX issues.

## Quick install

Pick **one**. Options 1 and 2 need no Python.

### 1. Claude Code plugin
```
/plugin marketplace add bynne2602/webapp-ui-design
/plugin install webapp-ui-design@webapp-ui-design
```

### 2. npx (Node ≥ 18 and git)
```bash
npx github:bynne2602/webapp-ui-design init --global      # all projects: ~/.claude/skills + ~/.agents/skills
npx github:bynne2602/webapp-ui-design init               # current project only
npx github:bynne2602/webapp-ui-design init --target all  # also Cursor, Copilot, Gemini, Windsurf rules
npx github:bynne2602/webapp-ui-design doctor             # check the optional uid engine
```
Catalog data is copied to `~/.webapp-ui-design`, so clearing the npm cache does not break it. Re-run `init` to update. Once the package is on npm: `npx webapp-ui-design init --global`.

### 3. pip
Once the package is on PyPI (skill and data bundled):
```bash
pip install webapp-ui-design
uid install-skill --global     # or, inside a project: uid install-skill
```
From source (to modify or contribute):
```bash
git clone https://github.com/bynne2602/webapp-ui-design
cd webapp-ui-design
pip install -e .            # Python ≥ 3.10; add ".[image,browser]" for image analysis and rendering
uid build && uid validate
```
After `npx ... --global`, `pip install "git+https://github.com/bynne2602/webapp-ui-design"` is enough: `uid` finds the data in `~/.webapp-ui-design`.

### 4. claude.ai Skills
Download the [repo zip](https://github.com/bynne2602/webapp-ui-design/archive/refs/heads/main.zip), zip the `skill/` folder as `webapp-ui-design.zip` and upload it in the Skills section of claude.ai settings.

## Usage
Ask your agent as usual: *"build a landing page for a dental clinic"*, *"review this checkout page"*, *"add dark mode to this dashboard"*. The skill picks a workflow, reads the relevant rules and answers as **Brief → Tokens → Code → Checklist**.

```bash
uid search "bottom navigation for a banking app" --platform ios --limit 5
uid show cmp.tab-bar --platform ios --form-factor tablet --industry fintech
uid tokens export --to css,tailwind,swiftui,compose,flutter,figma --preset fintech-trust
uid check ux page.html
```
More: [docs/getting-started.md](docs/getting-started.md) · [docs/cli.md](docs/cli.md) · rule index: [skill/rules/README.md](skill/rules/README.md).

Maintainers: publishing to npm/PyPI is described in [docs/publishing.md](docs/publishing.md).

## Layout
| Layer | Path | |
|---|---|---|
| Skill | `skill/` | SKILL.md, 18 rule files + 22 do/don't images, 15 workflows, 11 references, UI kit |
| Data | `docs/dataset/` | real-site measurements, layout notes, per-type component CSVs |
| Knowledge | `catalog/`, `tokens/`, `references/` | 239 entities, 3-tier DTCG tokens, 10 presets × light/dark/high-contrast |
| Engine | `engine/ui_intel/` | `uid` CLI |
| Distribution | `adapters/`, `.claude-plugin/`, `bin/` | per-agent adapters, Claude Code plugin, npx installer |

## Status
See [docs/status.md](docs/status.md) and [CHANGELOG.md](CHANGELOG.md) for what is verified, what is limited, and real sample counts per component type.

## License
Code: MIT ([LICENSE](LICENSE)). Rules, catalog, tokens, data: CC-BY-4.0 ([LICENSE-CONTENT.md](LICENSE-CONTENT.md)). Apple, Google and Microsoft guidelines are summarized in our own words with links, never copied. Research screenshots of third-party sites are not included.
