LunchBadger / lunchbadger-ui

Apache License 2.0
3 stars 2 forks source link

LunchBadger UI

Quick start

# Run dev server
npm start

# Package a distribution
npm run dist

# Run headless tests, setting up the test environment via Docker
npm run test

# Run headless tests, but you have to set up your own environment (i.e.
# configstore, lunchbadger, and dev server need to be running)
npm run test:nodocker

# Run tests in dev mode (will start browser on your machine)
npm run test:dev

Tests run using nightwatch.js. Any arguments passed to the npm run test command will be passed through to nightwatch. To specify a test to run, for example:

npm run test:dev -t test/specs/datasource/memory.js

Deploy on staging:

Deploy on prod

Architecture

Build on react framework, with following major libraries:

Plugins

Application business logic is divided into plugins located in the plugins directory:

You can set which plugins should be installed during bundling container to main app in cfg/info.json

Config and feature flags

Config is located in src/config for dev and dist (production). It contains:

UI elements library

Components located in plugins/lunchbadger-core/src/ui are components to serve atomic ui elements across entire app. Most of them are functional components.

Services

Core and some plugins contains api services defined in src/services. For example:

Redux

Reducers are defined in each plugin in src/reducers folder, and combined into single store by core/src/utils/storeReducers script.

Actions are defined in each plugin in src/reduxActions.

Business login components

Business login components are defined in each plugin in src/components.

Core contains engine related components, about main app lifecycle, canvas, quadrants, canvas entities, header, aside tools menu, panels.

Each quadrant-related plugin contains components about specific entity type, dedicated form two view modes: on the canvas and zoom window.

Entity models

Each quadrant-related plugin contains models defining specific entity type, inheriting from core/src/models/BaseModel. They expose common interface methods:

Plugs

Each plugin contains plugin specific settings extensions located in src/plugs folders. For example:

Read more

Core and each plugin is documented with more details: