diff --git a/README-dev.md b/README-dev.md index 0e51135d..8807738b 100644 --- a/README-dev.md +++ b/README-dev.md @@ -1,47 +1,47 @@ README-dev ========== # modules' description ## Main swh.web.ui.main: Start the server or the dev server ## Layers Folder swh/web/ui/: - api main api endpoints definition (api) - views main ui endpoints (web app) - service Orchestration layer used by api/view module. In charge of communication with `backend` to retrieve information and conversion for the upper layer. - backend Lower layer in charge of communication with swh storage. Used by `service` module. In short: 1. views -depends-> api -depends-> service -depends-> backend ----asks----> swh-storage 2. views <- api <- service <- backend <----rets---- swh-storage ## Utilities Folder swh/web/ui/: - apidoc Browsable api functions. - exc Exception definitions. - errorhandler Exception (defined in `exc`) handlers. Use at route definition time (`api`, `views`). - renderers Rendering utilities (html, json, yaml, data...). Use at route definition time (`api`, `views`). - converters conversion layer to transform swh data to serializable data. Used by `service` to convert data before transmitting to `api` or `views`. - query Utilities to parse data from http endpoints. Used by `service` - upload Utility module to deal with upload of data to webapp or api. Used by `api` - utils Utilities used throughout swh-web-ui. -## TODO +## Graphics summary -dot files to generate the dependencies drawing + ![Summary dependencies](./docs/dependencies.png) diff --git a/docs/dependencies.dot b/docs/dependencies.dot new file mode 100644 index 00000000..b3decb19 --- /dev/null +++ b/docs/dependencies.dot @@ -0,0 +1,41 @@ +digraph { + # main modules + "backend"[style=filled,fillcolor="#BBEECC"]; + "service"[style=filled,fillcolor="#BBEECC"]; + "api"[style=filled,fillcolor="#BBEECC"]; + "views"[style=filled,fillcolor="#BBEECC"]; + + # utilities + "utils"[style=filled,fillcolor="#808080"]; + "converters"[style=filled,fillcolor="#808080"]; + "renderers"[style=filled,fillcolor="#808080"]; + "query"[style=filled,fillcolor="#808080"]; + "exc"[style=filled,fillcolor="#808080"]; + + "storage"[style=filled,fillcolor="#CCAACC"]; + + subgraph cluster_swh_web_ui { + label = "swh.web.ui"; + + "views" -> "renderers"; + "views" -> "exc"; + "views" -> "api"; + "views" -> "service"; + "views" -> "utils"; + "api" -> "renderers"; + "api" -> "exc"; + "api" -> "service"; + "api" -> "utils"; + "service" -> "query"; + "service" -> "converters"; + "service" -> "backend"; + } + + + subgraph cluster_swh_storage { + label = "swh.storage"; + + "storage"; + "backend" -> "storage"; + } +} diff --git a/docs/dependencies.png b/docs/dependencies.png new file mode 100644 index 00000000..fed31b0e Binary files /dev/null and b/docs/dependencies.png differ