Level: 🟢 Beginner
Protocols: Data, UI (Dashboards)
Status: Stub — Placeholder for BI plugin implementation
This example demonstrates how to structure an ObjectStack plugin that provides analytics objects and dashboard widgets. It shows the plugin manifest pattern using defineStack() with type: 'plugin'.
- Plugin manifest structure (
type: 'plugin',namespace,id) - How plugins extend an application with additional objects
- Dashboard widget definitions for analytics
plugin-bi/
├── objectstack.config.ts # Plugin manifest (defineStack)
├── package.json # Package definition
├── tsconfig.json # TypeScript config (inherits from root)
└── README.md # This file
# From monorepo root
corepack enable && pnpm install
# Type-check the plugin
cd examples/plugin-bi
pnpm typecheck
# Expected: No errors — plugin manifest validates against @objectstack/spec
# Build the plugin
pnpm --filter @example/plugin-bi build
# Expected: Build succeeds, generates dist/ outputThe objectstack.config.ts file defines the plugin:
import { defineStack } from '@objectstack/spec';
export default defineStack({
manifest: {
id: 'com.example.bi',
namespace: 'bi',
version: '1.0.0',
type: 'plugin',
name: 'BI Plugin',
description: 'Business Intelligence dashboards and analytics',
},
objects: [], // Add analytics objects here
dashboards: [], // Add dashboard widgets here
});To build a full BI plugin, add:
- Analytics objects (e.g.,
metric,kpi,data_source) to theobjectsarray - Dashboard widgets (charts, KPI cards, tables) to the
dashboardsarray - Reports for tabular/summary/matrix analytics
See the App CRM example for comprehensive dashboard and report patterns.
- App Todo — Dashboard widgets and reports (beginner)
- App CRM — Enterprise dashboards with 10+ widgets (intermediate)
- App Host — Plugin orchestration and loading (advanced)
License: Apache-2.0