Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create diagram.md #252

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions docs/diagram.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
```mermaid
flowchart TB
%% Styles
classDef api fill:#3498db,stroke:#2980b9,color:white
classDef core fill:#2ecc71,stroke:#27ae60,color:white
classDef integration fill:#f1c40f,stroke:#f39c12,color:black
classDef critical fill:#e74c3c,stroke:#c0392b,color:white
classDef default fill:#95a5a6,stroke:#7f8c8d,color:white

%% Application Layer
subgraph AppLayer["Application Layer"]
ExtApp["External Erlang Applications"]
end

%% Public Interface Layer
subgraph PublicAPI["Public Interface"]
MeckAPI["Meck API (meck)"]:::api
end

%% Core Services Layer
subgraph CoreServices["Core Services Layer"]
CodeGen["Code Generation System (meck_code_gen)"]:::core
Expect["Expectation Handler (meck_expect)"]:::core
History["History Tracker (meck_history)"]:::core
ProcMgr["Process Manager (meck_proc)"]:::critical
ArgMatch["Argument Matcher (meck_args_matcher)"]:::core
RetSpec["Return Spec Handler (meck_ret_spec)"]:::core
Util["Utility Functions (meck_util)"]:::core
Matcher["Matcher Implementation (meck_matcher)"]:::core
Defs["Shared Definitions (meck.hrl)"]:::core
end

%% Integration Layer
subgraph Integration["Integration Layer"]
OrigMod["Original Module Interface (meck_code)"]:::integration
Cover["Cover Tool Integration (meck_cover)"]:::integration
end

%% Relationships
ExtApp --> MeckAPI
MeckAPI --> CodeGen
MeckAPI --> Expect
MeckAPI --> History
MeckAPI --> ProcMgr

CodeGen --> OrigMod
CodeGen --> Cover

Expect --> ArgMatch
Expect --> RetSpec
Expect --> History

ProcMgr --> CodeGen
ProcMgr --> History

ArgMatch --> Matcher

%% Shared Dependencies
CodeGen -.-> Defs
Expect -.-> Defs
History -.-> Defs
ProcMgr -.-> Defs

CodeGen -.-> Util
Expect -.-> Util
History -.-> Util
ProcMgr -.-> Util

%% Click Events
click MeckAPI "https://github.com/eproxus/meck/blob/master/src/meck.erl"
click CodeGen "https://github.com/eproxus/meck/blob/master/src/meck_code_gen.erl"
click Expect "https://github.com/eproxus/meck/blob/master/src/meck_expect.erl"
click History "https://github.com/eproxus/meck/blob/master/src/meck_history.erl"
click ProcMgr "https://github.com/eproxus/meck/blob/master/src/meck_proc.erl"
click ArgMatch "https://github.com/eproxus/meck/blob/master/src/meck_args_matcher.erl"
click RetSpec "https://github.com/eproxus/meck/blob/master/src/meck_ret_spec.erl"
click Cover "https://github.com/eproxus/meck/blob/master/src/meck_cover.erl"
click OrigMod "https://github.com/eproxus/meck/blob/master/src/meck_code.erl"
click Defs "https://github.com/eproxus/meck/blob/master/src/meck.hrl"
click Util "https://github.com/eproxus/meck/blob/master/src/meck_util.erl"
click Matcher "https://github.com/eproxus/meck/blob/master/src/meck_matcher.erl"
```
Loading