# 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
master
and named in convention [bugfix/feature]/[issue-number]-descriptive-task-title
Bugfix/Feature ISSUE_NUMBER
staging
branchstaging
src/index.html
and in 4 bottom lines increase rnd
parameterssrc/index.js
and increate version in console.log
linever
or version bump
commentnpm run staging
- this will build a new staging (dev) versionmaster
master
, pull itprod
branchmaster
, or separate bugfix/feature branches), into prod
src/index.html
and in 4 bottom lines increase rnd
parameterssrc/index.js
and increate version in console.log
linever
or version bump
commentnpm run deploy
- this will build a new prod version and upload files into cloudBuild on react
framework, with following major libraries:
redux
for state managementmobx
for state management of connections between entitiesjsplumb
for visualizing connections between entitiesaxios
and graphql-request
for handling api calls with backendmaterial-ui
for form input elementsformsy-react
for handling formsApplication business logic is divided into plugins located in the plugins
directory:
lunchbadger-core
- main application engine - it provides redux, plugin store and UI elements librarylunchbadger-compose
- compose plugin providing API for managing data sources, models, sls functions and microserviceslunchbadger-manage
- manage plugin which adds options to manipulate gateways, service endpoints and api endpointslunchbadger-monetize
(future) - monetize plugin provides methods to create and manage APIs with plans and Portalslunchbadger-monitor
(future) - plugin that adds monitor panel to track API usagelunchbadger-optimize
(future) - plugin that adds panel to forecast future API usageYou can set which plugins should be installed during bundling container to main app in cfg/info.json
Config is located in src/config
for dev
and dist
(production). It contains:
oauth
settings for authentication on prod with WordPress Ultimate Member pluginComponents located in plugins/lunchbadger-core/src/ui
are components to serve atomic ui elements across entire app. Most of them are functional components.
Core and some plugins contains api services defined in src/services
. For example:
core/src/services/ProjectService
- api handling projectcompose/src/services/DataSourceService
- loopback workspace api handling datasource connectorscompose/src/services/ModelService
- loopback workspace api handling modelscompose/src/services/SLSService
- api handling sls functionsReducers 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 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.
Each quadrant-related plugin contains models defining specific entity type, inheriting from core/src/models/BaseModel
. They expose common interface methods:
create
- deserializing data from backend api into modelstoJSON
- serializing models into data to be send to backend apitoApiJSON
- same as above, but in case of sending data to express-gateway admin apivalidate
- validating form data on submitupdate
- on submit edit form data, after successful validationremove
- on remove entityEach plugin contains plugin specific settings extensions located in src/plugs
folders. For example:
src/plugs/tools
- defines aside tool menu itemssrc/plugs/panelMenu
- defines header menu itemssrc/plugs/quadrants
- defines quadrantsCore and each plugin is documented with more details: