aboutsummaryrefslogtreecommitdiffstats
path: root/docs/architecture.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/architecture.md')
-rw-r--r--docs/architecture.md13
1 files changed, 5 insertions, 8 deletions
diff --git a/docs/architecture.md b/docs/architecture.md
index 791b57b..b76b2ff 100644
--- a/docs/architecture.md
+++ b/docs/architecture.md
@@ -78,18 +78,15 @@ Any actions of the `RendererStore` that should affect the shared state have to g
78To reduce the amount of code injected into service frames, service renderer processes contain no stores. 78To reduce the amount of code injected into service frames, service renderer processes contain no stores.
79Instead, they purely rely on IPC messages to invoke actions in the main process (but they are not notified of the result). 79Instead, they purely rely on IPC messages to invoke actions in the main process (but they are not notified of the result).
80 80
81## Controllers 81## Reactions
82 82
83In the main process, _controllers_ react to `MainStore` changes by invoking Electron APIs and subscribe to Electron events in order to invoke `MainStore` actions. 83In the main process, _reactions_ react to `MainStore` changes by invoking Electron APIs and subscribe to Electron events in order to invoke `MainStore` actions.
84 84
85For better testability, controllers may rely on _infrastructure services_ (wrappers) abstracting away the underlying Electron APIs. 85For better testability, reactions may rely on _infrastructure services_ (wrappers) abstracting away the underlying Electron APIs.
86Each infrastructure of the service has to come with a TypeScript interface and at least one implementation. 86Each infrastructure of the service has to come with a TypeScript interface and at least one implementation.
87In the tests, the default implementations of the interfaces are replaced by mocks. 87In the tests, the default implementations of the interfaces are replaced by mocks.
88 88
89The infrastructure services and controllers are instantiated and connected to the `MainStore` in the [composition root](https://gitlab.com/say-hi-to-sophie/sophie/-/blob/main/packages/main/src/init.ts). 89The infrastructure services and reactions are instantiated and connected to the `MainStore` in the [composition root](https://gitlab.com/say-hi-to-sophie/sophie/-/blob/main/packages/main/src/init.ts).
90
91**TODO:**
92While a service is a common term in MVC application architecture, we should come up with a different name to avoid clashing witch services, i.e., web sites loaded by Sophie.
93 90
94## React 91## React
95 92
@@ -101,7 +98,7 @@ We must take care not to render anything in this area, since it will be entirely
101 98
102# Packages 99# Packages
103 100
104The code of Sophie is distirbuted between different Node packages according to how they are loaded into the application. 101The code of Sophie is distributed between different Node packages according to how they are loaded into the application.
105 102
106All packages except the renderer package are tree-shaken and bundled with [esbuild](https://esbuild.github.io/) for quicker loading. 103All packages except the renderer package are tree-shaken and bundled with [esbuild](https://esbuild.github.io/) for quicker loading.
107The web application in the renderer packages is tree-shaken and bundled with [vite](https://vitejs.dev/). 104The web application in the renderer packages is tree-shaken and bundled with [vite](https://vitejs.dev/).