Motivation
ArbBot was originally written in javascript and over time, as new features and updates have been added to the codebase, older code and free functions have accumulated in various files, leading to a less organized and harder-to-maintain project structure and then adding to all of that, it was directly ported to typescript. Besides some very recent features/updates, this has resulted in free function all over the place, generic utility files, unclear module boundaries and in general poor code structure and standard.
To ensure the long-term health, scalability, and maintainability of the project, an upgrade and refactor is necessary. The goal is to reorganize the code into clear, purpose-driven modules, improve test coverage and reliability, and establish a well organized and extensible architecture that enables easier maintainability and extendability and also in general, establish acceptable standard for the repo and codebase.
Goals
- Establish a clear, modular architecture, by relocating free functions into appropriate modules and under corresponding newly added types.
- Remove generic utils files by distributing their contents to relevant modules.
- Improve code documentation and comments, and add any mising ones.
- Transition all unit tests to use
vitest and cover any missing one and ensure all code paths are tested.
- Ensure all changes in PRs are incremental, non-breaking and reasonably sized to speed up the review and approval process (that means all PRs must pass all CIs (unit and e2e tests) and preview deployment).
PR Tracking List
new PRs will be added to the track list as they come
Motivation
ArbBot was originally written in javascript and over time, as new features and updates have been added to the codebase, older code and free functions have accumulated in various files, leading to a less organized and harder-to-maintain project structure and then adding to all of that, it was directly ported to typescript. Besides some very recent features/updates, this has resulted in free function all over the place, generic utility files, unclear module boundaries and in general poor code structure and standard.
To ensure the long-term health, scalability, and maintainability of the project, an upgrade and refactor is necessary. The goal is to reorganize the code into clear, purpose-driven modules, improve test coverage and reliability, and establish a well organized and extensible architecture that enables easier maintainability and extendability and also in general, establish acceptable standard for the repo and codebase.
Goals
vitestand cover any missing one and ensure all code paths are tested.PR Tracking List
arb-bottorain-solverin docsstatemodule, that keeps state of the app during runtime and also relocating some relevant functionalities to this moduleloggermodule, which hosts all functionalities needed to instrument RainSolver for open telemetrysubgraphmodule withSubgraphManagerclass that contains all the functionalities needed for interacting with subgraphs and getting order details and other relevant infonew PRs will be added to the track list as they come