mirror of
https://github.com/zuiidea/antd-admin
synced 2026-10-24 17:24:04 +00:00
Expand template READMEs with src/api layout, fix CLI table and E2E script references. Co-authored-by: Cursor <cursoragent@cursor.com>
83 lines
2.8 KiB
Markdown
83 lines
2.8 KiB
Markdown
# 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` (from `packages/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 (`defineApi` per domain, Zod schemas, shared `API_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
|
|
|
|
```bash
|
|
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
|
|
|
|
```bash
|
|
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](./AGENTS.md) at the repo root.
|
|
|
|
Production docs: [https://antd-admin-doc.zuiidea.top](https://antd-admin-doc.zuiidea.top)
|
|
|
|
## Links
|
|
|
|
- [Ant Design](https://github.com/ant-design/ant-design)
|
|
- [React](https://react.dev)
|
|
- [Vite+](https://viteplus.dev)
|
|
- [TypeScript](https://www.typescriptlang.org/)
|
|
- [Issues](https://github.com/zuiidea/antd-admin/issues)
|
|
- [Stars](https://github.com/zuiidea/antd-admin/stargazers)
|
|
- [PRs Welcome](https://github.com/zuiidea/antd-admin/pulls)
|
|
|
|
## License
|
|
|
|
MIT |