Explore and map swaps code architecture #6742
Draft
+195
−0
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.
Explanation
What is the current state of things and why does it need to change?
Product Managers for MetaMask Swaps frequently need to understand the codebase's architecture, specific logic implementations, API calls, feature flag usage, caching mechanisms, RPC methods, and client-specific behaviors. This information is currently scattered across various code files, making it difficult and time-consuming for PMs to find and interpret.
What is the solution your changes offer and how does it work?
This PR introduces a new Markdown document,
docs/swaps-bridge-pm-guide.md
, which centralizes and explains the Swaps and Bridge architecture in a PM-friendly, easily searchable format. It includes a table of contents, direct links to key code files, and an FAQ section, covering topics like core logic location, API interactions, feature flag implementation, caching strategies, RPC usage, Snap integrations, and Mobile vs. Extension differences.Are there any changes whose purpose might not obvious to those unfamiliar with the domain?
The primary purpose is to provide a single, accessible source of truth for non-technical stakeholders to quickly understand the Swaps/Bridge codebase.
References
Checklist