Skip to content

Conversation

@vx416
Copy link
Contributor

@vx416 vx416 commented Dec 18, 2025

No description provided.

Vic Xu and others added 22 commits November 19, 2025 20:12
feature/account: implement auth service and user RUD service
feature/account: refactor project init process
account/rbac: implement role and auth handlers, and add handler integration test
account/rbac: implement repository mongo test and add swag document
strategy/api: implement strategy post and get api
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR represents a major architectural refactoring that transforms a monolithic API server into a modular microservices-based architecture. The changes introduce a new manager-decisionmaker pattern, add a web UI, implement MongoDB-based persistence with RBAC, and restructure the codebase into cleaner, more maintainable packages.

Key changes:

  • Restructured from monolithic to manager/decisionmaker architecture with separate command entry points
  • Added comprehensive web UI with HTML/CSS/JavaScript for API interaction
  • Introduced MongoDB repository layer with migrations and RBAC system
  • Replaced simple in-memory storage with persistent database storage
  • Added Kubernetes adapter with pod caching and informer-based watching

Reviewed changes

Copilot reviewed 114 out of 120 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
main.go Refactored from monolithic server to Cobra command-based multi-service architecture
web/static/style.css Added comprehensive CSS styling for new web UI
web/static/index.html Added HTML interface for API interaction
web/static/app.js Added JavaScript client for authentication, metrics, and strategy management
manager/service/*.go New service layer with authentication, RBAC, and scheduling strategy logic
manager/rest/*.go New REST handlers with proper error handling and Swagger documentation
manager/repository/*.go MongoDB repository implementation with query builders
manager/k8s_adapter/adapter.go Kubernetes integration with informer-based pod watching and caching
manager/domain/*.go Domain models with BSON serialization and business logic
manager/migration/*.json MongoDB schema migrations with collections and indexes
pkg/util/*.go Reusable utilities including generic maps, pointer helpers, and Argon2 encryption
pkg/logger/logger.go Zerolog-based structured logging
pkg/middleware/logger.go HTTP request/response logging middleware
pkg/container/*.go Docker container management for testing

rootCmd.AddCommand(managercmd.ManagerCmd, dmcmd.DMCmd)
if err := rootCmd.Execute(); err != nil {
log.Fatalf("Command execution failed: %v", err)
os.Exit(1)
Copy link

Copilot AI Dec 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This statement is unreachable.

Copilot uses AI. Check for mistakes.
@ianchen0119 ianchen0119 merged commit 9afe71c into Gthulhu:main Dec 28, 2025
2 checks passed
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.

3 participants