Skip to content

#523 - Extract plan vertical slice to controller/service/repository boundary #525

Description

@brijesh-amin

Parent: #523

Objective

Create a modern boundary for one high-value plan flow by separating transport concerns from business logic and data access.

In scope

  • Select one plan workflow currently implemented in PlanController
  • Introduce service module(s) under src/services/plan/ for orchestration/business rules
  • Introduce repository abstraction(s) over db2 access for the selected flow
  • Keep controller as thin request/response adapter
  • Add/adjust tests to protect behavior

Acceptance criteria

  • Controller delegates core logic to service
  • Service does not depend on Express req/res
  • Repository encapsulates query implementation for the selected flow
  • Existing endpoint behavior remains compatible
  • Regression tests cover service behavior and endpoint contract

Notes

Use this as the reference pattern for later controller decompositions.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions