From 0262dcfba3fbe7fc91be61373b7a17ab9cce11b9 Mon Sep 17 00:00:00 2001 From: gitee-bot Date: Fri, 20 Jun 2025 01:21:28 +0000 Subject: [PATCH] Update README.md --- packages/@core/base/README.md | 102 +++++++++++++++++++++++++++++++++- 1 file changed, 99 insertions(+), 3 deletions(-) diff --git a/packages/@core/base/README.md b/packages/@core/base/README.md index cc745b4e..1ac9c48e 100644 --- a/packages/@core/base/README.md +++ b/packages/@core/base/README.md @@ -1,5 +1,101 @@ -# base -基础共享包,请勿引入 workspace 依赖 -- +This project contains two main applications: a backend mock API and a frontend web application using Ant Design. The backend mock provides various API endpoints for authentication, data retrieval, and mock data generation, while the frontend consumes these APIs and provides a UI for interacting with them. + +## Backend Mock API + +### Features +- Authentication endpoints +- Data endpoints for various entities (users, departments, menus, roles, tables) +- JWT-based authentication +- Mock data generation + +### API Endpoints + +| Endpoint | Description | +|----------|-------------| +| `/api/auth/login` | User login | +| `/api/auth/logout` | User logout | +| `/api/auth/refresh` | Token refresh | +| `/api/user/info` | Get current user info | +| `/api/system/dept/list` | Get department list | +| `/api/system/menu/list` | Get menu list | +| `/api/system/role/list` | Get role list | +| `/api/table/list` | Get table data | +| `/api/test` | Test endpoint | + +### Mock Data +The mock data is generated using helper functions: +- `generateMockDataList(count: number)`: generates a list of mock data items +- `generateMockDeptList(count: number)`: generates a list of mock departments +- `generateMockMenuList(count: number)`: generates a list of mock menus +- `generateMockRoleList(count: number)`: generates a list of mock roles +- `generateMockTableList(count: number)`: generates a list of mock table data + +The data includes: +- User info +- Department list +- Menu list +- Role list +- Table data + +## Frontend Web Application + +### Features +- User authentication +- Data visualization +- Responsive layout +- Dark mode support +- Internationalization + +### Configuration +- Environment variables for different environments +- Integration with TinyMCE editor +- Webpack and Babel configuration + +### Setup +1. Install dependencies: +```bash +npm install +``` + +2. Start the development server: +```bash +npm run dev +``` + +3. Build for production: +```bash +npm run build +``` + +4. Lint the code: +```bash +npm run lint +``` + +### Usage +The frontend application consumes the mock API to: +- Display dashboard +- Show user authentication flow +- Display and manipulate various data entities +- Provide a rich text editing experience with TinyMCE + +The application supports: +- Dark mode +- Responsive design +- Multiple languages +- Accessibility features + +## Contributing +Please read the contributing guide and follow the Git commit message convention. Pull requests are welcome. + +## License +This project is licensed under the MIT License. See the LICENSE file for details. + +## Acknowledgements +This project uses several open-source libraries and tools: +- [TinyMCE](https://www.tiny.cloud/) +- [Vite](https://vitejs.dev/) +- [React](https://reactjs.org/) +- [Ant Design](https://ant.design/) \ No newline at end of file