materials-schema-web is a static html generation tool for creating Type-Property bidirected schema.
Given arbitrary amount of Type
s and Property
s, this app can:
- Provide a quick search in
Type
orProperty
by given name. - Analyze the
Property
usage and used frequency inType
- Categorize all the relationships between
Type
andProperty
.
- Node.js v14 or further (previous node version might also work without guarantee)
- Clone this repository.
- Run
npm ci
to install all library dependency.
- Modify the material.json in the root directory according to the rules below.
After the action finished, the generated static pages can now be found in the path public
- Clone this repository.
- Modify view path in index.ts in the root directory.
- Run
npm run app
to start the app. The app will be hosted on port 3333.
❗ When edit material.json
directly, all pages under public
folder will be deleted before generation of static pages.
❗ When run the app locally, please note that any modifications in material.json
reuqires to execute npm start
again for update in html pages.
A simplest sample of material.json
looks like this:
{
"dataTypes": [
{"id": "D1", "name": "Text"},
],
"types": [
{"id": "T100", "name": "Person", "properties": ["P1"]},
],
"properties": [
{"id": "P1", "name": "additionalName", "expectedTypes": ["D1"], "description": "xxxx"},
]
}
dataTypes: primitive type; no hyperlink will be generated with this type.
- id: unique string
- name: string
types: customized type; holds property
no hyperlink will be generated with this type.
- id: unique string
- name: string
- properties: : array of string; all
Property
s'id
this Type has
properties: primitive type; no hyperlink will be generated with this type.
- id: unique string
- name: string
- expectedTypes: array of string; all
Type
s'id
in which thisProperty
can be found - description: string
TBD