FEAT: add base HTTP controller and routes structure#506
Open
GabrielTozatti wants to merge 2 commits intotzt/feat/utxo-worker-schema-servicefrom
Open
FEAT: add base HTTP controller and routes structure#506GabrielTozatti wants to merge 2 commits intotzt/feat/utxo-worker-schema-servicefrom
GabrielTozatti wants to merge 2 commits intotzt/feat/utxo-worker-schema-servicefrom
Conversation
guimroque
reviewed
Mar 11, 2026
guimroque
reviewed
Mar 11, 2026
guimroque
reviewed
Mar 11, 2026
Member
guimroque
left a comment
There was a problem hiding this comment.
Code Review
Summary
Solid foundation for HTTP structure with proper separation of concerns and error handling. The modular approach with controllers, routes, and middleware follows good architectural patterns. However, there are critical issues with console.log usage and missing Express middleware setup.
Strengths
- Clean modular structure separating HTTP concerns in
src/http/directory - Proper error handling with custom
AppErrorclass and centralized middleware inhandleErrors.ts:10-22 - Good separation of routes and controllers in
gasless/routes.ts:5-6andgasless/controller.ts:4-15 - Consistent async/await pattern with proper error propagation in
controller.ts:9-13
Issues
- 1 critical, 1 important, 0 suggestions
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Creates the base HTTP structure for the Worker, introducing controllers, routes and error handling middleware following a modular pattern that scales for future domains.
Summary
src/http/structure separating HTTP concerns from queues/jobscontrollerwithreserve(test) endpointsroutersmapping/worker/gasless/*routeshandleErrorsglobal error handling middleware withAppErrorsetupRoutes()to register all routers in the Express appsetupRoutes(app)in worker entrypointChecklist