You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds proxy routing layer to split API traffic between v1 and v2 backends. Incoming requests on port 3002 get forwarded to the appropriate service based on path prefix. /v2/* routes hit the new v2 backend on 3004, everything else falls through to v1 on 3003.
This is groundwork for the v2 API migration so we can run both versions in parallel without touching the client.
I have self-reviewed the code (A decent size PR without self-review might be rejected).
I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox. N/A
I confirm automated tests are in place that prove my fix is effective or that my feature works.
How should this be tested?
Run v1 backend on port 3003 and v2 backend on port 3004
Start the proxy with node proxy.js
Hit http://localhost:3002/some-endpoint and confirm it reaches the v1 service
Hit http://localhost:3002/v2/some-endpoint and confirm it reaches v2
Check that websocket connections still work through the proxy (they probably don't yet, known gap)
No special env vars needed. Just needs both backends running locally.
🔎 [SECURITY] The proxy routing layer lacks authentication middleware, exposing all API endpoints without authorization checks. The comment 'TODO: this needs auth middleware before it hits prod' indicates this i...
Read more · expand 🔽
...s a known security gap that must be addressed before production deployment.
🔎 [PERFORMANCE] The proxy adds an extra network hop for all API requests, which introduces latency. While necessary for the migration, this should be optimized with connection pooling and proper timeout configurat...
🔎 [STYLE] Code comment violates style guide: comments should explain 'why' not 'what' or contain obvious information. The comment '// catch-all has to go last or v2 never matches' is stating what the code do...
Read more · expand 🔽
...es rather than explaining why this ordering is necessary.
📖 *quality-code-comments_style_section.md lines 1-30* 📝 `apps/api/index.js line 18`
🔎 [POLICY_VIOLATION] Missing automated tests for the proxy routing changes. The PR description indicates 'I confirm automated tests are in place that prove my fix is effective or that my feature works' is unchecked, an...
Read more · expand 🔽
...d no tests are mentioned in the testing section.
📖 *CONTRIBUTING_onboarding_section.md lines 149-179 and testing-coverage-requirements_onboarding_section.md lines 1-50*
🔎 [CHORE] PR template checklist items are not properly filled out. The PR description includes unchecked checkboxes for mandatory tasks and the contributor checklist, indicating incomplete self-review.
📖 CONTRIBUTING_onboarding_section.md lines 149-179
👆 Click expand on any gate above to see full findings with evidence and citations.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds proxy routing layer to split API traffic between v1 and v2 backends. Incoming requests on port 3002 get forwarded to the appropriate service based on path prefix.
/v2/*routes hit the new v2 backend on 3004, everything else falls through to v1 on 3003.This is groundwork for the v2 API migration so we can run both versions in parallel without touching the client.
Visual Demo (For contributors especially)
Video Demo (if applicable):
N/A - no UI changes
Image Demo (if applicable):
N/A - backend routing only
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
node proxy.jshttp://localhost:3002/some-endpointand confirm it reaches the v1 servicehttp://localhost:3002/v2/some-endpointand confirm it reaches v2No special env vars needed. Just needs both backends running locally.
Checklist