Conversation
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
impl k8s adapter
strategy/api: implement strategy post and get api
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
This statement is unreachable.
ianchen0119
approved these changes
Dec 28, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.