Skip to content

introduce v2 APIs, AI agent integration, and realtime backend infrastructure#36

Open
yuanzhihong1 wants to merge 1 commit intomainfrom
server-dev
Open

introduce v2 APIs, AI agent integration, and realtime backend infrastructure#36
yuanzhihong1 wants to merge 1 commit intomainfrom
server-dev

Conversation

@yuanzhihong1
Copy link
Copy Markdown
Contributor

@yuanzhihong1 yuanzhihong1 commented Apr 27, 2026

Overview

This PR delivers a major backend expansion for the server module, including new v2 API surfaces, AI/Xiaozhi integration, websocket task/realtime enhancements, and broader data/model layer upgrades.

In the last 2 months, server-dev mainly contains one large integration commit (d990e6d) with:

  • 148 files changed
  • +5896 / -763

What’s included

1) New API domains and versioned expansions

  • Added/expanded API modules for:

    • admin
    • appstore
    • pano
    • stackchandevice
    • user
    • xiaozhi
  • Introduced or extended v2 endpoints for key flows:

    • dance/v2
    • device/v2
    • stackchandevice/v2
    • user/v2
  • Kept compatibility by retaining and refining existing v1 handlers in several areas.

2) Device and account capability upgrades

  • Added richer device lifecycle operations:

    • bind/unbind
    • update device metadata
    • get device list/info
    • restore default agent settings
  • Added user v2 capabilities:

    • registration
    • login
    • user info retrieval
  • Added admin app management flows:

    • add/update/delete/list app entries

3) AI agent + Xiaozhi integration

  • Added new AI-related service/model modules:

    • internal/service/agent.go
    • internal/model/xiaozhi/*
    • internal/xiaozhi/xiaozhi.go
  • Added token/license related controller endpoints for Xiaozhi flows:

    • token retrieval
    • token refresh
    • license token generation

4) Realtime/websocket infrastructure

  • Added websocket task orchestration:
    • internal/web_socket/socket_task.go
  • Refactored and expanded websocket core behavior:
    • internal/web_socket/web_socket.go
  • Added websocket model definitions:
    • internal/model/web_socket_model.go

5) Data/DAO/model layer expansion

  • Added new entities/DO/DAO for:

    • app_store
    • device_pano
    • user
  • Updated existing device/dance/post-related DAO/model mappings.

  • Added constants and shared model helpers to support new workflows.

6) Middleware, bootstrapping, and config updates

  • Added centralized middleware logic:
    • internal/middleware/middleware.go
  • Added boot cron initialization:
    • internal/boot/cron.go
  • Updated command/bootstrap wiring and deployment/config manifests.

7) Project/documentation and assets

  • Reworked server README (README.MD) and removed old README.md.
  • Added SQL checklist for MySQL DB creation.
  • Added media asset (file/music/stackchan_music.mp3).
  • Added utility RSA helper (utility/rsa.go).

Impact

  • Significantly broadens backend feature coverage and API capability.
  • Establishes a clearer v1/v2 evolution path for client integration.
  • Introduces AI agent/Xiaozhi service foundation for intelligent features.
  • Improves realtime communication support and server-side orchestration.

Notes for reviewers

  • This is a large-scale integration PR; reviewing by domain is recommended:

    1. API surface (routes/controllers)
    2. Service and model/DAO coherence
    3. Websocket and realtime flow
    4. Xiaozhi/AI token and agent logic
    5. Config/deploy/documentation updates
  • Pay special attention to backward compatibility in v1 flows and auth/middleware behavior across newly added endpoints.

@imliubo imliubo requested a review from curdeveryday April 28, 2026 02:30
@imliubo imliubo closed this Apr 28, 2026
@imliubo imliubo deleted the server-dev branch April 28, 2026 04:30
@imliubo imliubo restored the server-dev branch April 28, 2026 04:30
@yuanzhihong1 yuanzhihong1 reopened this Apr 28, 2026
@yuanzhihong1 yuanzhihong1 changed the title server code 4/27 introduce v2 APIs, AI agent integration, and realtime backend infrastructure Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants