Architecture
Overview
The Platform framework provides a framework-agnostic component registry, an event bus for the components to communicate, an API client to access Platform back-end APIs, and a UI component library.
The framework has been built with the following 3 layers in mind:
| Layer | Examples | Description |
|---|---|---|
| Host Application | Phoenix, Vax, Platform Admin Console | Provides application functionality such as authentication, routing, and toast messages to Platform |
| Platform Components | Data Table, Global Navigation, Bulk Action Buttons | Configurable building blocks that can be combined to build new application pages |
| UI Components | Button, Dropdown, Navigation | A reusable UI component library that can be used by Platform Component developers to ensure consistent UI experiences |
Using Horizon Framework
API & Data
- API Client - ApiClientV1 wrapper around the GRPC client for Platform APIs
- GraphQL - GraphQL client for accessing Skedulo's GraphQL API
Components and Templates
- Component Registry - Platform Components bundled into packages
- Event Bus - Communication system between Platform Components
- Templates - Template system for rendering dynamic UI components
User Experience
- Navigation - Navigation system for Platform applications
- User Permissions - User permission system for access control
- Preferences - User preference management system
- Feature Flags - Feature flag system for controlling feature availability
- Error Handling - Error handling strategies and best practices
- Error Usage - How to use error handling components and utilities
Object names
Admins can rename standard objects for their tenant, for example Jobs to "Visit" and "Visits". Horizon Core keeps these labels in one module store, so React code, plain functions and templates all read the same values instead of a hard-coded English word.
- Source -
HorizonRootProviderpostsquery { objects { name label labelPlural } }to the Data Model API (dataaccess/graphql/datamodel) and reads the Skedulo overrides fromGET custom/standard_schemas, in the same refresh. It stores both in memory. - Refresh - labels load once per page. Window focus and the tab becoming
visible refresh them at most once every 60 seconds, and
refreshObjectNames()refreshes them on demand. - Tenants - labels load for Salesforce tenants as well as Skedulo tenants. Until the first request succeeds, readers get the English defaults. A failed refresh keeps the last good labels.
- Renamed - one rule decides it for every standard object. Each form is
tested against its own default, and only a real Skedulo override counts, one
form at a time. With no override every text is unchanged. A Salesforce vendor
label never counts.
readObjectLabelState,readObjectLabel,useObjectLabeland_.host.objectLabelread the resulting state.
See Object Names for the hook,
the plain functions, templates and test helpers. Mortar and Breeze code in
breeze-ui should use the object-label helpers in @skedulo/breeze-blocks, which
build on this store.