Files
goplt/docs/content/stories/epic3/3.4-module-cli.md
0x1d 38a251968c docs: Align documentation with true microservices architecture
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
2025-11-06 08:54:19 +01:00

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 Consul
  • platformctl services validate - Validate service dependencies
  • platformctl services test <service> - Test service registration and health
  • platformctl services info <service> - Show service details from Consul
  • platformctl services dependencies <service> - Show service dependencies
  • platformctl services health <service> - Check service health
  • Command-line argument parsing
  • Error handling and user-friendly output

2. Makefile Integration

  • make install-cli - Install CLI tool
  • make cli - Build CLI tool
  • make cli-test - Test CLI tool

Implementation Steps

  1. Create CLI Tool

    • Create cmd/platformctl/main.go
    • Use cobra for CLI framework
    • Implement commands
  2. Implement Commands

    • List command
    • Validate command
    • Test command
    • Info command
  3. 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 tool
  • Makefile - Add CLI commands