Hub
This section covers both the Hub backend (io-oidis-hub) and the Hub frontend (io-oidis-hub-gui). The backend provides the authentication system, data layer, agent tunneling, webhooks, email engine, and GraphQL API. The frontend provides the admin dashboard, user portal, and SSO interface.
Hub Backend (io-oidis-hub)
| Page | Purpose |
|---|---|
| Backend Overview | Loader, initialization lifecycle, extension points |
| HTTP Server & Resolvers | Security filtering, 16 HTTP resolvers |
| Database Models | 17 MongoDB models, converters, DB upgrades |
| GraphQL API | Dynamic schema generation, auth-aware execution |
| Email System | Template-based async email queue |
| Webhooks | Adapter-based processing, hub-to-hub sync |
| External Connectors | Slack, MS Teams, certificates, file transfer |
| Logging & Monitoring | Audit logs, crash reporting, state tracking |
| Hub Utilities | EnvironmentHelper, Threads, Puppeteer, notifications |
| Configuration Reference | Full IProject config reference |
| Legal Documents | Resolver, JSONP defaults, print/PDF dialog for terms/privacy/conditions/cookies |
io-oidis-hub-gui
Frontend application for the Oidis synchronization hub. Provides the admin dashboard, user portal, SSO authentication, and system monitoring interface.
Package Purpose
io-oidis-hub-gui is the web frontend that runs on top of the hub backend (io-oidis-hub). It provides:
- Admin Dashboard — Role-based dashboard with dynamic tools menu for user, organization, and system management
- User Portal — Main page with profile editing, feedback, and FAQ
- SSO Authentication — Sign-in, sign-up, password reset, OAuth, 2FA challenge and registration
- User & Organization Management — CRUD operations for users, groups, organizations, and permissions
- System Monitoring — Agent status, event loop visualization, system logs, server state notifications
- Configuration Registry — Browse and manage configuration files and app settings
- Webhooks & Notifications — Webhook management and push notification system
- Reports & Logging — Usage reports, system logs, and audit trails
- Print Pipeline — Print-optimized views via Puppeteer integration
Dependency Position
io-oidis-commons ← io-oidis-services ← io-oidis-gui ← io-oidis-usercontrols ← io-oidis-hub-gui
io-oidis-services ←──────────────────────────────────────────↑
Hub GUI depends on services and usercontrols (which transitively includes gui and commons). It is the topmost GUI layer — solution GUI projects (e.g. io-oidis-{solution}-gui) extend it.
Source Structure
source/typescript/Io/Oidis/Hub/Gui/
├── Bindings/ — UI interaction handlers (Header, SSO, OAuth, ServerState, FileUpload, etc.)
├── Connectors/ — API connectors to hub backend services (AuthManager, Registry, Reports, etc.)
├── Controllers/
│ ├── Pages/ — Page controllers with @Resolver route decorators
│ └── Panels/ — Panel controllers for dashboard tools and user panels
├── DAO/ — Data validators (Email, Phone, Password, Range, Regex, Enum)
├── Dialogs/ — Modal dialogs (BackdoorLogin, Notifications, ReleaseNotes, Scanner)
├── Enums/ — MenuItemScope, PushNotificationType, StatusIndicator
├── HttpProcessor/ — Error and NotAuthorized resolvers
├── Interfaces/ — IProject configuration with auth providers and header strip
├── LogProcessor/ — InMemory and Forwarding log adapters
├── Models/ — Data models (User, Group, Organization, Agent, AppSettings, etc.)
├── Pages/ — Page views (MainPage, DashboardPage, SSOPage, InitPage, AdminInitPage)
├── Panels/ — Panel views for dashboard and main page sections
├── Primitives/ — Base classes (BasePageLayout, MenuPageLayout, StickyHeaderLayout, etc.)
├── RuntimeTests/ — Browser-based runtime test utilities
├── Structures/ — UserContext — authentication and authorization state
├── UserControls/ — Custom UI components (tables, menu items, breadcrumbs, skeleton loader)
├── Utils/ — BarCodeEngine, CanvasHelper, Convert
├── Viewers/ — View rendering logic
├── ViewersArgs/ — Viewer argument definitions
├── Loader.ts — Singleton entry point
└── ForceCompile.ts — Decorator registration trigger
Entry Point
The Loader class extends io-oidis-services Loader. It initializes log adapters (InMemoryAdapter, ForwardingAdapter), the UserContext, and the HttpResolver with / as the base path.
import { Loader } from "@io-oidis-hub-gui/Io/Oidis/Hub/Gui/Loader.js";
Loader.Load(appConfig);
const loader : Loader = Loader.getInstance();
const context : UserContext = loader.getContext();
await context.Load();
Key Loader API:
| Method | Returns | Purpose |
|---|---|---|
getInstance() | Loader | Singleton accessor |
getAppConfiguration() | IProject | Project configuration with auth providers and header strip |
getContext() | UserContext | Authentication and authorization state |
ApplicationLog() | ILoggerTrace[] | In-memory application logs |
setLogsContext($value) | void | Set user ID context for log forwarding and Sentry |
Configuration
Application configuration extends the commons IProject interface with:
authProviders— OAuth provider settings (e.g. Google sign-in)target.headerStrip— Environment-specific header banner (prod, dev, eap, localhost) with title and message
See Application Settings for the full configuration reference.
Exported API
Primitives
| Class | Location | Purpose |
|---|---|---|
Loader | Loader.ts | Singleton entry point — initializes subsystems |
BasePageLayout | Primitives/BasePageLayout.ts | Abstract page with tabs, dialogs, toasts, skeleton loader |
BasePageLayoutController | Primitives/BasePageLayoutController.ts | Access validation, tab lifecycle, push notifications |
StickyHeaderLayout | Primitives/StickyHeaderLayout.ts | User-facing page layout with sticky header and footer |
StickyHeaderLayoutController | Primitives/StickyHeaderLayoutController.ts | Controller for main page layout |
MenuPageLayout | Primitives/MenuPageLayout.ts | Admin dashboard layout with sidebar menu |
MenuPageLayoutController | Primitives/MenuPageLayoutController.ts | Menu binding, dynamic tab registration by role |
BasePanelController | Primitives/BasePanelController.ts | Base controller for individual panels |
BaseSubpanelController | Primitives/BaseSubpanelController.ts | Base controller for nested subpanels |
PrintPage | Primitives/PrintPage.ts | Print-optimized page layout |
Pages
| Class | Location | Purpose |
|---|---|---|
MainPage | Pages/MainPage.ts | User-facing hub page (profile, feedback, FAQ) |
DashboardPage | Pages/DashboardPage.ts | Admin dashboard with tool tabs |
SSOPage | Pages/SSOPage.ts | Authentication page (sign-in, sign-up, 2FA) |
InitPage | Pages/InitPage.ts | System initialization / loading page |
AdminInitPage | Pages/AdminInitPage.ts | First-time admin account setup |
Structures
| Class | Location | Purpose |
|---|---|---|
UserContext | Structures/UserContext.ts | Auth state: IsAuthenticated, IsAdmin, IsSysAdmin, Need2FACheck |
Models
| Class | Purpose |
|---|---|
User | User profile with groups, tokens, 2FA, audit log |
Group | Role group (Admin, SysAdmin, custom) |
Organization | Organization profile with ownership |
Agent | Sync agent status and configuration |
AppSettings | Global application settings |
AuthCode | OAuth authorization codes |
AuthToken | Session and API tokens |
SSOTokens | External SSO provider tokens |
ConfigFile | Registry configuration files |
LogEntry | System log records |
NotificationEntry | Push notification records |
Sendmail | Email/sendmail configuration |
Print | Print job metadata |
FileEntry | File metadata for uploads |
WhatsNewDao | Release notes data |
PackageInfo | Version and package info |
SelfupdatePackage | Self-update package metadata |
UserAuditLog | Login history and activity tracking |
Sub-pages
| Page | Purpose |
|---|---|
| Pages and Routing | Page hierarchy, @Resolver routes, tab system, layouts |
| Dashboard and Tools Menu | Admin dashboard, menu scopes, built-in panels |
| SSO and Authentication | SSO flow, 2FA, OAuth, role-based access |
| Connectors and API | API connectors to hub backend services |
| Extending Hub GUI | Adding panels, models, and menu items in solution projects |
See also: Architecture Overview | GUI Panels and Controllers | Connectors Reference | Separate GUI Repository