mss-boot-admin

command module
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2026 License: MIT Imports: 1 Imported by: 0

README ยถ

mss-boot-admin

Build Status Release License

English | ็ฎ€ไฝ“ไธญๆ–‡

Introduction

mss-boot-admin is a front-end and back-end separation admin platform based on Gin, React, Ant Design v5, Umi v4, and mss-boot. Its current product focus is governance, operations, configuration, access control, internationalization, and AI-annotation-assisted engineering collaboration.

The repository still contains some historical dynamic-model and code-generation related capabilities, but they are no longer the primary direction for future product investment.

Recent Updates

The project has undergone comprehensive polish rounds focusing on:

  • Stability (P0): Fixed nil dereference risks, boundary checks, panic prevention, auth coverage, and polling cleanup
  • Code Quality: Eliminated all TypeScript errors, unified page structures, removed duplicate keys
  • Abstraction: Created reusable components (AuthShell, useMonitorData hook), unified API response format
  • Testing: Documented 70+ test cases, executed core scenarios successfully
  • Documentation: Added CHANGELOG, CONTRIBUTING guide, and comprehensive configuration tutorial

Beta Environment

Swagger

Tutorial

Online documentation Video tutorial

Project address

Backend project Front-end project

๐ŸŽฌ Experience environment

Experience address

Account: admin Password: 123456

โœจ Features

  • Support internationalization
  • Standard Restful API development specifications
  • RBAC permission management based on Casbin
  • Database storage based on Gorm
  • Middleware development based on Gin
  • Swagger document generation based on Gin
  • Support oauth2.0 third-party login
  • Support swagger document generation
  • Support multiple configuration sources (local files, embed, object storage s3, etc., databases supported by gorm, mongodb)
  • Support database migration
  • Support governance-oriented admin modules such as users, roles, menus, departments, posts, APIs, and configuration
  • Support operational modules such as notices, tasks, monitoring, and statistics
  • Evolving toward AI-annotation-assisted engineering workflows for clearer collaboration and delivery discipline

๐Ÿ“ฆ Built-in functions

  • User management: Users are system operators, and this function mainly completes the configuration of system users.
  • Department management: Maintain organization hierarchy and ownership boundaries.
  • Post management: Maintain post data for organization and permission collaboration.
  • Role management: Role menu permission allocation, set role data range permission division by organization.
  • Menu management: Configure system menus, operation permissions, button permission identifiers, etc.
  • API management: Maintain API registry information for governance and permission mapping.
  • Option management: dynamically configure enumerations.
  • System configuration: Manage the configuration of various environments.
  • Notice announcement: user notification message.
  • Task management: Manage scheduled tasks, including execution logs.
  • Internationalization management: Manage internationalization resources.
  • Account and token management: Support OAuth2 binding and personal access tokens.
  • Monitoring and statistics: Provide runtime visibility and statistics querying capabilities.

๐Ÿ“ฆ Preparation

  • Install golang1.21+
  • Install mysql8.0+
  • Install nodejs18.16.0+

๐Ÿ“ฆ Quick start

1. Download the project
# Download the backend project
git clone https://github.com/mss-boot-io/mss-boot-admin.git
# Download the front-end project
git clone https://github.com/mss-boot-io/mss-boot-admin-antd.git
2. Migrate the database
# Enter the backend project
cd mss-boot-admin
# Configure database connection information (can be modified according to actual situation)
export DB_DSN="root:123456@tcp(127.0.0.1:3306)/mss-boot-admin-local?charset=utf8mb4&parseTime=True&loc=Local"
# Migrate the database
go run main.go migrate
3. Generate API interface information
# Generate API interface information
go run main.go server -a
4. Start the backend service
# Start the backend service
go run main.go server
5. Start the front-end service
# Enter the front-end project
cd mss-boot-admin-antd
# Install dependencies
npm install
# Start the front-end service
npm run start

๐Ÿ“จ Interaction

mss-boot-io
telegram๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ WeChat WeChat MP๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ mss-bootๆŠ€ๆœฏไบคๆต็พค bilibili๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ

๐Ÿ’Ž Contributors

JetBrains open source certificate support

The mss-boot-io 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.

๐Ÿค Special thanks

  1. ant-design
  2. ant-design-pro
  3. umi
  4. gin
  5. casbin
  6. gorm
  7. gin-swagger
  8. jwt-go
  9. oauth2

๐ŸคŸ Sponsor Us

If you think this project helped you, you can buy a glass of juice for the author to show encouragement ๐Ÿน

Testing

The project follows strict testing requirements to ensure code quality and reliability.

Test Types
1. Unit Tests
  • Location: *_test.go alongside source files
  • Minimum coverage: 80%
  • Run command:
    go test ./... -v -coverprofile=coverage.out
    
  • Verify coverage:
    go tool cover -html=coverage.out
    # Or check terminal summary
    go tool cover -func=coverage.out | grep total
    
2. Integration Tests
  • Focus: API endpoints with database interactions
  • Test databases: Use test databases (SQLite in-memory for unit tests, real DB for integration)
  • Run command:
    go test -tags=integration ./...
    
  • Verify: Database migrations, API contracts, and service integrations
3. End-to-End (E2E) Tests
  • Full Stack Testing: Uses Playwright for browser automation
  • Critical user flows: login, CRUD operations, permissions
  • Run command: pnpm e2e (executed in frontend project)
Development Workflow
1. DEVELOPMENT PHASE
   โ””โ”€โ”€ Write code
   โ””โ”€โ”€ Write tests (TDD preferred)
   โ””โ”€โ”€ Ensure compilation

2. TESTING PHASE (MANDATORY)
   โ”œโ”€โ”€ Unit Tests: go test ./...
   โ”œโ”€โ”€ Integration Tests: go test -tags=integration ./...
   โ””โ”€โ”€ E2E Tests: pnpm e2e (for major features)

3. VERIFICATION PHASE
   โ”œโ”€โ”€ Check test coverage (โ‰ฅ80%)
   โ”œโ”€โ”€ All tests must pass
   โ””โ”€โ”€ Document test results
Coverage Requirements by Component
Component Unit Tests Integration Tests Min Coverage
Models โœ… Required Optional 80%
Services โœ… Required โœ… Required 85%
APIs โœ… Required โœ… Required 80%
Utils โœ… Required Optional 90%
Test Structure Example
// service/user_test.go
package service

import (
    "testing"
    "github.com/stretchr/testify/assert"
)

func TestUserService_Create(t *testing.T) {
    // Setup
    db := setupTestDB(t)
    svc := &UserService{}
    
    // Execute
    user, err := svc.Create(ctx, &CreateUserRequest{...})
    
    // Verify
    assert.NoError(t, err)
    assert.NotNil(t, user)
    assert.Equal(t, "expected", user.Field)
}
Pre-commit Hooks

Before committing, run:

# Run all tests
go test ./... -v -race -coverprofile=coverage.out

# Check coverage meets requirements
go tool cover -func=coverage.out | grep total # Must be โ‰ฅ 80.0%
Sponsor Us

๐Ÿ”‘ License

MIT

Copyright (c) 2024 mss-boot-io

Documentation ยถ

The Go Gopher

There is no documentation for this package.