Last updated
03.07.2025 at 17:42

Data Flow

How data moves through the Lázně Pramen system

Client-Side Data Flow

The client-side application uses Redux for predictable state management. The flow is as follows:

  1. 1User interacts with a UI component.
  2. 2An action is dispatched to the Redux store.
  3. 3A reducer updates the state based on the action.
  4. 4The UI re-renders with the new state.

API Data Processing

The backend API processes data through a series of middleware and controllers:

  1. 1An incoming request is validated and authenticated.
  2. 2The controller processes the request and interacts with the database.
  3. 3A response is sent back to the client.

Real-time Updates

Real-time updates are handled via WebSocket and Supabase real-time subscriptions:

  • SubscribeThe client subscribes to relevant data channels.
  • PushThe server pushes updates to clients when data changes.
  • UIThe client-side UI updates in real-time without needing to poll for changes.