Skip to content

8.1 Order Service - Scaffold and Schema

Sprint: Sprint 08 - Order and Payment
Feature ID: 8.1
Subtasks: 8.1.1, 8.1.2

Objective

Deliver "Order Service - Scaffold and Schema" within Sprint 08 - Order and Payment.

Dependencies

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

  • 3.4.1
  • Sprint 04
  • 8.1.1

Subtasks

8.1.1 Scaffold order-service from template

  • ID: 8.1.1
  • Title: Create order-service from the service template
  • Description: Instantiate microservices/order-service (port 9004, base package com.telco.order) from the template; depend on starter-api, starter-security, starter-mediator, starter-observability, starter-outbox, starter-inbox; own the order database. Architecture mode: Domain Orchestration (ADR-004) - saga workflow over Order/SagaState with compensation; declare it in CLAUDE.md/README.
  • Business Purpose: Standardized order-orchestration service skeleton.
  • Inputs: ADR-017.
  • Outputs: order-service skeleton building and registering.
  • Acceptance Criteria:
  • Service starts, registers, exposes Swagger UI.
  • Dependencies: 3.4.1, Sprint 04
  • Complexity: S

8.1.2 Order schema migration

  • ID: 8.1.2
  • Title: Create Flyway migration for orders, items, saga state
  • Description: V1__order.sql creating orders (id, customer_id, status, total_amount, currency, created_at), order_items (id, order_id, product_code, product_type, quantity, unit_price), and saga_state (id, order_id, current_step, payload jsonb, last_updated). Plus platform outbox/inbox tables.
  • Business Purpose: Persist orders and saga progress (FR-10, FR-11).
  • Inputs: analysis Section 10.3, FR-10, FR-11.
  • Outputs: Flyway migration.
  • Acceptance Criteria:
  • Migration applies on Testcontainers Postgres; status supports DRAFT, PENDING_PAYMENT, PAID, FULFILLED, CANCELLED.
  • Dependencies: 8.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

  • order-service skeleton building and registering.
  • Flyway migration.

Definition of Done

  • All subtasks (8.1.1, 8.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).