# mozaik

> Mozaik dashboard composition tool

Latest version **1.4.4** (published 2016-04-14) · 0 weekly downloads

## Install

```sh
npm install mozaik
pnpm add mozaik
yarn add mozaik
bun add mozaik
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.4 |
| Published | 2016-04-14 |
| First published | 2015-02-16 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | 0.12.x |
| Dependencies | 31 |
| Known vulnerabilities | 0 (+17 in 6 direct dependencies) |
| Install scripts | no |
| GitHub stars | 3594 |
| Author | Raphaël Benitte |
| Maintainers | plouc |
| Keywords | mozaik, realtime, websockets, components, widget, extension, dashboard, framework, dataviz, d3, react |

## Links

- npm: https://www.npmjs.com/package/mozaik
- Repository: https://github.com/plouc/mozaik
- Issues: https://github.com/plouc/mozaik/issues
- npm.io page: https://npm.io/package/mozaik

## Dependencies (31)

- [d3](https://npm.io/package/d3.md) 3.5.16
- [ws](https://npm.io/package/ws.md) 1.1.0
- [del](https://npm.io/package/del.md) 2.2.0
- [glob](https://npm.io/package/glob.md) 7.0.3
- [gulp](https://npm.io/package/gulp.md) 3.9.1
- [swig](https://npm.io/package/swig.md) 1.4.2
- [chalk](https://npm.io/package/chalk.md) 1.1.3
- [dotenv](https://npm.io/package/dotenv.md) 2.0.0
- [lodash](https://npm.io/package/lodash.md) 4.10.0
- [reflux](https://npm.io/package/reflux.md) 0.4.1
- [express](https://npm.io/package/express.md) 4.13.4
- [request](https://npm.io/package/request.md) 2.71.0
- [winston](https://npm.io/package/winston.md) 2.2.0
- [bluebird](https://npm.io/package/bluebird.md) 3.3.5
- [watchify](https://npm.io/package/watchify.md) 3.7.0
- [gulp-util](https://npm.io/package/gulp-util.md) 3.0.7
- [browserify](https://npm.io/package/browserify.md) 13.0.0
- [classnames](https://npm.io/package/classnames.md) 2.2.3
- [superagent](https://npm.io/package/superagent.md) 1.8.3
- [gulp-rename](https://npm.io/package/gulp-rename.md) 1.2.2
- [gulp-stylus](https://npm.io/package/gulp-stylus.md) 2.3.1
- [gulp-uglify](https://npm.io/package/gulp-uglify.md) 1.5.3
- [react-mixin](https://npm.io/package/react-mixin.md) 3.0.4
- [font-awesome](https://npm.io/package/font-awesome.md) 4.5.0
- [gulp-flatten](https://npm.io/package/gulp-flatten.md) 0.2.0
- [memory-cache](https://npm.io/package/memory-cache.md) 0.1.5
- [vinyl-buffer](https://npm.io/package/vinyl-buffer.md) 1.0.0
- [gulp-strip-debug](https://npm.io/package/gulp-strip-debug.md) 1.1.0
- [vinyl-source-stream](https://npm.io/package/vinyl-source-stream.md) 1.1.0
- [browserify-resolutions](https://npm.io/package/browserify-resolutions.md) 1.0.6
- [superagent-bluebird-promise](https://npm.io/package/superagent-bluebird-promise.md) 3.0.0

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.4.4 (latest) — 2016-04-14
- 2.0.0-alpha.13 (alpha) — 2016-12-23
- 2.0.0-alpha.12 — 2016-12-23
- 2.0.0-alpha.11 — 2016-12-23
- 2.0.0-alpha.10 — 2016-10-06
- 2.0.0-alpha.9 — 2016-10-06
- 2.0.0-alpha.8 — 2016-10-06
- 2.0.0-alpha.7 — 2016-09-26
- 2.0.0-alpha.6 — 2016-09-26
- 2.0.0-alpha.5 — 2016-09-26
- 2.0.0-alpha.4 — 2016-08-25
- 2.0.0-alpha.3 — 2016-08-25
- 2.0.0-alpha.2 — 2016-08-25
- 2.0.0-alpha.1 — 2016-08-25
- 1.4.3 — 2016-04-13
- … 44 more at https://npm.io/package/mozaik/versions

## README

![MOZAÏK][logo]

[![License][license-image]][license-url]
[![Travis CI][travis-image]][travis-url]
[![NPM version][npm-image]][npm-url]
[![Quality][codeclimate-image]][codeclimate-url]
[![Dependencies][gemnasium-image]][gemnasium-url]

Mozaïk is a tool based on nodejs / react / reflux / d3 / stylus to easily craft beautiful dashboards. [See demo](http://mozaik.herokuapp.com/)

![preview](https://raw.githubusercontent.com/juhamust/mozaik/readme/preview.png)

**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](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/plouc/mozaik?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

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][generator-mozaik-url] available to start with new dashboard or widget:

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

Visit the [Wiki](https://github.com/plouc/mozaik/wiki) for further information/doc.

## Widgets

Widgets are maintained as separate modules, thus available via [mozaik-ext-name in npm.js](https://www.npmjs.com/search?q=mozaik). To install an extension:

- Install modules from [npmjs][npmjs-url]:

  ```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](https://github.com/plouc/mozaik/wiki/theming). Set theme name in `config.js`:

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

[license-image]: https://img.shields.io/github/license/plouc/mozaik.svg?style=flat-square
[license-url]: https://github.com/plouc/mozaik/blob/master/LICENSE.md
[logo]: https://raw.githubusercontent.com/wiki/plouc/mozaik/assets/mozaik-logo-v2.png
[widget-count-image]: https://img.shields.io/badge/widgets-x21-green.svg?style=flat-square
[npm-image]: https://img.shields.io/npm/v/mozaik.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/mozaik
[widget-count-url]: https://github.com/plouc/mozaik/tree/master/src/ext
[travis-image]: https://img.shields.io/travis/plouc/mozaik.svg?style=flat-square
[travis-url]: https://travis-ci.org/plouc/mozaik
[codeclimate-image]: https://img.shields.io/codeclimate/github/plouc/mozaik.svg?style=flat-square
[codeclimate-url]: https://codeclimate.com/github/plouc/mozaik
[gemnasium-image]: https://img.shields.io/gemnasium/plouc/mozaik.svg?style=flat-square
[gemnasium-url]: https://gemnasium.com/plouc/mozaik
[npmjs-url]: https://www.npmjs.com
[generator-mozaik-url]: https://www.npmjs.com/package/generator-mozaik

---
_Source: https://npm.io/package/mozaik · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
