Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (lowcode-data-app) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Prototype of a "Low Code Data App".
General Idea
It starts with a generic, secure web gui.
Entities can be defined on-the-fly, as well as their relationship. Web forms and lists are generated to maintain data (documents) of this entities.
A powerful State Model can optionally be attached to entities (see "Task List" example). You define actions for state changes, e.g. "Start Progress". Selected data fields are displayed in the state change form.
All data, users and authorizations are within hierarchical scopes (like tenants). Entity definitions and data can be inherited to lower hierarchy scopes. A web gui user can switch the scope in the gui.
Entities are bundled in apps, so they can be exported and imported via a app marketplace. Apps are installed and can be customized within a scope. Tags can also be used to assign apps to a scope.
To start process adapters can subscribe to events, e.g. data changes. Adapters use service credentials defined on a dedicated scope.
All operations are exposed as API, e.g. for the adapters.
Run it
git clone https://github.com/ma-ha/lowcode-data-app.git
cd lowcode-data-app/app
npm i
node example-standalone | node_modules/bunyan/bin/bunyan
Open http://localhost:8888/app/index.html
Login with user demo
and password demo
.
A sample "database" is initialized already, so you should see already some apps, entities and data.
Sample code
Standalone mode using it as npm package: https://www.npmjs.com/package/lowcode-data-app
let lowCodeApp = require( 'lowcode-data-app' )
lowCodeApp.init({
DATA_DIR : '../dta/',
GUI_URL : 'http://localhost:8888/app/',
URL_PATH : '/app',
OIDC_SERVER : true
})
Getting Started With Empty DB
Create User
- Login as "demo" / "demo"
- Open "Users" tab
- Add a new user with developer and admin role enabled
- Logout and Login with new user
- In Open "Users" tab, click the "deactivate" button for the "demo" user
Add a new App
- Open "Customize" tab
- In the "Add App" form enter an Id (e.g. "MyAwesomeApp), a name (e.g. "Mz Awesome App"), Scope (e.g. "Test Tenant", if all is still default), role "AppUser" and click "Add"
Add Entities to the new App
- In the newly created app click "Manage Entities"
- In the "Add / Update Entity" form define an ID (e.g. "Customer") and a title (Optional, but can contain spaces and special characters) and push the "Add" button.
- Click "Manage Properties"
- Add some property fields, e.g. id="name", Label="Name", Type="String", Filter=checked
Test the App
Open your new app in the "App" tab (the app is only visible in the defined scope)
Entity / Document Model
Data types (and their Web GUI mapping)
Strings
(simple input fields)Text
(multi line input fields)Number
(simple input fields)Boolean
(checkboxes)Date
(date picker)Select
with an option array (pull down of values)DocMap
master-detail reference (link to filtered docs)SelectRef
to other entity (pull down of ids)MultiSelectRef
to other entity (pull down of ids)UUID
auto generated, if field name isid
this will be the collection idMetrics
link to a metrics (time series data) for this entity idJSON
(Multi Line Edit)Link
(simple input fields, will take placeholders)Event
(link to send an event. Ref can have a simple condition to render the link, e.g. "status == ready" or "status != in progress,done")
So relations are
- 1:n =
DocMap
- n:1 =
SelectRef
- n:m =
MultiSelectRef
Entities can be attached to a "State Model".
Property features:
- you can select a property for the data table filter
- you can define a property as "API managed", means zou will see it only in the table, but there is no input available in the add/change GUI form
Integration
APIs
Adapters and connectors can use ReST APIs, see API and Format Reference Docu.
Event Hub
Adapters can subscribe to data events, to start processes or sync the data with external systems.
See example code.
GUI Links
Entities can refer to external GUI Apps using links. Placeholders in the links are populated with the entity data.
Customizing
The GUI framework is "easy-web-app" and the underlying api server is "express".
State Model
State models can be added or customized to your needs.
The start stateId is null
. Currently only the first action is used for null
.
Persistence
The persistence uses simple files and a memory cache. This is not recommended for production use.
It should be simple to replace the persistence with a document DB. Simply rewrite:
OpenID Connect
The implementation brings it's own OIDC auth server.
Have a look into the config files to configure a real OIDC IAM.
The invitation process may need some additional OIDC onboarding flow, if th users aren't already there.
Web Content
Some static doc files, GTC, imprint etc. need to be customized to your needs.
A simple markdown docu can be implemented, as well as a self-service onboarding, see api-content.js.
CSS
Simple color scheme changes can be done easily, just focus on the 1st 15 lines in custom.css
Releas Notes
See: Changelog