Files
antd-admin/apps/docs/content/en/getting-started/folder-structure.mdx
zuiideaandCursor b8bb7713b3 docs: align site with modular src/api layout
Document API_PREFIX, folder structure, templates, and E2E script usage in en/zh.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-18 21:17:47 +08:00

51 lines
1.5 KiB
Plaintext

---
title: Folder Structure
description: Key directories and responsibilities in the repository
---
# Folder Structure
```text
.
├─ apps/
│ ├─ basic/
│ ├─ with-lingui/
│ └─ docs/
├─ packages/
├─ pnpm-workspace.yaml
└─ turbo.json
```
## Directory Guide
- `apps/basic`: Main admin template (English)
- `apps/with-lingui`: Admin template with Lingui i18n
- `apps/docs`: Documentation site (Nextra + Next.js)
- `packages`: Shared packages and utilities
## Template app `src/` (basic / with-lingui)
Both templates share the same layout; **with-lingui** adds `src/locales/` and Lingui scripts.
```text
src/
├── api/
│ ├── request.ts # Transport (axios, defineApi, token refresh)
│ ├── schemas.ts # Compatibility re-exports
│ ├── shared/ # API_PREFIX, pagination, params, menu helpers
│ ├── auth/ # Auth paths, schemas, login / hydrateSession
│ └── users/ # User CRUD, query keys, path constants
├── components/
├── hooks/
├── mocks/ # MSW handlers (same path constants as api modules)
├── routes/
├── stores/
└── utils/ # Constants, menu tree — not HTTP transport
```
See **[Proxying API Requests](/en/backend/proxying-api-requests)** for the API layer and MSW/backend wiring.
## Recommendation
When creating reusable logic, prioritize placing it in `packages` rather than duplicating in app folders.