mirror of
https://github.com/zuiidea/antd-admin
synced 2026-11-24 15:01:12 +00:00
docs: standardize README structure and remove oxfmt configs
Reorganize root README sections for template onboarding, translate remaining with-lingui README Chinese notes, and drop redundant .oxfmt.toml files from both templates. Made-with: Cursor
This commit is contained in:
@@ -1,39 +1,17 @@
|
||||
# Antd Admin
|
||||
|
||||
A practical admin monorepo with two production-style templates, mock-first development, and test coverage.
|
||||
## Introduction
|
||||
|
||||
- **`apps/basic`**: English-only setup
|
||||
- **`apps/with-lingui`**: Bilingual setup (`en` + `zh`) with Lingui
|
||||
- **`apps/docs`**: Nextra documentation site
|
||||
- **`packages/create`**: `init-antd-admin` scaffolding CLI
|
||||
Antd Admin provides production-style admin templates with modern frontend tooling, mock-first development, and practical testing coverage.
|
||||
|
||||
## Links
|
||||
Available templates:
|
||||
- `basic`: English-only setup
|
||||
- `with-lingui`: Bilingual setup (`en` + `zh`) with Lingui
|
||||
|
||||
- [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)](http://opensource.org/licenses/MIT)
|
||||
Scaffolding CLI:
|
||||
- `init-antd-admin` (from `packages/create`)
|
||||
|
||||
## Tech Stack
|
||||
|
||||
| Category | Technology |
|
||||
| --- | --- |
|
||||
| Build tool | [Vite+](https://viteplus.dev) |
|
||||
| UI | [Ant Design 6.x](https://ant.design) |
|
||||
| Routing | [TanStack Router](https://tanstack.com/router) |
|
||||
| Async state | [TanStack Query v5](https://tanstack.com/query) |
|
||||
| Local state | [Zustand](https://zustand.docs.pmnd.rs) |
|
||||
| Validation | [Zod v4](https://zod.dev) |
|
||||
| i18n | [LinguiJS](https://lingui.dev) in `apps/with-lingui` |
|
||||
| Mocking | [MSW 2.x](https://mswjs.io) |
|
||||
| E2E tests | [Playwright](https://playwright.dev) |
|
||||
| Language | TypeScript 5.9 (strict) |
|
||||
|
||||
## Highlights
|
||||
## Key Features
|
||||
|
||||
- JWT login with access/refresh flow
|
||||
- Backend-driven menu and permission guards
|
||||
@@ -41,17 +19,13 @@ A practical admin monorepo with two production-style templates, mock-first devel
|
||||
- Dark mode theme switching
|
||||
- Mock-first local development (no backend required)
|
||||
- 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
|
||||
|
||||
## Templates
|
||||
## Quick Start
|
||||
|
||||
| Template | Use when |
|
||||
| --- | --- |
|
||||
| `with-lingui` | You need multilingual UI (`en` + `zh`) and Lingui workflow |
|
||||
| `basic` | You need a simpler English-only setup |
|
||||
|
||||
## `init-antd-admin` Usage
|
||||
|
||||
Use the scaffolding CLI to create a standalone app from official templates.
|
||||
Use `init-antd-admin` to scaffold a standalone app from official templates.
|
||||
|
||||
### Interactive
|
||||
|
||||
@@ -81,10 +55,20 @@ pnpm dlx init-antd-admin@latest my-app --example with-lingui --skip-install
|
||||
| `--skip-transforms` | Skip rewrite transforms |
|
||||
| `--no-git` | Skip git initialization |
|
||||
|
||||
For package-specific details, see [`packages/create/README.md`](./packages/create/README.md).
|
||||
For detailed CLI behavior, see [`packages/create/README.md`](./packages/create/README.md).
|
||||
|
||||
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
|
||||
@@ -1,25 +0,0 @@
|
||||
# oxfmt configuration for antd-admin
|
||||
# Reference: https://oxc.rs/docs/guide/formatter
|
||||
|
||||
# Line width for formatting
|
||||
line_width = 100
|
||||
|
||||
# Indentation
|
||||
indent_width = 2
|
||||
use_tabs = false
|
||||
|
||||
# Semicolons
|
||||
semi = true
|
||||
|
||||
# Quotes
|
||||
single_quote = false
|
||||
|
||||
# Trailing commas
|
||||
trailing_comma = "es5"
|
||||
|
||||
# Arrows
|
||||
arrow_parens = "always"
|
||||
|
||||
# Spaces
|
||||
bracket_spacing = true
|
||||
space_before_function_parentheses = false
|
||||
@@ -1,25 +0,0 @@
|
||||
# oxfmt configuration for antd-admin
|
||||
# Reference: https://oxc.rs/docs/guide/formatter
|
||||
|
||||
# Line width for formatting
|
||||
line_width = 100
|
||||
|
||||
# Indentation
|
||||
indent_width = 2
|
||||
use_tabs = false
|
||||
|
||||
# Semicolons
|
||||
semi = true
|
||||
|
||||
# Quotes
|
||||
single_quote = false
|
||||
|
||||
# Trailing commas
|
||||
trailing_comma = "es5"
|
||||
|
||||
# Arrows
|
||||
arrow_parens = "always"
|
||||
|
||||
# Spaces
|
||||
bracket_spacing = true
|
||||
space_before_function_parentheses = false
|
||||
+11
-21
@@ -1,27 +1,17 @@
|
||||
<p align="center">
|
||||
<a href="http://github.com/zuiidea/antd-admin" target="_blank">
|
||||
<img alt="antd-admin-logo" height="80" src="./public/favicon.svg">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<h1 align="center">Antd Admin</h1>
|
||||
|
||||
<div align="center">
|
||||
# Antd Admin
|
||||
|
||||
Balanced admin scaffold: i18n (Lingui), MSW mocks, minimal RBAC, full CRUD, and Playwright E2E — built with React 19, Ant Design 6, and Vite+. AI-friendly with clear patterns, shared abstractions, scoped AI instructions, and type-safe contracts at every boundary.
|
||||
|
||||
**AI rules (Cursor):** `.cursor/rules/with-lingui-*.mdc` at the repo root mirrors `apps/with-lingui/.github/instructions/*.instructions.md` (same intent; `globs` align with each file’s `applyTo`). Prefer updating **both** when you change guidance.
|
||||
|
||||
[](https://github.com/ant-design/ant-design)
|
||||
[](https://react.dev)
|
||||
[](https://viteplus.dev)
|
||||
[](https://www.typescriptlang.org/)
|
||||
[](https://github.com/zuiidea/antd-admin/issues)
|
||||
[](https://github.com/zuiidea/antd-admin/stargazers)
|
||||
[](http://opensource.org/licenses/MIT)
|
||||
[](https://github.com/zuiidea/antd-admin/pulls)
|
||||
|
||||
</div>
|
||||
[antd](https://github.com/ant-design/ant-design)
|
||||
[react](https://react.dev)
|
||||
[vite](https://viteplus.dev)
|
||||
[TypeScript](https://www.typescriptlang.org/)
|
||||
[GitHub issues](https://github.com/zuiidea/antd-admin/issues)
|
||||
[GitHub stars](https://github.com/zuiidea/antd-admin/stargazers)
|
||||
[License](http://opensource.org/licenses/MIT)
|
||||
[PRs Welcome](https://github.com/zuiidea/antd-admin/pulls)
|
||||
|
||||
## Tech Stack
|
||||
|
||||
@@ -166,9 +156,9 @@ Ant Design strings follow the active locale via `ConfigProvider` in `__root.tsx`
|
||||
|
||||
### AI instruction files
|
||||
|
||||
**细则单源**:`apps/with-lingui/.github/instructions/`(`*.instructions.md`),人类与 Agent 以该目录为准维护、评审。
|
||||
**Single source of truth**: `apps/with-lingui/.github/instructions/` (`*.instructions.md`). Both humans and agents should maintain and review guidance from this directory.
|
||||
|
||||
**Cursor**:仓库根 `.cursor/rules/with-lingui-*.mdc` 为**薄规则**(方案 A):只写范围与指向路径,`globs` 与上述文件的 `applyTo` 对齐;全文请在对话中 `@` 对应 `.instructions.md` 或自行打开该文件。
|
||||
**Cursor**: The root `.cursor/rules/with-lingui-*.mdc` files are intentionally thin rules (Approach A), containing only scope and pointer paths. Keep `globs` aligned with each instruction file's `applyTo`; for full details, reference the target `.instructions.md` file in chat with `@` or open it directly.
|
||||
|
||||
## Developer Notes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user