feat: microservice architecture
This commit is contained in:
@@ -1,54 +1,48 @@
|
||||
# Phase 3: Module Framework
|
||||
|
||||
## Overview
|
||||
Define module interface and registration system, implement static module registry, create permission code generation tool, build module loader (support both static and plugin modes), and add module discovery and initialization.
|
||||
Design and implement complete module system interface, build module registry with dependency resolution, create permission code generation from module manifests, implement module loader supporting static and dynamic loading, add module lifecycle management and initialization, and provide CLI tooling for module management.
|
||||
|
||||
## Tasks
|
||||
## Stories
|
||||
|
||||
### 3.1 Module Interface
|
||||
- [3.1.1 - Create Module Interface](./3.1.1-create-pkgmodulemodulego.md)
|
||||
- [3.1.2 - Create Module Manifest](./3.1.2-create-pkgmodulemanifestgo.md)
|
||||
- [3.1.3 - Define Module YAML Schema](./3.1.3-define-moduleyaml-schema-used-for-code-generation.md)
|
||||
### 3.1 Module System Interface and Registry
|
||||
- [Story: 3.1 - Module System Interface](./3.1-module-system-interface.md)
|
||||
- **Goal:** Design and implement the complete module system interface with registration, dependency resolution, and lifecycle management.
|
||||
- **Deliverables:** Module interface, module manifest, module registry
|
||||
|
||||
### 3.2 Static Module Registry
|
||||
- [3.2.1 - Create Registry](./3.2.1-create-internalregistryregistrygo.md)
|
||||
- [3.2.2 - Add Registration Validation](./3.2.2-add-registration-validation.md)
|
||||
### 3.2 Permission Code Generation System
|
||||
- [Story: 3.2 - Permission Code Generation](./3.2-permission-code-generation.md)
|
||||
- **Goal:** Create automated permission code generation from module manifests to ensure type-safe permission constants.
|
||||
- **Deliverables:** Permission generation script, Go generate integration, Makefile integration
|
||||
|
||||
### 3.3 Permission Code Generation
|
||||
- [3.3.1 - Create Generate Script](./3.3.1-create-scriptsgenerate-permissionsgo.md)
|
||||
- [3.3.2 - Add Go Generate Directive](./3.3.2-add-gogenerate-directive-to-pkgpermpermgo.md)
|
||||
- [3.3.3 - Update Makefile](./3.3.3-update-makefile-with-make-generate-command.md)
|
||||
### 3.3 Module Loader and Initialization
|
||||
- [Story: 3.3 - Module Loader](./3.3-module-loader.md)
|
||||
- **Goal:** Implement module loading (static and dynamic) with dependency resolution and automatic initialization.
|
||||
- **Deliverables:** Module loader, static loader, plugin loader, module initializer, FX lifecycle integration
|
||||
|
||||
### 3.4 Module Loader
|
||||
- [3.4.1 - Create Loader Interface](./3.4.1-create-internalpluginloaderloadergo.md)
|
||||
- [3.4.2 - Implement Static Loader](./3.4.2-implement-internalpluginloaderstatic_loadergo.md)
|
||||
- [3.4.3 - Implement Plugin Loader](./3.4.3-implement-internalpluginloaderplugin_loadergo-opti.md)
|
||||
### 3.4 Module Management CLI Tool
|
||||
- [Story: 3.4 - Module CLI](./3.4-module-cli.md)
|
||||
- **Goal:** Provide CLI tooling for managing modules, validating dependencies, and testing module loading.
|
||||
- **Deliverables:** CLI tool, Makefile integration
|
||||
|
||||
### 3.5 Module Initialization
|
||||
- [3.5.1 - Create Initializer](./3.5.1-create-internalmoduleinitializergo.md)
|
||||
- [3.5.2 - Run Migrations](./3.5.2-run-migrations.md)
|
||||
|
||||
### 3.6 Module Lifecycle
|
||||
- [3.6.1 - Extend Module Interface](./3.6.1-extend-pkgmodulemodulego.md)
|
||||
- [3.6.2 - Integrate with FX Lifecycle](./3.6.2-integrate-with-fxlifecycle.md)
|
||||
|
||||
### 3.7 Platform CLI
|
||||
- [3.7.1 - Create CLI Tool](./3.7.1-create-cmdplatformctlmaingo.md)
|
||||
- [3.7.2 - Add to Makefile](./3.7.2-add-to-makefile-make-install-cli.md)
|
||||
### 3.5 Service Registry and Discovery
|
||||
- [Story: 3.5 - Service Registry](./3.5-service-registry.md)
|
||||
- **Goal:** Implement a service registry that enables service discovery for microservices.
|
||||
- **Deliverables:** Service registry interface, Consul registry, Kubernetes registry, service registration
|
||||
|
||||
## Deliverables Checklist
|
||||
- [ ] Module interface defined
|
||||
- [ ] Static module registry implemented
|
||||
- [ ] Permission code generation working
|
||||
- [ ] Module loader supports static and plugin modes
|
||||
- [ ] Modules can be discovered and initialized
|
||||
- [ ] Module migrations run on startup
|
||||
- [ ] Platform CLI tool for module management
|
||||
- [ ] Module interface and registration system
|
||||
- [ ] Static module registry working
|
||||
- [ ] Permission code generation tool
|
||||
- [ ] Module loader with dependency resolution
|
||||
- [ ] Module initialization in main app
|
||||
- [ ] CLI tool for module management
|
||||
- [ ] Service registry for discovery
|
||||
|
||||
## Acceptance Criteria
|
||||
- Modules can be registered statically
|
||||
- Permission constants are generated from module manifests
|
||||
- Modules are initialized with correct dependency order
|
||||
- Module migrations run automatically
|
||||
- CLI tool can list and manage modules
|
||||
|
||||
- Modules can register via `registry.Register()`
|
||||
- Permission constants are generated from `module.yaml`
|
||||
- Modules load in correct dependency order
|
||||
- Module migrations run on startup
|
||||
- `platformctl modules list` shows all modules
|
||||
- Integration test: load multiple modules and verify initialization
|
||||
|
||||
Reference in New Issue
Block a user