go-admingo-admin
  • Guide
  • Development
    • Advanced
    • Commands
  • Advanced
  • Help
  • GitHub
  • Changelog
⌘ K
Standard Practice
Standard Module Development
Backend Basics
Backend Directory Structure
Backend Config File
Starting the Backend
Frontend Basics
Frontend Directory Structure
Frontend Config File
Starting the Frontend
Development Patterns
Actions Pattern
Hand-Written Pattern
First API Endpoint
Layered Development
API Layer
Service Layer
DTO Definitions
Model Definitions
Router Registration
Multi-Environment Config
Database Table Conventions
Data Permissions
Response Format
Code Generation
Pre-Generation Setup
Generating Business Code
One-Click Menu Generation
Binding APIs to the Menu
Configuring Role Permissions
Verifying the Feature
Generating Code with an LLM
Advanced Capabilities
Runtime Core API
Authentication & Authorization
Logging
Request Tracing
Cache
Queue
File Upload
Rate Limiting
Scheduled Jobs
Air Hot Reload
Swagger Docs
Code Generation Tool
Last updated:
Open-source MIT Licensed | Copyright © 2020-present
Powered by go-admin-team

TABLE OF CONTENTS

‌
‌
‌
‌

Generating Code

Start go-admin and sign in.

Once the dashboard opens, the sidebar has two relevant menus:

  1. System Management
  2. System Tools

Importing the Table Structure

Open System Tools, go into Code Generation, and click Import on the page below.

SUCCESS

Importing brings the table you just created into the system, so code can be generated from it.

Select the article table you created earlier and click Confirm to import its structure.

Editing the Template Fields

Once confirmed, the table structure is stored in the generation tool — now edit the imported data.

Edit the fields highlighted in red, then save.

Previewing the Code

The preview shows the code the tool would generate.

Generating the Code

Click Code Generation and the frontend and backend code get written into app/{application}/ and the frontend's configured frontpath respectively.

How the generated routes register by default (whether login or role authorization is required) can change between versions — after generating, it's worth opening the router file directly to check. The two registration shapes are explained in Router Registration.

Restart the frontend service, then move on to the page.

INFO

The screenshots are from an older release; the UI details may differ from the current version, but the flow is the same.