shardkit
Health Pass
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Community trust — 31 GitHub stars
Code Pass
- Code scan — Scanned 12 files during light audit, no dangerous patterns found
Permissions Pass
- Permissions — No dangerous permissions requested
No AI report is available for this listing yet.
Copy-in admin dashboard & admin panel UI kit for React — 27 finished page cases (CRUD, tables, forms, dashboards, plan-flow) + 42 components for internal tools and backoffice apps. Refine + Tailwind CSS + shadcn/ui. Agent-readable registry. No npm install.
ShardKit

A copy-in UI shard kit — browse, preview, ship.
A searchable, previewable gallery of finished page cases and UI components.
Not an npm dependency. You copy the code in.Built for admin dashboards, admin panels, backoffice and internal tools —
or for an AI agent to assemble a page straight from the machine-readable registry.
ShardKit = shard (a reusable UI fragment) + kit (the toolbox that organizes them).
It is not a component library you npm install. It is a live gallery where fragments are
classified, searched, previewed — and then copied into your own project.
Baseline stack: Refine (headless) + Tailwind CSS + shadcn/ui. The registry is stack-agnostic;
other stacks can be indexed the same way.
What you can build with it
The cases here are not toy demos. Each one is a complete page you can lift into a real
admin dashboard, admin panel, backoffice, or internal tool — pull the directory
in, point it at your API, done.
| You need… | Start from | Route |
|---|---|---|
| A CRUD admin panel with dialog forms | Dialog-based list case | /list |
| A CRUD admin panel with full-page forms | Page-based list case | /list-page |
| A dashboard with KPI cards and charts | Dashboard case | /dashboard |
| An admin table with sorting, filtering, bulk actions | Table cases (incl. striped) | /table |
| A search / query page with a filter bar | Query cases | /search |
| A read-only detail page | Descriptions case | /detail-view |
| A DAG / workflow view with playback | Plan flow | /plan-flow |
| A form page with validation | Form cases | /form |
Building an AI agent console? The registry is machine-readable: registry.json lists every
entry with its declared deps and files, so an agent can pick a shard and wire it in
without crawling the DOM or guessing imports.
Why
UI assets rot in old repos. Need a button, a form layout, an empty state — you go archaeology.
ShardKit's answer: a museum + a search desk + a set of runnable page cases.
See it, find it, copy it.
What it is / is not
| Is | A standalone open-source project: a searchable, previewable gallery of UI components and finished pages, runnable end to end |
| Is not | Not another npm component library; not bound to any product's business domain |
| Audience | Developers / teams / agents who need to find a reusable UI fragment and lift it |
| Consumption | Copy-in — copy the source files you need into your project. No npm install shardkit |
Consumption model (copy-in)
Same philosophy as shadcn/ui. ShardKit is its organizing + searching layer.
- Minimum copy unit = one directory
registry-items/<id>/index.tsx— the source, copy and usedemo.tsx— the live preview (the detail page renders this)meta.json— declareddeps,files,usability
- Every entry declares its dependencies and placement explicitly.
- To consume: copy
index.tsxinto your project, install the declareddeps, done.
You never add ShardKit as a dependency.
Built with ShardKit
The copy-in model only counts if someone actually ships with it. One does.
AgentGeeX — a self-hosted MCP orchestration
control plane (Apache-2.0; Python engine + React console). Its web console webtools/client
is built on this kit's primitives and stack.
Verified 2026-11-27 by diffing the two trees file by file:
| Check | Result |
|---|---|
packages/ui components in AgentGeeX |
14 |
Byte-identical to ShardKit's src/components/ui |
8 |
| Diverged — ShardKit moved ahead after the copy | 6 |
| Shared stack | Refine 4.57 · React Flow 12 · TanStack Query 5.59 · Radix · CVA · lucide 0.454 |
The 6 diverged files are not forks — they are what ShardKit became after the snapshot:
| Component | What AgentGeeX's copy predates |
|---|---|
button.tsx |
unified border on every button, plus purpose-based colour split |
dialog.tsx |
surface="canvas" two-tier dialog shell (DialogBody auto-frames) |
table.tsx |
striped zebra rows via context, rounded container |
card.tsx |
data-card marker + shadow-surface token |
separator.tsx |
rewritten on the Radix primitive |
badge.tsx |
success / warning / info variants |
That is the consumption model working as designed: they took a snapshot, shipped it,
and ShardKit kept moving without breaking them.
Using ShardKit somewhere? Open an issue with a link — it gets listed here.
Features
- Registry-driven — add a component = drop a
registry-items/<id>/directory and runnode scripts/build-registry.mjs. No page code changes. - Live preview — detail pages render the real component, not a screenshot.
- Multi-dimensional search — category tree + tag multi-select + fuzzy keyword search.
- Page cases first — every case is a complete, runnable page that looks like a real app.
- Two CRUD layouts side by side — dialog-based (
/list) and page-based (/list-page),
sharing one form and one in-memory store. - DAG visualization —
/plan-flowrenders real plan exports with playback, collapsible
subtrees, auto-fit layouts and viewport follow. - Bilingual UI —
zh-CN/en-US, auto-detected from the browser, switchable in the header. - Offline by design — no CDN, no runtime network calls; icons are bundled
lucide-react.
Tech stack
Every row below is actually imported by the source in src/ — no "came with the template" leftovers.
| Layer | Technology | Version | Used for |
|---|---|---|---|
| App shell & data | Refine (headless) | 4.57 | routing + data layer, zero UI opinions — the UI is all ours |
| UI runtime | React | 18.3 | every page and primitive |
| Language | TypeScript | 5.6 | strict mode; tsc -b gates the build |
| Build / dev | Vite | 5.4 | dev server on :5178, production build |
| Styling | Tailwind CSS | 3.4 | layout, spacing and color — all through design tokens, no ad-hoc hex |
| Primitives | shadcn/ui pattern | copy-in | 42 primitives in src/components/ui/, copied in rather than installed |
| A11y behaviour | Radix UI | 14 packages | dialog / select / tabs / tooltip — keyboard, focus trap, ARIA |
| Routing | React Router | 6.27 | nested routes + the multi-tab workspace |
| Server state | TanStack Query | 5.59 | cache, loading and error states in the case pages |
| DAG canvas | React Flow (@xyflow/react) |
12 | /plan-flow graph: pan/zoom, custom nodes, playback |
| Auto layout | dagre | 3.1 | layered layout of the plan graph before the custom column pass |
| Charts | Recharts | 2.15 | dashboard widgets |
| Rich text | Tiptap | 3.31 | editor case |
| Markdown input | @uiw/react-md-editor | 4.1 | markdown editor case |
| Icons | Lucide | 0.454 | one icon set across the whole repo, tree-shaken |
| Variant API | cva + tailwind-merge + clsx | 0.7 / 2.5 / 2.1 | the variant / size props every primitive exposes |
| i18n | i18next + react-i18next | 23 / 15 | zh-CN + en-US, both bundled at build time (no runtime fetch) |
| E2E | Playwright | 1.63 | 28 scripts/verify_*.mjs gates run headless against a real browser |
| Build scripts | Node | ≥ 20 | generate registry/index.json and page bundles from registry-items/ |
Deliberately not used: any CSS-in-JS runtime, any state-management library, any UI kit that
ships its own visual language. If you copy a shard out, the only thing it drags along is Tailwind
classes and Radix primitives.
Screenshots
Plan flow — DAG visualization with playback
/plan-flow renders a real plan export (137 nodes) as a DAG: auto-collapsed into 17 mainline
columns, auto-fit to one screen, subtrees collapsible, and playback that glides the viewport to
keep the currently executing node centered while finished edges light up green.
| Overview — auto-collapsed & fit to one screen | Playback — current node held at center |
|---|---|
![]() |
![]() |
| Another topology (fan-out + join) | Fullscreen presentation mode |
|---|---|
![]() |
![]() |
Page cases
| Dashboard | List · dialog CRUD |
|---|---|
![]() |
![]() |
| Form page | Table · basic |
|---|---|
![]() |
![]() |
| Search · orders | Detail · read-only |
|---|---|
![]() |
![]() |
Components
| Widget gallery | Form controls (all examples) |
|---|---|
![]() |
![]() |
Quick start
npm install # install dependencies
npm run dev # build metadata + start Vite → http://localhost:5178/
npm run build # production build (tsc type-check + vite build)
npm run preview # preview the production build → http://localhost:4178/
Requires Node.js >= 20.
Project structure
shardkit/
├── registry-items/ # ★ the copy-in units — one directory per entry
│ └── <id>/{index.tsx,demo.tsx,meta.json}
├── registry/ # the search "database"
│ ├── schema.json # public data contract for an entry
│ ├── index.json # generated full index (committed on purpose)
│ └── items/
├── src/ # the gallery SPA (Refine + Tailwind + shadcn)
│ ├── pages/cases/* # finished page cases
│ ├── components/ui/* # 42 shadcn-style primitives
│ ├── components/shell.tsx # app shell: sidebar + tabs + header
│ ├── lib/{registry,cases} # registry & case metadata
│ └── i18n/ # locales (zh-CN / en-US)
├── scripts/ # build + verification scripts
├── agent_doc/ # engineering docs (design rules, i18n guide, architecture)
├── assets/screenshots/ # README images (en/ for this file, zh-CN/ for the Chinese README)
└── public/ # static assets, generated bundles
Adding a component
- Create
registry-items/<id>/(lowercase, hyphenated — e.g.button-primary). - Add
index.tsx(copy-ready source),demo.tsx(preview),meta.json(metadata). - Run
node scripts/build-registry.mjs. - The entry appears in the gallery and is searchable — no page code to touch.
Full field list: registry/schema.json.
Step-by-step guide: CONTRIBUTING.md.
Internationalization
i18next + react-i18next, locale packs bundled — zero network calls at runtime.
| Locales | zh-CN (source) · en-US |
| First visit | detected from navigator.language; unrecognized → English |
| Persistence | localStorage["shardkit.locale"], synced to <html lang> |
| Packs | src/i18n/locales/{zh-CN,en-US}.ts (281 keys, 14 namespaces) |
Scope, stated honestly: the framework layer is fully translated — navigation, tabs,
breadcrumbs, table headers, detail field labels, list/search toolbars, pagination, buttons,
empty states, form labels and validation. Example page content (mock data, demo copy) is
Chinese-first; agent_doc/国际化-i18n改造指南.md lists every remaining file and ships a
ready-to-paste prompt for finishing the job with an agent.
Verification
UI correctness here is measured, not eyeballed. Scripts drive Playwright and assert numbers.
npx tsc -b # type check (exit code 0)
node scripts/check-ui-rules.mjs # design-token / class-name budget
node scripts/verify_surfaces.mjs # surface contrast + layering
node scripts/verify_content_frame_20261028.mjs # 26 routes, asserts 0 page errors
node scripts/verify_plan_flow.mjs # plan-flow regression (zoom, folding, fit)
Most scripts need the dev server running on port 5178.
Docs
| Document | Contents |
|---|---|
agent_doc/usage-manual.md |
Project manual: directory map, workflows, conventions |
agent_doc/architecture.md |
Architecture, server-side options, data flow |
agent_doc/国际化-i18n改造指南.md |
i18n guide: coverage, five hard rules, remaining backlog |
agent_doc/计划任务流程图-使用文档.md |
Plan flow (DAG) component manual |
CHANGELOG.md |
Release notes |
Roadmap
- M0 Skeleton: directory layout, registry schema, build scripts
- M1 Gallery SPA (Refine + Tailwind + shadcn) + registry-driven loop
- M1.5 First external consumer ships — AgentGeeX web console
- M3 Page cases: dialog CRUD, page CRUD, dashboard, forms, tables, plan flow
- M2 Fuzzy search (Fuse.js) + multi-facet filtering
- M4 Governance + static publishing
Contributing
Read CONTRIBUTING.md. Adding an entry is the main path; UI changes
should keep the verification scripts green.
Brand assets
| File | Size | Use |
|---|---|---|
public/logo.svg |
vector | Single source — favicon and the in-app brand mark |
assets/logo.png |
512×512 | Raster logo for READMEs, slides, third-party listings |
assets/social-preview.png |
1280×640 | GitHub repo social preview (Settings → Social preview) |
public/favicon.ico |
16–256 | Legacy browsers, RSS readers, link unfurlers |
The mark is a capital K plus a lowercase s (ShardKit) in white on a blue→violet gradient.
Every PNG/ICO above is generated from logo.svg — regenerate with:
node scripts/rasterize_logo.mjs
Do not hand-edit the bitmaps: the output is byte-for-byte reproducible, so any manual
touch-up will silently drift from the vector.
License
MIT © 2026 ShardKit contributors.
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found











