MCPcopy
hub / github.com/plouc/mozaik

github.com/plouc/mozaik @v1.4.4 sqlite

repository ↗ · DeepWiki ↗ · release v1.4.4 ↗
162 symbols 306 edges 58 files 4 documented · 2%
README

MOZAÏK

License Travis CI NPM version Quality Dependencies

Mozaïk is a tool based on nodejs / react / reflux / d3 / stylus to easily craft beautiful dashboards. See demo

preview

Features:

  • Scalable layout
  • Themes support
  • Extendable by modules
  • Grid positioning
  • Optimized backend communication
  • Rotation support (with smooth transition)

Getting started

Join the chat at https://gitter.im/plouc/mozaik

Easy way to get started is using the demo dashboard. Look at the instructions on the dedicated repository https://github.com/plouc/mozaik-demo.

Alternatively, use provided Yeoman generator available to start with new dashboard or widget:

npm install -g yo gulp generator-mozaik
yo mozaik
npm install
gulp build
node app.js

Visit the Wiki for further information/doc.

Widgets

Widgets are maintained as separate modules, thus available via mozaik-ext-name in npm.js. To install an extension:

  • Install modules from npmjs:

shell npm install --save mozaik-ext-example

  • Register widgets by adding to dashboard src/App.jsx:

```javascript import mozaikExampleComponents from 'mozaik-ext-example';

Mozaik.Registry.addExtension('example', mozaikExampleComponents); ```

Configure size, widget placement and params in config.js:

```javascript

module.exports = { // ... dashboards: [ // Dashboard 1 { columns: 2, rows: 2, // Dashboard grid layout widgets: [ { type: 'example.widget_name', // WidgetName -> widget_name param1: 'value1', // See widget documentation columns: 1, rows: 1, // Size x: 0, y: 0 // Position } ] } ] } ```

  • If widget needs to communicate with backend (see widget documentation), register its client api by adding to dashboard app.js:

javascript mozaik.bus.registerApi('example', require('mozaik-ext-example/client') );

If client api requires configuration, it is provided in dashboard's config.js:

```javascript

module.exports = { env: process.env.NODE_ENV || 'production', host: 'localhost', port: process.env.PORT || 5000,

// Server-side client configuration.
// By convention, the name follow the module
api: {
  example: {
    foo: 'bar'
  },
}

// ...

} ```

  • (Re)build the dashboard:

shell gulp build

Themes

Mozaïk dashboard comes with 5 themes and makes it easy to develop your own theme. Set theme name in config.js:

// Options: bordeau, night-blue, light-grey, light-yellow, yellow
theme: 'night-blue'

Core symbols most depended-on inside this repo

expectTriggers
called by 24
test/helpers/storeHelper.js
data
called by 7
src/browser/components/charts/BarChart.js
getFakeTimerCount
called by 6
test/helpers/timersHelper.js
degreesToRadians
called by 5
src/browser/components/charts/Pie.js
size
called by 4
src/browser/components/charts/Pie.js
dataKey
called by 4
src/browser/components/charts/Pie.js
getBundler
called by 3
gulp/tasks/js.js
draw
called by 3
src/browser/components/charts/Pie.js

Shape

Function 64
Method 60
Class 38

Languages

TypeScript100%

Modules by API surface

src/browser/components/charts/Pie.js12 symbols
src/Bus.js11 symbols
src/browser/stores/ConnectionStatusStore.js9 symbols
src/browser/stores/ApiStore.js8 symbols
src/browser/stores/DashboardStore.js7 symbols
src/browser/components/charts/BarChart.js7 symbols
src/browser/components/Inspector.jsx7 symbols
src/browser/components/charts/Treemap.jsx6 symbols
src/browser/components/Timer.jsx6 symbols
src/browser/components/Notifications.jsx6 symbols
src/browser/components/Mozaik.jsx6 symbols
src/browser/components/Dashboard.jsx6 symbols

Dependencies from manifests, versioned

babel-eslint6.0.2 · 1×
babel-preset-es20156.6.0 · 1×
babel-preset-react6.5.0 · 1×
babel-register6.7.2 · 1×
babelify7.2.0 · 1×
bluebird3.3.5 · 1×
browserify13.0.0 · 1×
browserify-resolutions1.0.6 · 1×
chalk1.1.3 · 1×
classnames2.2.3 · 1×
d33.5.16 · 1×
del2.2.0 · 1×

For agents

$ claude mcp add mozaik \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact