TheOpenPresenter
  • Introduction
    • Welcome
    • Motivation & Challenges
    • System Architecture
    • Terminologies
    • Server Communication
    • Project Topology
  • Development
    • Quickstart
    • Static files
    • Media Storage
  • Plugins
    • Introduction
    • Official Plugins
      • Google Slides
      • Lyrics Presenter
        • Lyrics compatibility
      • Video Player
      • Audio Recorder
    • Developing a Plugin
      • Plugin API
        • Yjs
          • Awareness
          • Scene
          • Renderer
        • Backend
          • Yjs Handler
          • Loading Frontend
          • Security
        • Frontend
          • Remote
          • Renderer
        • Media
          • Server Plugin API
          • Frontend
            • Tus
            • Form Data
        • TRPC
        • Database
      • Audio
      • Viewer State
      • Notifying Errors
      • Caveats
        • Sharing dependencies
        • Cross-over between plugins
      • Performance
  • API Reference
    • Plugin Context
  • Guide
    • Playing Audio
    • Listen to scene changes
  • Scratch Pad
    • Ambition
    • Background music
  • Environment Variables
  • External
    • Page 1
Powered by GitBook
On this page
  • Next.js
  • Remote/Renderer
  1. Introduction

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.

PreviousTerminologiesNextProject Topology

Last updated 7 months ago