Configs2026年7月4日·1 分钟阅读

Gin-Vue-Admin — Full-Stack Admin Platform with Go Backend and Vue 3 Frontend

A rapid development platform combining Gin (Go) backend with Vue 3 frontend, featuring auto-generated CRUD, JWT auth, and Casbin RBAC.

Agent 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
Gin-Vue-Admin Overview
直接安装命令
npx -y tokrepo@latest install 1148ac8a-7785-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run 确认安装计划,再运行此命令。

Introduction

Gin-Vue-Admin (GVA) is a full-stack admin development platform that pairs a Gin-based Go backend with a Vue 3 + Element Plus frontend. It provides code generation, role-based access control, and API management out of the box, letting teams scaffold enterprise backends in minutes rather than weeks.

What Gin-Vue-Admin Does

  • Generates CRUD code (model, API, service, router, Vue page) from database tables
  • Implements JWT authentication with token refresh and blacklisting
  • Uses Casbin for fine-grained role-based access control policies
  • Provides a visual API management interface for registering endpoints
  • Includes file upload, Excel import/export, and email utilities

Architecture Overview

The backend follows a layered structure: router, middleware, API handler, service, and model. Gorm handles database operations supporting MySQL, PostgreSQL, and SQLite. The frontend is a standard Vite + Vue 3 SPA using Pinia for state and Element Plus for UI. Communication happens via RESTful JSON APIs with Swagger documentation auto-generated from code annotations.

Self-Hosting & Configuration

  • Requires Go 1.21+ and Node.js 18+ with pnpm
  • Database connection is configured in config.yaml (MySQL, PostgreSQL, or SQLite)
  • Redis is optional, used for JWT blacklist and caching
  • Run the initialization wizard on first start to create admin account and base data
  • Deploy the Go binary behind Nginx with the Vue build served as static files

Key Features

  • Visual code generator with template customization
  • Dynamic menu and API permission assignment via web UI
  • Operation logging and breakpoint-resume file uploads
  • Plugin system for extending backend and frontend independently
  • Multi-database support with runtime switchable data sources

Comparison with Similar Tools

  • RuoYi — Java (Spring Boot) based, similar feature set for JVM teams
  • vue-element-admin — Frontend only, no backend included
  • go-admin — Lighter Go admin framework, less frontend polish
  • Ant Design Pro — React frontend only, BFF pattern required
  • Django Admin — Python-based auto-admin, less customizable UI

FAQ

Q: What databases are supported? A: MySQL, PostgreSQL, and SQLite via Gorm. The code generator works with all three.

Q: Can I use a different frontend framework? A: The backend is framework-agnostic REST. Community ports exist for React and other Vue UI libraries.

Q: How does the code generator work? A: It reads table schemas from the database and generates Go struct, service, router, API handler, and Vue page files using Go templates.

Q: Is it production-ready? A: Yes, many companies use GVA in production. It includes rate limiting, CORS, and security middleware by default.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产