Files
antd-admin/apps/docs/content/zh/getting-started/folder-structure.mdx
T
Cursor Agentandzuiidea 8ab7ade30b refactor(api): introduce defineApi + axios request layer
Replace ad-hoc fetch httpClient with api/request.ts (axios interceptors,
envelope unwrap, auth refresh) and defineApi-based resource modules.
Move session hydration into api/auth, sync both templates, and update docs.

Co-authored-by: zuiidea <zuiiidea@gmail.com>
2026-10-18 03:48:28 +00:00

26 lines
1.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: 目录结构
description: 模板应用 src 目录职责说明
---
# 目录结构
两个模板的目录高度一致,差异主要在 **i18n(`locales/`)** 与 **部分脚本**。以下以 `apps/with-lingui` 为例(`apps/basic` 无 `locales/`,且无 Lingui 相关脚本)。
```
src/
├── api/ # Zod schema、request(axios + defineApi)、资源 API
├── components/ # 通用 UI(表格壳、表单弹窗、布局等)
├── hooks/ # 主题、权限、CRUD 等组合逻辑
├── locales/ # Lingui:仅 with-lingui(en/zh .po)
├── mocks/ # MSW handlers 与浏览器 worker
├── routes/ # TanStack Router 文件路由
├── stores/ # Zustand(auth、settings 等持久化)
└── utils/ # 常量、菜单等(传输层在 api/request.ts)
```
更完整的树状说明见:
- [apps/basic/README.md](https://github.com/zuiidea/antd-admin/blob/master/apps/basic/README.md)
- [apps/with-lingui/README.md](https://github.com/zuiidea/antd-admin/blob/master/apps/with-lingui/README.md)