docs(adr): convert all ADRs to MADR 2.1.2 format
Rewrites all 7 backend ADRs from a custom structure to the MADR 2.1.2 template required by the VS Code ADR Manager extension: bullet metadata (Status/Date), standardised section headings, "Chosen option: X, because Y" wording, and explicit Pros/Cons blocks per option.
This commit is contained in:
@@ -1,25 +1,52 @@
|
||||
# ADR 0007: Removal of Legacy Route Directories (v1, v2, v3)
|
||||
# Remove legacy route directories v1, v2, v3
|
||||
|
||||
**Date:** 2026-04-26
|
||||
**Status:** Proposed
|
||||
* Status: proposed
|
||||
* Date: 2026-04-26
|
||||
|
||||
## Context
|
||||
## Context and Problem Statement
|
||||
|
||||
The `src/routes/` directory contains three legacy subdirectories (`v1/`, `v2/`, `v3/`) alongside the active `api/` directory. These are backup snapshots of earlier API iterations, kept during the migration to the current domain-based structure. They are not mounted in the application and serve no runtime purpose.
|
||||
The `src/routes/` directory contains three legacy subdirectories (`v1/`, `v2/`, `v3/`) alongside the active `api/` directory. These are backup snapshots of earlier API iterations kept during the migration to the current domain-based structure. They are not mounted in the application. Should they be removed?
|
||||
|
||||
Their presence:
|
||||
- Creates confusion about which routes are active.
|
||||
- Adds noise to `grep` and IDE navigation.
|
||||
- Risks accidentally referencing stale logic.
|
||||
## Decision Drivers
|
||||
|
||||
## Decision
|
||||
* Legacy directories create confusion about which routes are active.
|
||||
* They add noise to `grep` output and IDE navigation.
|
||||
* Stale logic risks being accidentally referenced.
|
||||
|
||||
Remove `v1/`, `v2/`, and `v3/` directories once the following is confirmed:
|
||||
- No active code references them (direct imports or dynamic requires).
|
||||
- Their content has been superseded by the equivalent routes under `src/routes/api/`.
|
||||
## Considered Options
|
||||
|
||||
## Consequences
|
||||
* Remove `v1/`, `v2/`, `v3/` after verification
|
||||
* Keep them indefinitely
|
||||
|
||||
- **Positive:** Cleaner repository. Only active routes remain.
|
||||
- **Risk:** If any code path still references these directories, removal would cause a runtime error. Verify with `grep -r "routes/v[123]"` before deleting.
|
||||
- **Status rationale:** Marked as *Proposed* rather than *Accepted* until the verification step is completed and the deletion is committed.
|
||||
## Decision Outcome
|
||||
|
||||
Chosen option: "Remove after verification", because the directories serve no runtime purpose and their presence actively harms codebase clarity.
|
||||
|
||||
Before deletion, verify: no active code references them (direct imports or dynamic requires) and their content has been superseded by the equivalent routes under `src/routes/api/`. Verification command: `grep -r "routes/v[123]" src/`.
|
||||
|
||||
This ADR is marked *proposed* rather than *accepted* until the verification step is completed and the deletion is committed.
|
||||
|
||||
### Positive Consequences
|
||||
|
||||
* Cleaner repository — only active routes remain visible.
|
||||
* Eliminates the risk of accidentally referencing stale logic.
|
||||
|
||||
### Negative Consequences
|
||||
|
||||
* If any code path still references these directories, removal would cause a runtime error. The verification step mitigates this risk.
|
||||
|
||||
## Pros and Cons of the Options
|
||||
|
||||
### Remove after verification
|
||||
|
||||
* Good, because removes dead code that harms navigability.
|
||||
* Bad, because irreversible without git history — must verify before deleting.
|
||||
|
||||
### Keep indefinitely
|
||||
|
||||
* Good, because no risk of breakage.
|
||||
* Bad, because perpetuates confusion about what is active.
|
||||
|
||||
## Links
|
||||
|
||||
* Related to [ADR 0004](0004-route-organisation-by-domain.md) — domain-based `api/` structure that replaces these legacy directories.
|
||||
|
||||
Reference in New Issue
Block a user