English | 简体中文
The front-end and back-end separation authority management system based on Gin + Vue + Element UI is extremely simple to initialize the system. You only need to modify the database connection in the configuration file. The system supports multi-instruction operations. Migration instructions can make it easier to initialize database information. Service instructions It's easy to start the api service.
Follow RESTful API design specifications
Based on the GIN WEB API framework, it provides rich middleware support (user authentication, cross-domain, access log, tracking ID, etc.)
RBAC access control model based on Casbin
Support Swagger documents (based on swaggo)
Database storage based on GORM, which can expand multiple types of databases
Simple model mapping of configuration files to quickly get the desired configuration
Code generation tool
TODO: unit test
At the same time, a series of tutorials including videos and documents are provided. How to complete the downloading to the proficient use, it is strongly recommended that you read these tutorials before you practice this project! ! !
Configuration instructions for go-admin menu [Must see]
If you have any questions, please read the above-mentioned usage documents and articles first. If you are not satisfied, welcome to issue and pr. Video tutorials and documents are being updated continuously.
# Create a development directory mkdir goadmin cd goadmin
Important note: the two projects must be placed in the same folder;
# Get backend code git clone https://github.com/go-admin-team/go-admin.git # Get the front-end code git clone https://github.com/go-admin-team/go-admin-ui.git
# Enter the go-admin backend project cd ./go-admin # Compile the project go build # Change setting # File path go-admin/config/settings.yml vi ./config/setting.yml # 1. Modify the database information in the configuration file # Note: The corresponding configuration data under settings.database # 2. Confirm the log path
:::tip ⚠️Note that this problem will occur if CGO is not installed in the windows environment;
E:\go-admin>go build # github.com/mattn/go-sqlite3 cgo: exec /missing-cc: exec: "/missing-cc": file does not exist
D:\Code\go-admin>go build # github.com/mattn/go-sqlite3 cgo: exec gcc: exec: "gcc": executable file not found in %PATH%
# The first configuration needs to initialize the database resource information # Use under macOS or linux $ ./go-admin migrate -c=config/settings.dev.yml # ⚠️Note: Use under windows $ go-admin.exe migrate -c=config/settings.dev.yml # Start the project, you can also use the IDE for debugging # Use under macOS or linux $ ./go-admin server -c config/settings.yml # ⚠️Note: Use under windows $ go-admin.exe server -c config/settings.yml
# Compile the image docker build -t go-admin . # Start the container, the first go-admin is the container name, and the second go-admin is the image name # -v Mapping configuration file Local path: container path docker run --name go-admin -p 8000:8000 -v /config/settings.yml:/config/settings.yml -d go-admin-server
# windows env GOOS=windows GOARCH=amd64 go build main.go # or # linux env GOOS=linux GOARCH=amd64 go build main.go
# Installation dependencies npm install # or cnpm install # Start service npm run dev
admin / 123456
go-admin project has always been developed in the GoLand integrated development environment under JetBrains, based on the free JetBrains Open Source license(s) genuine free license. I would like to express my gratitude.
If you think this project helped you, you can buy a glass of juice for the author to show encouragement 🍹
Copyright (c) 2020 wenjianzhang