From 1349df2d683e21147b562b06ede050e30a8c6e78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=81=E6=99=BA=E9=B8=BF?= <2524422678@qq.com> Date: Tue, 28 Apr 2026 11:09:39 +0800 Subject: [PATCH] feat(server): deliver major backend expansion with v2 APIs, AI integration, and realtime infrastructure - introduce broad v2 API surface across device, user, dance, and stackchandevice modules - add admin/appstore management flows and strengthen service/controller layering - implement XiaoZhi integration end-to-end, including token, refresh, license, and agent-related models/services - expand social and media capabilities with pano support, post/comment workflow updates, and bundled dance music assets - add websocket task pipeline and refactor realtime communication models/handlers - enhance middleware, cron bootstrap, DAO/model coverage, and configuration/deployment manifests for production readiness - add RSA utility support and update project documentation/config scaffolding --- server/api/admin/admin.go | 5 +++++ server/api/appstore/appstore.go | 5 +++++ server/api/dance/dance.go | 5 +++++ server/api/device/device.go | 5 +++++ server/api/file/file.go | 5 +++++ server/api/friend/friend.go | 5 +++++ server/api/pano/pano.go | 5 +++++ server/api/post/post.go | 5 +++++ server/api/stackchandevice/stackchandevice.go | 5 +++++ server/api/user/user.go | 5 +++++ server/api/xiaozhi/xiaozhi.go | 5 +++++ .../xiaozhi_v1_get_xiao_zhi_generate_license_token.go | 5 +++++ server/utility/rsa.go | 10 ---------- 13 files changed, 60 insertions(+), 10 deletions(-) diff --git a/server/api/admin/admin.go b/server/api/admin/admin.go index 5dc8530..7819783 100644 --- a/server/api/admin/admin.go +++ b/server/api/admin/admin.go @@ -1,3 +1,8 @@ +/* +SPDX-FileCopyrightText: 2026 M5Stack Technology CO LTD +SPDX-License-Identifier: MIT +*/ + // ================================================================================= // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. // ================================================================================= diff --git a/server/api/appstore/appstore.go b/server/api/appstore/appstore.go index 75f9efa..be685e1 100644 --- a/server/api/appstore/appstore.go +++ b/server/api/appstore/appstore.go @@ -1,3 +1,8 @@ +/* +SPDX-FileCopyrightText: 2026 M5Stack Technology CO LTD +SPDX-License-Identifier: MIT +*/ + // ================================================================================= // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. // ================================================================================= diff --git a/server/api/dance/dance.go b/server/api/dance/dance.go index 1c398f0..2dd604e 100644 --- a/server/api/dance/dance.go +++ b/server/api/dance/dance.go @@ -1,3 +1,8 @@ +/* +SPDX-FileCopyrightText: 2026 M5Stack Technology CO LTD +SPDX-License-Identifier: MIT +*/ + // ================================================================================= // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. // ================================================================================= diff --git a/server/api/device/device.go b/server/api/device/device.go index fc6885e..cdba188 100644 --- a/server/api/device/device.go +++ b/server/api/device/device.go @@ -1,3 +1,8 @@ +/* +SPDX-FileCopyrightText: 2026 M5Stack Technology CO LTD +SPDX-License-Identifier: MIT +*/ + // ================================================================================= // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. // ================================================================================= diff --git a/server/api/file/file.go b/server/api/file/file.go index e812a0c..68746e6 100644 --- a/server/api/file/file.go +++ b/server/api/file/file.go @@ -1,3 +1,8 @@ +/* +SPDX-FileCopyrightText: 2026 M5Stack Technology CO LTD +SPDX-License-Identifier: MIT +*/ + // ================================================================================= // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. // ================================================================================= diff --git a/server/api/friend/friend.go b/server/api/friend/friend.go index 7357046..580c2c7 100644 --- a/server/api/friend/friend.go +++ b/server/api/friend/friend.go @@ -1,3 +1,8 @@ +/* +SPDX-FileCopyrightText: 2026 M5Stack Technology CO LTD +SPDX-License-Identifier: MIT +*/ + // ================================================================================= // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. // ================================================================================= diff --git a/server/api/pano/pano.go b/server/api/pano/pano.go index a64168a..3261f71 100644 --- a/server/api/pano/pano.go +++ b/server/api/pano/pano.go @@ -1,3 +1,8 @@ +/* +SPDX-FileCopyrightText: 2026 M5Stack Technology CO LTD +SPDX-License-Identifier: MIT +*/ + // ================================================================================= // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. // ================================================================================= diff --git a/server/api/post/post.go b/server/api/post/post.go index 640734b..3e5420c 100644 --- a/server/api/post/post.go +++ b/server/api/post/post.go @@ -1,3 +1,8 @@ +/* +SPDX-FileCopyrightText: 2026 M5Stack Technology CO LTD +SPDX-License-Identifier: MIT +*/ + // ================================================================================= // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. // ================================================================================= diff --git a/server/api/stackchandevice/stackchandevice.go b/server/api/stackchandevice/stackchandevice.go index 2208046..e8025cb 100644 --- a/server/api/stackchandevice/stackchandevice.go +++ b/server/api/stackchandevice/stackchandevice.go @@ -1,3 +1,8 @@ +/* +SPDX-FileCopyrightText: 2026 M5Stack Technology CO LTD +SPDX-License-Identifier: MIT +*/ + // ================================================================================= // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. // ================================================================================= diff --git a/server/api/user/user.go b/server/api/user/user.go index 75adc0e..3744839 100644 --- a/server/api/user/user.go +++ b/server/api/user/user.go @@ -1,3 +1,8 @@ +/* +SPDX-FileCopyrightText: 2026 M5Stack Technology CO LTD +SPDX-License-Identifier: MIT +*/ + // ================================================================================= // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. // ================================================================================= diff --git a/server/api/xiaozhi/xiaozhi.go b/server/api/xiaozhi/xiaozhi.go index 128d966..29adc5a 100644 --- a/server/api/xiaozhi/xiaozhi.go +++ b/server/api/xiaozhi/xiaozhi.go @@ -1,3 +1,8 @@ +/* +SPDX-FileCopyrightText: 2026 M5Stack Technology CO LTD +SPDX-License-Identifier: MIT +*/ + // ================================================================================= // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. // ================================================================================= diff --git a/server/internal/controller/xiaozhi/xiaozhi_v1_get_xiao_zhi_generate_license_token.go b/server/internal/controller/xiaozhi/xiaozhi_v1_get_xiao_zhi_generate_license_token.go index 0454529..cda3768 100644 --- a/server/internal/controller/xiaozhi/xiaozhi_v1_get_xiao_zhi_generate_license_token.go +++ b/server/internal/controller/xiaozhi/xiaozhi_v1_get_xiao_zhi_generate_license_token.go @@ -1,3 +1,8 @@ +/* +SPDX-FileCopyrightText: 2026 M5Stack Technology CO LTD +SPDX-License-Identifier: MIT +*/ + package xiaozhi import ( diff --git a/server/utility/rsa.go b/server/utility/rsa.go index ea028db..1bfeba4 100644 --- a/server/utility/rsa.go +++ b/server/utility/rsa.go @@ -12,7 +12,6 @@ import ( "crypto/x509" "encoding/pem" "errors" - "fmt" "github.com/gogf/gf/v2/frame/g" "github.com/gogf/gf/v2/os/gctx" @@ -262,15 +261,6 @@ func GenerateFourKeys() { clientPrivateKey, clientPublicKey = generateKeyPair(2048) // Print PEM - //fmt.Println("=== Server Private Key ===") - //fmt.Println(keyToPEM(serverPrivateKey, true)) - //fmt.Println("=== Server Public Key ===") - //fmt.Println(keyToPEM(serverPublicKey, false)) - - fmt.Println("=== Client Private Key ===") - fmt.Println(keyToPEM(clientPrivateKey, true)) - fmt.Println("=== Client Public Key ===") - fmt.Println(keyToPEM(clientPublicKey, false)) // Mark initialization complete initialized = true