ObjectStackObjectStack

App Metadata

Define application containers with navigation, branding, and access control

App Metadata

An App is a logical container that bundles objects, views, pages, and dashboards into a cohesive application experience. It defines the navigation structure, branding, and access permissions.

Basic Structure

const crmApp = {
  name: 'crm',
  label: 'CRM',
  version: '1.0.0',
  description: 'Customer Relationship Management',
  icon: 'briefcase',
  active: true,

  branding: {
    primaryColor: '#1a73e8',
    logo: '/assets/crm-logo.svg',
    favicon: '/assets/favicon.ico',
  },

  navigation: [
    { type: 'object', label: 'Accounts', objectName: 'account', icon: 'building' },
    { type: 'object', label: 'Contacts', objectName: 'contact', icon: 'users' },
    { type: 'object', label: 'Opportunities', objectName: 'opportunity', icon: 'trending-up' },
    { type: 'dashboard', label: 'Sales Dashboard', dashboardName: 'sales_overview', icon: 'bar-chart' },
  ],

  requiredPermissions: ['crm_access'],
};

App Properties

PropertyTypeRequiredDescription
namestringMachine name (snake_case)
labelstringDisplay name
versionstringoptionalApp version
descriptionstringoptionalApp description
iconstringoptionalApp icon (Lucide/Material)
activebooleanoptionalIs app active (default: true)
isDefaultbooleanoptionalIs default app
navigationNavigationItem[]Navigation tree
brandingAppBrandingoptionalVisual customization
requiredPermissionsstring[]optionalRequired permissions to access
homePageIdstringoptionalCustom home page ID
objectsstring[]optionalObjects included in this app
apisstring[]optionalAPI endpoints included
mobileNavigationobjectoptionalMobile-specific navigation

The navigation tree supports five item types, combined to create rich menu structures:

Object Navigation

Links to an object's list view:

{ type: 'object', label: 'Accounts', objectName: 'account', icon: 'building', viewName: 'all_accounts' }

Dashboard Navigation

Links to a dashboard:

{ type: 'dashboard', label: 'Analytics', dashboardName: 'sales_overview', icon: 'bar-chart' }

Links to a custom page:

{ type: 'page', label: 'Settings', pageName: 'app_settings', icon: 'settings', params: { tab: 'general' } }

URL Navigation

Links to an external URL:

{ type: 'url', label: 'Help Center', url: 'https://help.example.com', icon: 'help-circle', target: '_blank' }

Group Navigation

Groups items into collapsible sections with children:

{
  type: 'group',
  label: 'Sales',
  icon: 'dollar-sign',
  expanded: true,
  children: [
    { type: 'object', label: 'Accounts', objectName: 'account', icon: 'building' },
    { type: 'object', label: 'Contacts', objectName: 'contact', icon: 'users' },
    { type: 'object', label: 'Opportunities', objectName: 'opportunity', icon: 'trending-up' },
  ],
}

Common Navigation Properties

All navigation items share these base properties:

PropertyTypeDescription
idstringUnique identifier
labelstringDisplay label
iconstringIcon name
visibleboolean | stringVisibility (boolean or expression)

Branding

Customize the visual appearance of the app:

branding: {
  primaryColor: '#1a73e8',    // Hex color code
  logo: '/assets/logo.svg',   // Logo URL
  favicon: '/assets/icon.ico', // Favicon URL
}
PropertyTypeDescription
primaryColorstringPrimary brand color (hex)
logostringLogo image URL
faviconstringFavicon URL

Mobile Navigation

Configure mobile-specific navigation behavior:

mobileNavigation: {
  mode: 'bottom',
  bottomNavItems: ['home', 'accounts', 'contacts', 'settings'],
}

Complete Example

const projectApp = {
  name: 'project_management',
  label: 'Project Management',
  version: '2.0.0',
  description: 'Track projects, tasks, and team workload',
  icon: 'folder-kanban',
  active: true,

  branding: {
    primaryColor: '#6366f1',
    logo: '/assets/pm-logo.svg',
  },

  navigation: [
    {
      type: 'page',
      label: 'Home',
      pageName: 'pm_home',
      icon: 'home',
    },
    {
      type: 'group',
      label: 'Projects',
      icon: 'folder',
      expanded: true,
      children: [
        { type: 'object', label: 'Projects', objectName: 'project', icon: 'folder' },
        { type: 'object', label: 'Tasks', objectName: 'project_task', icon: 'check-square', viewName: 'task_board' },
        { type: 'object', label: 'Milestones', objectName: 'milestone', icon: 'flag' },
      ],
    },
    {
      type: 'group',
      label: 'Reports',
      icon: 'bar-chart',
      children: [
        { type: 'dashboard', label: 'Overview', dashboardName: 'project_overview', icon: 'layout-dashboard' },
        { type: 'dashboard', label: 'Team Workload', dashboardName: 'team_workload', icon: 'users' },
      ],
    },
    {
      type: 'url',
      label: 'Documentation',
      url: 'https://docs.example.com/pm',
      icon: 'book-open',
      target: '_blank',
    },
  ],

  requiredPermissions: ['pm_access'],
  homePageId: 'pm_home',
};

On this page