docs: 完善项目说明和协作规则
This commit is contained in:
+88
-21
@@ -1,39 +1,106 @@
|
||||
<h1>vue-pure-admin Lite Edition(no i18n version)</h1>
|
||||
|
||||
[](LICENSE)
|
||||
# role-admin
|
||||
|
||||
**English** | [中文](./README.md)
|
||||
|
||||
## Introduce
|
||||
Store employee access-management admin UI, based on the `pure-admin-thin` template and customized for store, role, and employee CRUD workflows.
|
||||
|
||||
The simplified version is based on the shelf extracted from [vue-pure-admin](https://github.com/pure-admin/vue-pure-admin), which contains main functions and is more suitable for actual project development. The packaged size is introduced globally [element-plus](https://element-plus.org) is still below `2.3MB`, and the full version of the code will be permanently synchronized. After enabling `brotli` compression and `cdn` to replace the local library mode, the package size is less than `350kb`
|
||||
## Stack
|
||||
|
||||
## Supporting video
|
||||
- `Vue 3` + `TypeScript`
|
||||
- `Vite`
|
||||
- `Element Plus`
|
||||
- `Pinia`
|
||||
- `Vue Router`
|
||||
- `Axios`
|
||||
|
||||
[Click me to view UI design](https://www.bilibili.com/video/BV17g411T7rq)
|
||||
[Click me to view the rapid development tutorial](https://www.bilibili.com/video/BV1kg411v7QT)
|
||||
## Requirements
|
||||
|
||||
## Nanny-level documents
|
||||
- `Node.js`: `^20.19.0 || >=22.13.0`
|
||||
- `pnpm`: `>=9`
|
||||
- Local backend: `/Users/mac033/Desktop/my-project/access-manage`
|
||||
|
||||
[Click me to view vue-pure-admin documentation](https://pure-admin.cn/)
|
||||
[Click me to view @pureadmin/utils documentation](https://pure-admin-utils.netlify.app)
|
||||
## Local Development
|
||||
|
||||
## Premium service
|
||||
Start the backend first:
|
||||
|
||||
[Click me to view details](https://pure-admin.cn/pages/service/)
|
||||
```bash
|
||||
cd /Users/mac033/Desktop/my-project/access-manage
|
||||
pnpm mysql:up
|
||||
pnpm db:migrate
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
## Preview
|
||||
Then start this admin UI:
|
||||
|
||||
[Click me to view the preview station](https://pure-admin-thin.netlify.app/#/login)
|
||||
```bash
|
||||
cd /Users/mac033/Desktop/my-project/role-admin
|
||||
pnpm install
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
## Maintainer
|
||||
Open:
|
||||
|
||||
[xiaoxian521](https://github.com/xiaoxian521)
|
||||
```text
|
||||
http://localhost:8848/
|
||||
```
|
||||
|
||||
## ⚠️ Attention
|
||||
## Project Structure
|
||||
|
||||
The Lite version does not accept any issues and prs. If you have any questions, please go to the full version [issues](https://github.com/pure-admin/vue-pure-admin/issues/new/choose) to mention, thank you!
|
||||
```text
|
||||
.
|
||||
├── .codex/skills/ # Repository-local skill for keeping README.md in sync
|
||||
├── .husky/ # Git hooks for lint-staged and commitlint
|
||||
├── build/ # Vite plugin, CDN, compression, and build helpers
|
||||
├── mock/ # Template mock data for login and async routes
|
||||
├── public/ # Static assets and runtime platform config
|
||||
├── src/
|
||||
│ ├── api/ # HTTP API wrappers; business APIs live in access.ts
|
||||
│ ├── assets/ # Images, SVG files, and iconfont assets
|
||||
│ ├── components/ # Shared template components
|
||||
│ ├── config/ # Runtime config loader
|
||||
│ ├── directives/ # Custom Vue directives
|
||||
│ ├── layout/ # Admin layout, menu, tabs, navbar, and hooks
|
||||
│ ├── plugins/ # Plugin registration
|
||||
│ ├── router/ # Static routes, remaining routes, router instance, guards
|
||||
│ ├── store/ # Pinia stores
|
||||
│ ├── style/ # Global styles and themes
|
||||
│ ├── utils/ # Auth, HTTP, storage, message, progress, and tree helpers
|
||||
│ └── views/ # Pages; business pages live in employees, roles, stores
|
||||
├── types/ # Global TypeScript declarations
|
||||
├── AGENTS.md # Agent entrypoint that delegates to RTK.md
|
||||
├── RTK.md # Repository collaboration rules
|
||||
├── package.json # Dependencies, scripts, engines, and pnpm guard
|
||||
└── vite.config.ts # Vite dev proxy, plugins, and build output config
|
||||
```
|
||||
|
||||
## License
|
||||
This repository is not a monorepo and has no `packages/` directory. Important scripts are defined in `package.json`.
|
||||
|
||||
[MIT © 2020-present, pure-admin](./LICENSE)
|
||||
## Important Scripts
|
||||
|
||||
| Script | Purpose |
|
||||
| -------------------- | -------------------------------------------------- |
|
||||
| `pnpm dev` | Start the Vite dev server on the configured port |
|
||||
| `pnpm build` | Clean `dist` and build for production |
|
||||
| `pnpm build:staging` | Build with staging mode |
|
||||
| `pnpm report` | Build and open a Rollup visualizer report |
|
||||
| `pnpm preview` | Preview an existing `dist` build |
|
||||
| `pnpm preview:build` | Build first, then preview |
|
||||
| `pnpm typecheck` | Run TypeScript and Vue type checks |
|
||||
| `pnpm lint` | Run ESLint, Prettier, and Stylelint fixes |
|
||||
| `pnpm svgo` | Compress SVG files recursively |
|
||||
| `pnpm clean:cache` | Reinstall dependencies after clearing local caches |
|
||||
|
||||
## Backend Proxy
|
||||
|
||||
Development mode proxies `/api` to `VITE_API_PROXY_TARGET`, defaulting to `http://localhost:3500`. The relevant files are `.env.development` and `vite.config.ts`.
|
||||
|
||||
## Documentation Sync Rule
|
||||
|
||||
When files, folders, package scripts, API modules, route modules, or key config files change, update `README.md` in the same change. The local skill is stored at `.codex/skills/readme-structure-sync/SKILL.md`.
|
||||
|
||||
## Verification
|
||||
|
||||
```bash
|
||||
pnpm typecheck
|
||||
pnpm build
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user