How dever-labs/mockly works
Mockly is a configurable, multi-protocol mock server. Users or test clients configure mocks through the management API, UI, CLI, or SDKs; application traffic then reaches the matching protocol server and receives configured responses. The graph captures documented capabilities, but several subsystem links rely on the README because their source was not sampled.
Main entry points: api/server.go REST API · main.go Mockly CLI · httpserver/server.go HTTP Server · protocols Messaging Protocols
Components 17
Entry Points
- Mockly CLI
cmd/mockly/main.go - Configuration
internal/config/config.go - Preset Configs
internal/presets/presets.go
Mock Runtime
- HTTP Server
internal/protocols/httpserver/server.go - WS, gRPC, GraphQL
internal/protocols - Messaging Protocols
internal/protocols - Other Protocols
internal/protocols
Shared Services
- Matching & Templates
internal/engine - Scenarios & Faults
internal/scenarios - Runtime State
internal/state/store.go - Request Logs
internal/logger/logger.go
Client Libraries
- Language Drivers
clients - Testcontainers Integrations
clients
Other components
- Operator
- Test Application
Connections 38
- Operator → Mockly CLI: runs commands
- Operator → Web UI: configures mocks
- Mockly CLI → REST API: manages mocks
- Mockly CLI → Configuration: loads config
- Mockly CLI → Preset Configs: uses presets
- Mockly CLI → HTTP Server: starts listeners
- Mockly CLI → WS, gRPC, GraphQL: starts listeners
- Mockly CLI → Messaging Protocols: starts listeners
- Mockly CLI → Other Protocols: starts listeners
- Configuration → HTTP Server: configures
- Configuration → WS, gRPC, GraphQL: configures
- Configuration → Messaging Protocols: configures
- Configuration → Other Protocols: configures
- Web UI → REST API: calls endpoints
- REST API → HTTP Server: manages mocks
- REST API → WS, gRPC, GraphQL: manages mocks
- REST API → Messaging Protocols: manages mocks
- REST API → Other Protocols: manages mocks
- REST API → Scenarios & Faults: manages scenarios
- REST API → Runtime State: manages state
- REST API → Request Logs: reads logs
- Test Application → HTTP Server: sends requests
- Test Application → WS, gRPC, GraphQL: sends traffic
- Test Application → Messaging Protocols: sends traffic
- Test Application → Other Protocols: sends traffic
- HTTP Server → Matching & Templates: matches and renders
- WS, gRPC, GraphQL → Matching & Templates: matches and renders
- Messaging Protocols → Matching & Templates: matches and renders
- Other Protocols → Matching & Templates: matches and renders
- HTTP Server → Scenarios & Faults: applies patches and faults
- Messaging Protocols → Scenarios & Faults: reads protocol faults
- HTTP Server → Runtime State: checks conditions
- Messaging Protocols → Runtime State: checks conditions
- HTTP Server → Request Logs: records calls
- Messaging Protocols → Request Logs: records traffic
- Language Drivers → REST API: manages server
- Language Drivers → Test Application: supports tests
- Testcontainers Integrations → Language Drivers: wraps server