The core model consists of interfaces used by the application and the Preact components.
To access the backend, we define functions that accept and return interfaces from the core model. The functions themselves use an openapi-client that is auto-generated from the openapi-spec of the backend, for example viaopenapi-client-axios or oazapfts.
The websocket connection is used for user notifications. It writes data to the recoil store from there it is distributed to the components that display them.
For global parts of the application states (such as "user info" and "notifications"), we use a Recoil store (recoil).
Page state and component state is kept within the components.
We use atomic design for structuring components.