feat: introduce API v1 routing under /api/v1#171
Conversation
|
@madisonsc52-del is attempting to deploy a commit to the Abdulazeem's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@madisonsc52-del Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
…ecture-to-Support-Explicit-Versioning-(/api/v1)-FIX
|
Fix check |
…ecture-to-Support-Explicit-Versioning-(/api/v1)-FIX
|
Issue resolved |
…ecture-to-Support-Explicit-Versioning-(/api/v1)-FIX
…ecture-to-Support-Explicit-Versioning-(/api/v1)-FIX
|
fix backend build test error |
…ecture-to-Support-Explicit-Versioning-(/api/v1)-FIX
|
Still the same Backend build test error |
|
Hi @Abdulazeem-code sir, I have resolved the backend build errors caused by merge conflict artifacts and cleaned up the temporary files. The repository currently shows '3 workflows awaiting approval'—could you please approve the workflow runs so the new tests can confirm the fix? Thank you! |
|
It is still failing |
|
Fixed the error conflict |
31f0b78 to
e31ce3b
Compare
|
Hi @Abdulazeem-code, I've fixed the Backend Build & Test failure. The branch had merge corruption from a prior update that left syntax errors and conflict markers in server.js, server.test.js, and src/cleanup-cron.js. I cleaned those up and completed the v1 route extraction: Moved /register, /lookup, /federation, and /receipts into src/routes/v1/ Thanks! |
1. Findings within the Codebase
Monolithic Server Structure
server.js.Circular Dependency Risk
server.jsand route files.poolGet is not a function) due to CommonJS module caching.Unversioned Internal Consumers
App.jsx) and backend tests (server.test.js) depended on unversioned endpoints./api/v1would break these consumers with 404 errors.Incorrect Stellar Federation Configuration
stellar.tomlpointed to an unversioned/federationendpoint.2. Fix Features Implemented
Database & Service Decoupling
src/db.js.Modular Route Architecture
Introduced versioned route structure under
src/routes/v1/:userRoutes.js:/register,/lookup,/usersfederationRoutes.js:/federationreceiptRoutes.js:/receipts/:txHashindex.js: Aggregates all routes into one routerServer Refactoring
server.jsto only core server responsibilities./api/v1./healthand/.well-known/stellar.tomlat root level.stellar.tomlto use/api/v1/federation.End-to-End Consumer Updates
App.jsx) to use versioned endpoints.server.test.js) accordingly.CLOSE #54