Skip to content

6.1 Scaffold and Schema

Sprint: Sprint 06 - Customer Domain
Feature ID: 6.1
Subtasks: 6.1.1, 6.1.2

Objective

Deliver "Scaffold and Schema" within Sprint 06 - Customer Domain.

Dependencies

Aggregated from the subtasks below (prerequisite task IDs and enablers):

  • 3.4.1
  • Sprint 04
  • 6.1.1

Subtasks

6.1.1 Scaffold customer-service from template

  • ID: 6.1.1
  • Title: Create customer-service from the service template
  • Description: Instantiate microservices/customer-service (port 9002, base package com.telco.customer) from the template; depend on starter-api, starter-security, starter-mediator, starter-observability, starter-outbox; own the customer database; declare CQRS+Mediator mode.
  • Business Purpose: Standardized customer-domain service skeleton.
  • Inputs: ADR-017.
  • Outputs: customer-service skeleton building and registering with discovery.
  • Acceptance Criteria:
  • Service starts, registers, exposes Swagger UI, pulls config from config-server.
  • Dependencies: 3.4.1, Sprint 04
  • Complexity: S

6.1.2 Customer schema migration

  • ID: 6.1.2
  • Title: Create Flyway migration for customer, address, document, audit
  • Description: V1__customer.sql creating customers (id, type, first_name, last_name, identity_number_enc, date_of_birth, status, created_at, deleted_at), addresses (id, customer_id, line1, city, district, postal_code, is_default), documents (id, customer_id, type, file_ref, verified_at), and audit_log. identity_number_enc stores the AES-GCM ciphertext (NFR-06).
  • Business Purpose: Persistent customer master data with PII encrypted and soft-delete support.
  • Inputs: analysis Section 10.1, FR-04, NFR-06.
  • Outputs: Flyway migration.
  • Acceptance Criteria:
  • Migration applies on Testcontainers Postgres; deleted_at enables soft-delete; identity number column stores ciphertext, not plaintext.
  • Dependencies: 6.1.1
  • Complexity: M

Acceptance Criteria

Each subtask above carries its own objective, testable acceptance criteria. This feature is complete when every subtask's acceptance criteria are met.

Deliverables

  • customer-service skeleton building and registering with discovery.
  • Flyway migration.

Definition of Done

  • All subtasks (6.1.1, 6.1.2) completed and their acceptance criteria verified.
  • All listed dependencies satisfied.
  • Build and tests green per the global conventions in ../README.md (Section 3).