mirror of
https://github.com/zuiidea/antd-admin.git
synced 2026-10-20 00:15:38 +00:00
cursor/api-define-api-layer-5f85
Document API_PREFIX, folder structure, templates, and E2E script usage in en/zh. Co-authored-by: Cursor <cursoragent@cursor.com>
Antd Admin
Introduction
Antd Admin provides production-style admin templates with modern frontend tooling, mock-first development, and practical testing coverage.
Available templates:
basic: Admin template with plain-string UI copy (default English; no bundled Lingui)with-lingui: Lingui i18n workflow (en+zh) with locale switching
Scaffolding CLI:
init-antd-admin(frompackages/create)
Key Features
- JWT login with access/refresh flow
- Backend-driven menu and permission guards
- URL-synced table state (pagination, sorting, search)
- Dark mode theme switching
- Mock-first local development (no backend required)
- Modular API layer (
defineApiper domain, Zod schemas, sharedAPI_PREFIX) - Typed API boundaries and reusable CRUD patterns
- React 19 + Ant Design 6 + TanStack Router/Query + Zustand + Zod
- Optional Lingui-based i18n workflow (
with-lingui) - E2E coverage with Playwright
Quick Start
Use init-antd-admin to scaffold a standalone app from official templates.
Interactive
npx init-antd-admin@latest
pnpm dlx init-antd-admin@latest
yarn dlx init-antd-admin@latest
bunx init-antd-admin@latest
Non-interactive examples
pnpm dlx init-antd-admin@latest my-app --example basic -m pnpm
pnpm dlx init-antd-admin@latest my-app --example with-lingui --skip-install
Common options
| Option | Description |
|---|---|
[project-directory] |
Target folder |
-e, --example <name|url> |
Template name (basic, with-lingui) or URL |
--example-path <path> |
Subpath inside remote repository |
-m, --package-manager <pm> |
npm / pnpm / yarn / bun |
--skip-install |
Skip dependency install |
--skip-transforms |
Skip rewrite transforms |
--no-git |
Skip git initialization |
For detailed CLI behavior, see [packages/create/README.md](./packages/create/README.md).
AI / agent guidance
Each template app keeps AGENTS.md as the single source of truth (Cursor, Claude Code, Codex, etc.). Monorepo overview: AGENTS.md at the repo root.
Production docs: https://antd-admin-doc.zuiidea.top
Links
License
MIT
Languages
TypeScript
83%
MDX
7.3%
JavaScript
5.9%
CSS
3.3%
HTML
0.3%
Other
0.2%