Skip to content

docs: add onboarding diagrams and entrypoints#4311

Merged
jmg-duarte merged 2 commits intomainfrom
docs/onboarding-diagrams
Apr 9, 2026
Merged

docs: add onboarding diagrams and entrypoints#4311
jmg-duarte merged 2 commits intomainfrom
docs/onboarding-diagrams

Conversation

@jmg-duarte
Copy link
Copy Markdown
Contributor

Description

Addresses review feedback on #4296.

New contributors need a single place to see how orderbook, autopilot, driver, solvers, Postgres, and the chain fit together, plus where to open the codebase for each area. This PR adds docs/ONBOARDING.md with Mermaid diagrams and practical code entrypoints, and links it from README.md.

Changes

  • Add docs/ONBOARDING.md: system context diagram, order→auction→settle sequence diagram, service responsibilities diagram, DB mental model diagram
  • Add "Where to start reading code" with entrypoints pointing to run.rs for each service (orderbook, autopilot, driver, solvers, contracts, database)
  • Add solver types section explaining colocated vs non-colocated distinction
  • Add local development quick-start (playground with ETH_RPC_URL note, cargo check/nextest, formatting)
  • Add debugging section linking to COW_ORDER_DEBUG_SKILL.md
  • Update README.md with a link to docs/ONBOARDING.md

How to test

  1. Open docs/ONBOARDING.md on GitHub and confirm all Mermaid blocks render (context flowchart, sequence diagram, responsibilities flowchart, DB flowchart)
  2. Click links to playground/README.md, database/README.md, and COW_ORDER_DEBUG_SKILL.md and confirm they resolve
  3. Open README.md and confirm the new onboarding link points to ./docs/ONBOARDING.md

@jmg-duarte jmg-duarte requested a review from a team as a code owner April 6, 2026 17:01
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 6, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a comprehensive onboarding guide and architecture diagrams for the CoW Protocol services. The review identified several critical logic and syntax errors in the Mermaid diagrams, specifically the use of non-standard 'smart' quotes that break rendering and incorrect loop boundaries in the sequence diagram that failed to capture the full auction lifecycle. Additionally, the system context diagram was updated to correctly reflect the auction distribution flow to colocated solvers.

@jmg-duarte jmg-duarte force-pushed the docs/onboarding-diagrams branch 7 times, most recently from 9b903ca to 6616a56 Compare April 7, 2026 13:46
Add docs/ONBOARDING.md with Mermaid architecture/flow diagrams and practical code entrypoints.
Link it from the repository README.
@jmg-duarte jmg-duarte force-pushed the docs/onboarding-diagrams branch from 6616a56 to 70c2d54 Compare April 7, 2026 13:47
Copy link
Copy Markdown
Contributor

@MartinquaXD MartinquaXD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall. I imagine this should be helpful for new contributors / colleagues.

@jmg-duarte jmg-duarte requested a review from MartinquaXD April 8, 2026 09:37
Copy link
Copy Markdown
Contributor

@tilacog tilacog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super nice diagrams!


DR -->|simulate + submit tx| CH[("EVM chain\n+ Settlement contract")]
CO -->|submit tx| CH
AP -->|index events| CH
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I'd flip this arrow, since the events originate on-chain and are captured by the autopilot.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here and in the other comment, I think the distinction will always be in the eye of the beholder, I understand both ways of thinking

Autopilot actively indexes events by querying the chain
Autopilot actively indexes events from the chain

I'll keep them as is

@jmg-duarte jmg-duarte added this pull request to the merge queue Apr 9, 2026
Merged via the queue into main with commit 0ea7a77 Apr 9, 2026
27 checks passed
@jmg-duarte jmg-duarte deleted the docs/onboarding-diagrams branch April 9, 2026 09:06
@github-actions github-actions bot locked and limited conversation to collaborators Apr 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants