Skip to content

Commit

Permalink
docs: add architecture diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanachten committed Nov 14, 2023
1 parent bda6936 commit 960e7f0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,18 @@ One example using the [ensemble](https://github.com/ryanachten/ensemble) project

## Development

### Architecture

![cmdo model](./docs/cmdo_model.png)

Link for diagram on [excalidraw](https://excalidraw.com/#json=oVgLzyqIu9KQF76ZJrKBO,dls8gu58817lzBWWn0tG9w).

cmdo is comprised of two main parts; a command runner (`commander` in the diagram above), which executes different `command`s based on the commands defined in `configuration`.

The output from each `command` is piped both to stdout/stderr but also broadcasted via the `webserver` using websockets. The commando output is also stored `history` so that the command output can be loaded on refresh.

A web app consuming websocket output is served by cmdo. This intentionally uses a no-build process to keep the dev experience simple. Preact, JS modules, JSDoc and CSS imports are used in favour of alternatives requiring a frontend build step. The web app provides different view and searching capabilities not found in the CLI tool alone.

### Prerequisites

- Go installed locally (>v1.21)
Expand Down
Binary file added docs/cmdo_model.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 960e7f0

Please sign in to comment.