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:
- 1User interacts with a UI component.
- 2An action is dispatched to the Redux store.
- 3A reducer updates the state based on the action.
- 4The UI re-renders with the new state.
API Data Processing
The backend API processes data through a series of middleware and controllers:
- 1An incoming request is validated and authenticated.
- 2The controller processes the request and interacts with the database.
- 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.