Transform all documentation from modular monolith to true microservices
architecture where core services are independently deployable.
Key Changes:
- Core Kernel: Infrastructure only (no business logic)
- Core Services: Auth, Identity, Authz, Audit as separate microservices
- Each service has own entry point (cmd/{service}/)
- Each service has own gRPC server and database schema
- Services register with Consul for service discovery
- API Gateway: Moved from Epic 8 to Epic 1 as core infrastructure
- Single entry point for all external traffic
- Handles routing, JWT validation, rate limiting, CORS
- Service Discovery: Consul as primary mechanism (ADR-0033)
- Database Pattern: Per-service connections with schema isolation
Documentation Updates:
- Updated all 9 architecture documents
- Updated 4 ADRs and created 2 new ADRs (API Gateway, Service Discovery)
- Rewrote Epic 1: Core Kernel & Infrastructure (infrastructure only)
- Rewrote Epic 2: Core Services (Auth, Identity, Authz, Audit as services)
- Updated Epic 3-8 stories for service architecture
- Updated plan.md, playbook.md, requirements.md, index.md
- Updated all epic READMEs and story files
New ADRs:
- ADR-0032: API Gateway Strategy
- ADR-0033: Service Discovery Implementation (Consul)
New Stories:
- Epic 1.7: Service Client Interfaces
- Epic 1.8: API Gateway Implementation
2.0 KiB
2.0 KiB
Story 3.4: Service Management CLI Tool
Metadata
- Story ID: 3.4
- Title: Service Management CLI Tool
- Epic: 3 - Module Framework (Feature Services)
- Status: Pending
- Priority: Medium
- Estimated Time: 4-5 hours
- Dependencies: 3.1, 3.3
Goal
Provide CLI tooling for managing feature services, validating dependencies, and testing service registration with Consul.
Description
This story creates a CLI tool that allows developers and operators to manage feature services, validate service dependencies, test service registration, and inspect service information via Consul.
Deliverables
1. CLI Tool (cmd/platformctl/main.go)
platformctl services list- List all services registered in Consulplatformctl services validate- Validate service dependenciesplatformctl services test <service>- Test service registration and healthplatformctl services info <service>- Show service details from Consulplatformctl services dependencies <service>- Show service dependenciesplatformctl services health <service>- Check service health- Command-line argument parsing
- Error handling and user-friendly output
2. Makefile Integration
make install-cli- Install CLI toolmake cli- Build CLI toolmake cli-test- Test CLI tool
Implementation Steps
-
Create CLI Tool
- Create
cmd/platformctl/main.go - Use cobra for CLI framework
- Implement commands
- Create
-
Implement Commands
- List command
- Validate command
- Test command
- Info command
-
Add to Makefile
- Add build commands
- Add install commands
Acceptance Criteria
- CLI tool lists all services from Consul
- Service dependency validation works
- Service health checking works
- CLI is installable and usable
- Commands provide helpful output
- Error messages are clear
- Integration with Consul service registry works
Files to Create/Modify
cmd/platformctl/main.go- CLI toolMakefile- Add CLI commands