Server Communication
As previously described in System Architecture, TheOpenPresenter consists of three main frontend applications that users interact with.
Next.js
The Next.js application communicates with the server primarily through GraphQL, which is powered by Postgraphile. This automatically generates the GraphQL schema directly from our PostgreSQL database. As a result, much of the business logic for user, project, and organization management resides within the database itself.
Remote/Renderer
While both the Remote and Renderer applications use GraphQL endpoints to fetch certain data, they employ a separate mechanism for project synchronization using Yjs.
Each plugin maintains its own state within a Yjs document. The Remote interface is used to modify this state, while the Renderer displays output based on the current state.
Reactivity
The Renderer operates on reactive programming principles - meaning its display updates automatically in response to changes in the plugin's state. If you're familiar with frameworks like React, this concept will be familiar: the UI is a direct reflection of the current state.
While this approach provides predictability and consistency, it also comes with typical reactive programming considerations. For example, implementing smooth animations and transitions requires careful planning since all changes are state-driven rather than directly manipulated.
Last updated