Hyperf-based headless permission management system

Hyperf-based headless permission management system

2022-09-14 0 882
Resource Number 38415 Last Updated 2025-02-24
¥ 0USD Upgrade VIP
Download Now Matters needing attention
Can't download? Please contact customer service to submit a link error!
Value-added Service: Installation Guide Environment Configuration Secondary Development Template Modification Source Code Installation

In this issue, we recommend a front-end and back-end separation permission management system developed based on the Hyperf framework and SCUI (Element UI) – MineAdmin.

 

Hyperf-based headless permission management system插图

MineAdmin is developed based on the Hyperf framework, the front-end uses Vue3.0 + SCUI (based on Element UI), supports PC and mobile terminals, and the system can be used for website management background, CMS, CRM, OA, ERP, etc. MineAdmin is a back-end permission management system, which provides a complete permission system, so that developers can focus on specific businesses, reduce development costs, and improve project efficiency.

Built-in features
User management, complete the configuration of user addition, modification, and deletion, and support different users to log in to the background to see different home pages
Department management, departmental organization (company, department, group), tree structure to display support data permissions
Post management, which can be assigned to the position held by the user
Role management, role menu permission assignment, role data permission assignment
Menu management, configuration of system menus and buttons, etc
Dictionary management, which can be reused and maintained for frequently used and fixed data in the system
System configuration, management of some common settings of the system
Operation logs, which are queries made by users about some normal operations of the system
Login logs, which are logged in to the system by users
Online Users, to view the currently logged-in users
Service monitoring to view information such as the current server status and PHP environment
Dependency monitoring to view the library information and versions that the current program depends on
Attachment management: Manage information such as files and pictures uploaded by the current system
Data table maintenance, the data table of the system can be cleaned up and optimized
Module management, all current modules of the management system
Data table designer, simple version of database designer, with code generator to do more with less
Scheduled tasks: Online (add, modify, and delete) task scheduling includes execution result logs
Code generation, front-end and back-end code generation (php, vue, js, sql), support download and generation to modules
Cache monitoring to view Redis information and key information used by the system
API management, application and interface management, interface authorization, and other functions. Automatic generation of interface documents, input and output parameter checking, etc

Hyperf-based headless permission management system插图1

Install and deploy

1 Server Requirements

MineAdmin has some requirements for the system environment, when you use the Swoole network engine driver, it can only run in Linux and Mac environments, but due to the development of Docker virtualization technology, Docker for Windows can also be used as the runtime environment under Windows.

2 Environmental requirements

Swoole >= 4.5.x and turn off Short Name
PHP >= 7.4 and enable the following extensions: mbstring, json, pdo, openssl, redis, pcntl
Mysql >= 5.7
Redis >= 4.0

3 Download the project

MineAdmin does not use SQL file to import and install, the system uses Migrates migration file to install and populate data, please be aware.

To download your project, make sure you have Composer installed:

git clone https://gitee.com/xmo/MineAdmin && cd MineAdmin
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
composer install

4 Back-end installation

To install a project, you need to open two terminals, one to start the project and the other to execute the installation command.

Open the startup terminal and start the project:

php bin/hyperf.php start

Switch to the installation terminal, run the installation command, and complete the configuration of the .env file:

php bin/hyperf.php mine:install

After the following information is prompted, switch to the startup terminal, restart the project, and load the .env configuration information:

Reset the “.env” file. Please restart the service before running
the installation command to continue the installation.

Switch to the installation terminal, run the installation command again, and execute the Migrates data migration file and SQL data filling to complete the installation.

php bin/hyperf.php mine:install

5 Front-end mounting

Please make sure that you have installed node.js, yarn or npm tools, yarn is recommended.

cd mine-ui && yarn
or
cd mine-ui && npm install

Initiate:

yarn dev
or
npm run dev

In actual development, you can use php watch -c to start the project, which can listen for file changes and hot restart in real time to improve development efficiency.

6 Project Deployment

When the project needs to be deployed or tested in the online environment, and the local and online environments are inconsistent or the front-end and back-end are not on the same server, you need to perform Nginx reverse proxy and modify some configurations of the front-end.

Back-end agents
# At least one Hyperf node is required, multiple configurations and multiple rows
upstream hyperf {
# IP and port of Hyperf HTTP Server
server 127.0.0.1:9501;
}

server {
# Ports
listen 80;
# Domain name
server_name demo.mineadmin.com;
# Logs
access_log /data/wwwlogs/demo.mineadmin.com_nginx_access.log combined;
error_log /data/wwwlogs/demo.mineadmin.com_nginx_error.log debug;

# Deploy the front-end code of the same domain root directory, note:
location / {
root /data/wwwroot/demo.mineadmin.com;
try_files $uri $uri/ /index.html;
index index.html;
}

# Custom underscore parameters can be transmitted through headers
# underscores_in_headers on;

# PHP code
location /api/ {
# Forward the host and IP information of the client to the corresponding node
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# Forward the protocol schema to the corresponding node, if you use non-https, please change it to http
proxy_set_header X-scheme https;

# Execute an agent to access the real server
proxy_pass http://hyperf/;
}
}
Required front-end configurations

The front-end also uses a proxy to request the back-end interface

Find the following configuration in mine-ui/vue.config.js and modify it according to your own situation

Base URL
const base_url = ‘http://127.0.0.1:9501’

Proxy API prefix
const proxy_api = ‘/api’

7 Extensions with compatibility issues

Since Hyperf is based on Swoole coroutines, the coroutines brought by Swoole 4 still have compatibility issues with many extensions. The following extensions, including but not limited to, cause certain compatibility issues and cannot be used or co-existed with:

xhprof
xdebug
blackfire
trace
uopz
Demo images

Hyperf-based headless permission management system插图2 Hyperf-based headless permission management system插图3 Hyperf-based headless permission management system插图4 Hyperf-based headless permission management system插图5 Hyperf-based headless permission management system插图6 Hyperf-based headless permission management system插图7 Hyperf-based headless permission management system插图8 Hyperf-based headless permission management system插图9 Hyperf-based headless permission management system插图10 Hyperf-based headless permission management system插图11 Hyperf-based headless permission management system插图12

Development documentation

Backend Documentation: Backend Documentation | MineAdmin

Front-end documentation: Development Specs | MineAdmin

This project uses the Apache 2.0 open source license, and you can read more content by yourself.

资源下载此资源为免费资源立即下载
Telegram:@John_Software

Disclaimer: This article is published by a third party and represents the views of the author only and has nothing to do with this website. This site does not make any guarantee or commitment to the authenticity, completeness and timeliness of this article and all or part of its content, please readers for reference only, and please verify the relevant content. The publication or republication of articles by this website for the purpose of conveying more information does not mean that it endorses its views or confirms its description, nor does it mean that this website is responsible for its authenticity.

Ictcoder Free source code Hyperf-based headless permission management system https://ictcoder.com/kyym/hyperf-based-headless-permission-management-system.html

Share free open-source source code

Q&A
  • 1, automatic: after taking the photo, click the (download) link to download; 2. Manual: After taking the photo, contact the seller to issue it or contact the official to find the developer to ship.
View details
  • 1, the default transaction cycle of the source code: manual delivery of goods for 1-3 days, and the user payment amount will enter the platform guarantee until the completion of the transaction or 3-7 days can be issued, in case of disputes indefinitely extend the collection amount until the dispute is resolved or refunded!
View details
  • 1. Heptalon will permanently archive the process of trading between the two parties and the snapshots of the traded goods to ensure that the transaction is true, effective and safe! 2, Seven PAWS can not guarantee such as "permanent package update", "permanent technical support" and other similar transactions after the merchant commitment, please identify the buyer; 3, in the source code at the same time there is a website demonstration and picture demonstration, and the site is inconsistent with the diagram, the default according to the diagram as the dispute evaluation basis (except for special statements or agreement); 4, in the absence of "no legitimate basis for refund", the commodity written "once sold, no support for refund" and other similar statements, shall be deemed invalid; 5, before the shooting, the transaction content agreed by the two parties on QQ can also be the basis for dispute judgment (agreement and description of the conflict, the agreement shall prevail); 6, because the chat record can be used as the basis for dispute judgment, so when the two sides contact, only communicate with the other party on the QQ and mobile phone number left on the systemhere, in case the other party does not recognize self-commitment. 7, although the probability of disputes is very small, but be sure to retain such important information as chat records, mobile phone messages, etc., in case of disputes, it is convenient for seven PAWS to intervene in rapid processing.
View details
  • 1. As a third-party intermediary platform, Qichou protects the security of the transaction and the rights and interests of both buyers and sellers according to the transaction contract (commodity description, content agreed before the transaction); 2, non-platform online trading projects, any consequences have nothing to do with mutual site; No matter the seller for any reason to require offline transactions, please contact the management report.
View details

Related Article

make a comment
No comments available at the moment
Official customer service team

To solve your worries - 24 hours online professional service