README.ja-JP.md
Gin + Vue + Element UI / Arco Design / Ant Design による、フロントエンドとバックエンドを分離した権限管理システムです。初期化は非常に簡単で、設定ファイルのデータベース接続情報を変更するだけで動作します。複数のコマンドに対応しており、マイグレーションコマンドでデータベースの初期化が容易になり、サーバーコマンドで API を手軽に起動できます。
Element Plus vue3 デモ:https://vue.go-admin.pro
⚠️⚠️⚠️ アカウント / パスワード: admin / 123456
antd デモ(go-admin-pro):https://antd.go-admin.pro
⚠️⚠️⚠️ アカウント / パスワード: admin / 123456
RESTful API の設計規約に準拠
GIN WEB API フレームワークをベースに、豊富なミドルウェアを提供(ユーザー認証、CORS、アクセスログ、トレース ID など)
Casbin による RBAC アクセス制御モデル
JWT 認証
Swagger ドキュメントに対応(swaggo ベース)
GORM によるデータベース永続化、複数種類のデータベースに拡張可能
設定ファイルからモデルへの単純なマッピングで、必要な設定をすぐに取得
コード生成ツール
フォームビルダー
マルチコマンド方式
マルチテナント対応
TODO: ユニットテスト
ローカルに [go] [gin] node と git をインストールしてください。
ダウンロードから使いこなすまでを解説した動画とドキュメントのチュートリアルを用意しています。本プロジェクトを試す前に、まずこれらに目を通すことを強くおすすめします。
v1.1.0 のコード生成ツール [応用]
go-admin のメニュー設定 [必見]
メニュー情報と API 情報の設定方法 [必見]
go-admin の権限設定 [必見]
go-admin のデータ権限 [必見]
不明点はまず上記のドキュメントと記事をご確認ください。解決しない場合は issue や pr をお寄せください。動画とドキュメントは継続的に更新しています
go 1.26.5
node バージョン: v22 以上(v24 LTS 推奨)
パッケージマネージャー: pnpm v9 以上(UI プロジェクトは pnpm を使用)
# 開発ディレクトリを作成
mkdir goadmin
cd goadmin
重要:2 つのプロジェクトは同じディレクトリに配置してください。
# バックエンドのコードを取得
git clone https://github.com/go-admin-team/go-admin.git
# フロントエンドのコードを取得
git clone https://github.com/go-admin-team/go-admin-ui.git
# go-admin バックエンドプロジェクトへ移動
cd ./go-admin
# 依存関係を整理
go mod tidy
# ビルド
go build
# 設定を変更
# ファイルパス go-admin/config/settings.yml
vi ./config/settings.yml
# 1. 設定ファイル内のデータベース情報を変更
# 注意: settings.database 配下の設定項目
# 2. log のパスを確認
⚠️注意 Windows 環境で CGO が未導入の場合、次のエラーが発生します。
E:\go-admin>go build
# github.com/mattn/go-sqlite3
cgo: exec /missing-cc: exec: "/missing-cc": file does not exist
or
D:\Code\go-admin>go build
# github.com/mattn/go-sqlite3
cgo: exec gcc: exec: "gcc": executable file not found in %PATH%
# 初回はデータベースのリソース情報を初期化する必要があります
# macOS または linux の場合
$ ./go-admin migrate -c config/settings.dev.yml
# ⚠️注意: windows の場合
$ go-admin.exe migrate -c config/settings.dev.yml
# プロジェクトを起動します。IDE からデバッグ実行することもできます
# macOS または linux の場合
$ ./go-admin server -c config/settings.yml
# ⚠️注意: windows の場合
$ go-admin.exe server -c config/settings.yml
起動時に -a true を付けると、不足している API データが自動的に追加されます。
./go-admin server -c config/settings.yml -a true
# イメージをビルド
docker build -t go-admin .
# コンテナを起動します。1 つ目の go-admin はコンテナ名、2 つ目はイメージ名です
# -v は設定ファイルのマウント ローカルパス:コンテナ内パス
docker run --name go-admin -p 8000:8000 -v /config/settings.yml:/config/settings.yml -d go-admin-server
go generate
# windows
env GOOS=windows GOARCH=amd64 go build main.go
# or
# linux
env GOOS=linux GOARCH=amd64 go build main.go
# pnpm をインストール(未導入の場合)
npm install -g pnpm
# 依存関係をインストール
pnpm install
# 中国本土のネットワークではミラーを指定すると高速化できます
pnpm install --registry=https://registry.npmmirror.com
# 開発サーバーを起動
pnpm dev
<span style="margin: 0 5px;" ><a href="https://github.com/wenjianzhang" ></a></span> <span style="margin: 0 5px;" ><a href="https://github.com/G-Akiraka" ></a></span> <span style="margin: 0 5px;" ><a href="https://github.com/lwnmengjing" ></a></span> <span style="margin: 0 5px;" ><a href="https://github.com/bing127" ></a></span> <span style="margin: 0 5px;" ><a href="https://github.com/chengxiao" ></a></span> <span style="margin: 0 5px;" ><a href="https://github.com/NightFire0307" ></a></span> <span style="margin: 0 5px;" ><a href="https://github.com/appleboy" ></a></span> <span style="margin: 0 5px;" ><a href="https://github.com/ninstein" ></a></span> <span style="margin: 0 5px;" ><a href="https://github.com/kikiyou" ></a></span> <span style="margin: 0 5px;" ><a href="https://github.com/horizonzy" ></a></span> <span style="margin: 0 5px;" ><a href="https://github.com/Cassuis" ></a></span> <span style="margin: 0 5px;" ><a href="https://github.com/hqcchina" ></a></span> <span style="margin: 0 5px;" ><a href="https://github.com/nodece" ></a></span> <span style="margin: 0 5px;" ><a href="https://github.com/stephenzhang0713" ></a></span> <span style="margin: 0 5px;" ><a href="https://github.com/zhouxixi-dev" ></a></span> <span style="margin: 0 5px;" ><a href="https://github.com/Jalins" ></a></span> <span style="margin: 0 5px;" ><a href="https://github.com/wkf928592" ></a></span> <span style="margin: 0 5px;" ><a href="https://github.com/wxxiong6" ></a></span> <span style="margin: 0 5px;" ><a href="https://github.com/Silicon-He" ></a></span> <span style="margin: 0 5px;" ><a href="https://github.com/GizmoOAO" ></a></span> <span style="margin: 0 5px;" ><a href="https://github.com/bestgopher" ></a></span> <span style="margin: 0 5px;" ><a href="https://github.com/wxb1207" ></a></span> <span style="margin: 0 5px;" ><a href="https://github.com/misakichan" ></a></span> <span style="margin: 0 5px;" ><a href="https://github.com/zhuxuyang" ></a></span> <span style="margin: 0 5px;" ><a href="https://github.com/mss-boot" ></a></span> <span style="margin: 0 5px;" ><a href="https://github.com/AuroraV" ></a></span> <span style="margin: 0 5px;" ><a href="https://github.com/Vingurzhou" ></a></span> <span style="margin: 0 5px;" ><a href="https://github.com/haimait" ></a></span> <span style="margin: 0 5px;" ><a href="https://github.com/zyd" ></a></span> <span style="margin: 0 5px;" ><a href="https://github.com/infnan" ></a></span> <span style="margin: 0 5px;" ><a href="https://github.com/d1y" ></a></span> <span style="margin: 0 5px;" ><a href="https://github.com/qlijin" ></a></span> <span style="margin: 0 5px;" ><a href="https://github.com/logtous " ></a></span> <span style="margin: 0 5px;" ><a href="https://github.com/stepway " ></a></span> <span style="margin: 0 5px;" ><a href="https://github.com/NaturalGao " ></a></span> <span style="margin: 0 5px;" ><a href="https://github.com/DemoLiang " ></a></span> <span style="margin: 0 5px;" ><a href="https://github.com/jfcg " ></a></span> <span style="margin: 0 5px;" ><a href="https://github.com/Nicole0724 " ></a></span>
go-admin は一貫して JetBrains 社の GoLand 統合開発環境で開発されています。free JetBrains Open Source license(s) による正規の無償ライセンス提供に、この場を借りて感謝を申し上げます。
<a href="https://www.jetbrains.com/?from=kubeadm-ha" target="_blank"></a>
このプロジェクトがお役に立ちましたら、作者にジュースを一杯おごる形で応援いただけます :tropical_drink:
Copyright (c) 2026 wenjianzhang