#523 - Replace DataManager dynamic usage with explicit dependencies

Open
#526 0 comments 0 reactions 1 assignee View on GitHub

@brijesh-amin is already working on this.

Since Jul 17, 2026.

Assessment

This issue has not been assessed yet.

Description

Parent: #523

Objective

Reduce hidden coupling and improve testability by moving from dynamic DataManager usage to explicit dependencies in targeted paths.

In scope

  • Identify one or two high-traffic controllers/services using new DataManager(...)
  • Replace with explicit repository/db dependency injection (module-level singleton or constructor-injected, based on repo conventions)
  • Remove unused constructor argument patterns and tighten types where touched

Acceptance criteria

  • No new new DataManager(config) call sites introduced
  • Selected paths use explicit dependencies instead of dynamic proxy behavior
  • Tests updated to mock explicit boundaries
  • Behavior remains backward-compatible

Notes

Coordinate with the plan vertical-slice issue to avoid duplicate refactors.

Dominant language
TypeScript
Stars
1
Forks
7
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bcgov/range-api

All issues in bcgov/range-api

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.