How raydium-io/raydium-cpi-example works
Main Components
• Three Primary CPI Programs: Represent each subproject as separate components:
• AMM (amm-cpi)
• CLMM (clmm-cpi)
• CPMM (cpmm-cpi)
• External Raydium Contracts: Since the CPIs rely on calls to Raydium’s production contracts, include an external block (or blocks) that represent these Raydium liquidity pool contracts with separate labels (AMM, CLMM, CPMM). You may also denote the specific accounts (AmmConfig, FeeReceiver, etc.) mentioned in the README.
• Build/Deployment Environment: Include elements like the Anchor CLI, solana-cli, and any build scripts (e.g. build.sh) to indicate how code is compiled and deployed. You might add a label for the “devnet/mainnet” environment based on provided account configurations.
Architectural Patterns and Technologies
• That the project leverages the Anchor framework, which standardizes the program structure and configuration (see Anchor.toml files).
• The modular organization (each protocol type in its own folder) hints at separation of concerns: each CPI program is self-contained and targets a specific liquidity pool model.
• The presence of external configuration files (Cargo.toml, Anchor.toml) and test files indicates a robust deployment and testing strategy.