Skip to content

Make backend modules environment-gated through configuration instead of process.env #6

Description

@grantfox-oss

AppModule conditionally loads reconciliation, notifications, and developer modules based on raw SUPABASE_URL string checks. This makes behavior surprising across test, local, staging, and production environments.

Affected areas: app/backend/src/app.module.ts, app/backend/src/config/*, app/backend/src/reconciliation/*, app/backend/src/notifications/*, app/backend/src/developer/*, .env.example, backend setup docs/tests.

Implementation scope:

  • Add typed config flags such as features.reconciliationEnabled, features.notificationsEnabled, and features.developerRoutesEnabled.
  • Move dynamic module selection behind a small factory with tests.
  • Document safe local defaults and production-required settings.
  • Remove direct process.env reads from module composition.

Acceptance criteria:

  • Test, local, staging, and production module sets are deterministic from typed config.
  • Missing required production config fails fast.
  • Docs and .env.example describe each flag and default.

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official CampaigndocumentationImprovements or additions to documentation

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions