Common template for the middle and background management system
English | 简体中文
🚀🚀🚀 React Admin, a background management framework based on React18, Electron (optional), Vite4, React-Router v6, Ant-Design5, Mobx6&&AHooks, React-Hooks, TypeScript.
- 🚀 Use the latest technology to find development:React18、ELectron、React-Router v6、Mobx6、AHooks、TypeScript、Vite4
- 🚀 Vite4 was adopted as the project development and packaging tool (Gzip packaging, cross-domain proxy, packaging preview tool...).
- 🚀 The entire project integrates TypeScript (totally for learning 🤣)
- 🚀 Use mobx for state management, integrate Mox-react development, and use Mox-persist -store to implement persistent storage
- 🚀 Use TypeScript to wrap Axios twice (global error interception, common request encapsulation, global request Loading, unrepeat requests...).
- 🚀 Antd component size switch, dark and gray and weak mode
- 🚀 Route permission interception (404 page) and page button permission configuration using custom high - level components
- 🚀 Supports React-Router v6 route lazy loading configuration, menu accordion mode, unlimited menu, multi-tab, and breadcrumb navigation
- 🚀 Using Prettier to format code uniformly, integrating Eslint and Stylelint code validation specifications (project specifications configuration)
- 🚀 Commit information using husky, lint-staged, commitlint, commitizen, cz-git specifications (project specifications configuration)
- Install:
cd react-admin
yarn || npm install
yarn dev || npm run dev
# npm install fails to install nodejs. Upgrade nodejs to a higher level than 16, or try the following command:
npm install --registry=https://registry.npm.taobao.org
- Build:
# Development environment
yarn build:dev
# Test environment
yarn build:test
# Production environment
yarn build:pro
- Build Electron:
# windows
yarn build:win32
yarn build:win64
# mac
yarn build:mac
- Lint:
# eslint Detection code
yarn lint:eslint
# prettier Formatting code
yarn lint:prettier
# stylelint Formatting style
yarn lint:stylelint
- commit:
# Commit code (the lint: Lint-staged command automatically executes)
yarn commit
- docker build -t react-admin:v1 .
mac m1 is packaged and running:docker buildx build -t react-admin:v1 --platform linux/amd64 . You may need to add a prefix DOCKER_BUILDKIT=0
-
docker run -d -p 80:80 --name react-admin react-admin:v1
-
docker-compose is deployed together in another project