BlueBase
  • 💧Introduction
  • Tutorial
    • 1. Getting Started
      • 1.1 Setup
      • 1.2 Add Plugins
      • 1.3 Create Custom Plugin
    • 2. Backend API
      • 2.1 Create Backend API
      • 2.2 Setup Apollo Client
      • 2.3 Generate Typescript Interfaces
    • 3. Create Screens
      • 3.1 Pending Tasks Screen
      • 3.2 Edit Task Screen
      • 3.3 Task Create Screen
      • 3.4 Tab Navigation
    • 4. CRUD Operations
      • 4.1 Creating Tasks
      • 4.2 Reading Tasks
      • 4.3 Updating Tasks
      • 4.4 Deleting Tasks
    • 5. Enhancements
      • 5.1 Internationalisation
      • 5.2 Theming
      • 5.3 Dynamic Images
      • 5.4 Settings & Configurations
      • User Management
  • Key Concepts
    • 🎡Lifecycle Events
    • â›Šī¸Main App Layout
    • 🔌Plugins
      • Plugin API
      • Register a Plugin
      • Making a Plugin Configurable
      • Developing an Analytics Plugin
      • Developing a Logger Plugin
      • Developing a Theme Plugin
    • 🚇Filters
    • 🎁Components
      • Components API
      • Registering a Component
      • Accessing Components
      • Higher Order Components
    • 🎨Themes
      • Consuming Selected Theme
      • Customise Themes
      • Customise Components
      • Theme Configs
      • Theme Structure
    • đŸŽ›ī¸Configs
  • API
    • 📈Analytics
    • 📔Logger
    • đŸ“ĻBlueBase Modules
    • Registry
  • Guides
    • âœ‚ī¸Code Splitting
    • đŸ‘ŊMigrating to V8
  • Components
    • ActivityIndicator
    • BlueBase
      • BlueBaseApp 📌
      • BlueBaseConsumer 📌
      • BlueBaseFilter 📌
      • ThemeConsumer 📌
    • Button
    • ComponentState 📌
    • EmptyState 📌
    • ErrorState 📌
    • Icons
      • Icon
      • DynamicIcon 📌
      • PluginIcon 📌
    • JsonSchema 📌
    • LoadingState 📌
    • Noop 📌
    • Observers
      • DataObserver 📌
      • ErrorObserver 📌
      • HoverObserver 📌
      • WaitObserver 📌
    • StatefulComponent 📌
    • Typography
    • View
Powered by GitBook
On this page
  • Plugin Categories
  • Example

Was this helpful?

Export as PDF
  1. Key Concepts
  2. Plugins

Plugin API

A plugin is just a JavaScript object that has the following properties:

Key

Type

Required

Description

name

string

yes

Name of the plugin.

key

string

no

This property is used as an ID throughout the system.

description

string

no

Plugin description.

version

string

no

Plugin version.

categories

string[]

no

icon

DynamicIconProps

no

These are props of the DynamicIcon component. This value can also be a thunk, i.e. a function that should return the props object. This function receives BlueBase context as param.

enabled

boolean

no

(Default = true) Flag to check if a plugin is enabled.

filters

FilterNestedCollection

no

components

ComponentCollection

no

themes

ThemeCollection

no

defaultConfigs

ConfigCollection

no

Plugin Categories

Categories are used in plugin listing pages. Currently, we recognise the following kind of plugins, but a developer may define his own category as well.

Key

Description

app

A plugin that is a sub-app in the system. This applies that when BlueBase is used as a bigger platform, and different features are represented as individuals apps inside the platform.

store

A plugin that provides a state store functionality. i.e. Redux.

router

A plugin that provides routing mechanism. i.e. react-router or React Navigation.

logging

A plugin that provides integration with a logging service. i.e. Sentry.

theme

A plugin that provides a single or multiple themes.

analytics

A plugin that provides integration with a logging service. i.e. Google Analytics.

Example

import { createPlugin } from '@bluebase/core';

export const ExamplePlugin = createPlugin({

    key: 'example',
    name: 'Example Plugin',
    description: 'This is just an example plugin.',
    version: '1.0.0',
    categories: ['theme', 'app'],

    icon: () => ({
        type: 'icon',
        name: 'rocket',
    }),

    defaultConfigs: {
        'plugin.example.foo': 'bar'
    },

    // ... any components come here
    components: [{
        key: 'Logo',
        value: import('./Logo')
    }],

    // ... add other configs, i.e. themes, filters, etc
});
PreviousPluginsNextRegister a Plugin

Last updated 6 years ago

Was this helpful?

.

🔌
Plugin Categories