Skip to content

Commit

Permalink
Design documentation added.
Browse files Browse the repository at this point in the history
  • Loading branch information
janosmurai committed Oct 12, 2023
1 parent aed00e0 commit 866a41c
Show file tree
Hide file tree
Showing 24 changed files with 88 additions and 1 deletion.
86 changes: 86 additions & 0 deletions docs/design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
title: Design
---

## Architectural Overview

This chapter contains the technical documentation for the design.

The Development Environment Manager (DEM) provides an abstraction layer for the Development
Platform, which encompasses a collection of available resources, such as registries, catalogs,
container engines, and more. The modules that compose the platform form the core of the DEM.

The DEM implements commands that can interact with the platform. These commands can be executed
using the command line interface (CLI). Additionally, some commands utilize a Text-based User
Interface (TUI) that can be presented on the user's terminal.

![dem_architecture](wp-content/dem_architecture.png){: .center}

The CLI can communicate with the platform in two ways:

1. Over the Platform API, which can be achieved by instantiating the DevEnvLocalSetup class.
2. By registering a UserOutput class, which is used by the core modules to interact with the user.

## Core Components

The dependency graph of the core modules is illustrated below:

![dependency_graph](wp-content/core_module_dependency_graph.png)

As shown in the diagram, the platform module depends on the rest of the resources. This concept
allows for the creation of a unified interface for all internal resources.

The relationships between classes in the core modules can be observed in the
[Core Class Diagram](wp-content/core_class_diagram.png).

## Third-party Modules

### Typer
This module is used to create a framework for the CLI commands. You can add a new command by
extending the list of functions in the main.py file and applying the @typer_cli.command() decorator.

### Rich
Rich is a Python library used for formatting text with colors and styles, displaying advanced
content like tables, markdown, and syntax-highlighted code.
DEM employs this module to present information to the user in the command line.

### Requests
Requests is an HTTP library for Python.

### Readchar
This module can be used to capture character inputs. In cases where the Rich module is not suitable,
Readchar is a useful tool for obtaining user input.

For instance, when the Rich module occupies the entire terminal for a TUI panel, Readchar can be
used to capture navigation input by reading individual characters.

### Docker
Docker is used to communicate directly with the Docker Engine. (The Docker CLI is not utilized.)

## Command setup

The commands can interact with the Platform by instantiating the DevEnvLocalSetup class, which
should provide all the necessary functionality from the core modules.

For a detailed description of the functionality of each command, please refer to the Commands
chapter. In this section, we provide flowcharts to describe the execution logic.

- [add-cat](wp-content/flowcharts/add-cat.png)
- [add-reg](wp-content/flowcharts/add-reg.png)
- [create](wp-content/flowcharts/create.png)
- [delete](wp-content/flowcharts/delete.png)
- [del-reg](wp-content/flowcharts/del-reg.png)
- [info](wp-content/flowcharts/info.png)
- [init (without assigned dev env)](wp-content/flowcharts/init_without_assigned_dev_env.png)
- [init (with assigned dev env)](wp-content/flowcharts/init_with_assigned_dev_env.png)
- [list](wp-content/flowcharts/list.png)
- [modify](wp-content/flowcharts/modify.png)
- [uninstall](wp-content/flowcharts/uninstall.png)
- [add-host](wp-content/flowcharts/add-host.png)
- [clone](wp-content/flowcharts/clone.png)
- [del-cat](wp-content/flowcharts/del-cat.png)
- [del-host](wp-content/flowcharts/del-host.png)
- [export](wp-content/flowcharts/export.png)
- [install](wp-content/flowcharts/install.png)
- [load](wp-content/flowcharts/load.png)
- [rename](wp-content/flowcharts/rename.png)
Binary file added docs/wp-content/core_class_diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/wp-content/core_module_dependency_graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/wp-content/dem_architecture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/wp-content/flowcharts/add-cat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/wp-content/flowcharts/add-host.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/wp-content/flowcharts/add-reg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/wp-content/flowcharts/clone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/wp-content/flowcharts/create.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/wp-content/flowcharts/del-cat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/wp-content/flowcharts/del-host.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/wp-content/flowcharts/del-reg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/wp-content/flowcharts/delete.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/wp-content/flowcharts/export.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/wp-content/flowcharts/info.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/wp-content/flowcharts/install.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/wp-content/flowcharts/list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/wp-content/flowcharts/load.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/wp-content/flowcharts/modify.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/wp-content/flowcharts/rename.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/wp-content/flowcharts/uninstall.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,5 @@ nav:
- 'index.md'
- 'installation.md'
- 'development_environments.md'
- 'commands.md'
- 'commands.md'
- 'design.md'

0 comments on commit 866a41c

Please sign in to comment.