Update README.md

This commit is contained in:
gitee-bot 2025-06-20 01:21:28 +00:00 committed by Gitee
parent f913955259
commit 0262dcfba3
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -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/)