Skip to content

docs: create architecture diagram (Mermaid or Draw.io) showing component relationships #40

Description

@charannyk06

Priority: P3 — Low

Problem

ChainReview has a sophisticated multi-component architecture (VS Code extension, MCP server, 5 agents, 9+ tools, Cloudflare Workers API, Next.js dashboard, Supabase) but there is no visual architecture diagram. New contributors must piece together the architecture by reading code.

Solution

Add a docs/architecture.md with:

1. System Overview Diagram (Mermaid)

graph TB
    subgraph VSCode["VS Code Extension"]
        EXT[Extension Host]
        WV[Webview React UI]
        AUTH[Auth Provider]
        MCP_C[MCP Client]
    end
    
    subgraph Server["MCP Server (Node.js)"]
        ORCH[Orchestrator]
        subgraph Agents
            ARCH[Architecture Agent]
            SEC[Security Agent]
            BUGS[Bugs Agent]
            VAL[Validator Agent]
            EXP[Explainer Agent]
        end
        subgraph Tools
            REPO[repo tools]
            CODE[code tools]
            PATCH[patch tools]
            EXEC[exec tools]
            GRAPH[graph tools]
        end
        STORE[(SQLite Store)]
    end
    
    subgraph Cloud["Optional Cloud (Managed Mode)"]
        API[chainreview-api\nCloudflare Workers]
        DB[(Supabase PostgreSQL)]
        DASH[Dashboard\nNext.js]
    end
    
    ANTHROPIC[Anthropic API\nClaude claude-opus-4-6]
Loading

2. Review Run Sequence Diagram

Show the flow: user triggers review → extension → MCP server → agents run in parallel → findings returned → webview displays.

3. Data Flow Diagram

What data goes where, what stays local vs. what goes to the cloud.

4. Auth Flow Diagram

Supabase OAuth → JWT → API key management flow.

Acceptance Criteria

  • System overview diagram in docs/architecture.md
  • Review run sequence diagram
  • Data flow diagram (local vs. cloud)
  • Linked from README.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions