README.txt aktualisiert

This commit is contained in:
2026-04-22 12:15:33 +02:00
parent 8b112535bb
commit c251b0b353

View File

@@ -1,138 +1,138 @@
howto: howto:
--> Watch out for names. Stylesheet and javascript names, will be used global! --> Watch out for names. Stylesheet and javascript names, will be used global!
----------------------------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------------------------------
├─ create new plugin: ├─ create new plugin:
│ ├─ add line to index.js: 'service.get('socketManager').add("%namespace%");' │ ├─ add line to index.js: 'service.get('socketManager').add("%namespace%");'
│ ├─ add context in plugins route.js: │ ├─ add context in plugins route.js:
│ │ └─ app.post('/window/:name/index', async (req, res) => { await renderWindow(app, 'index', metadata, { user: await vUser.findOne({ where: { Benutzer: req.cookies.sAMAccountName }, raw: true } ) }, res) }); │ │ └─ app.post('/window/:name/index', async (req, res) => { await renderWindow(app, 'index', metadata, { user: await vUser.findOne({ where: { Benutzer: req.cookies.sAMAccountName }, raw: true } ) }, res) });
│ └─ │ └─
├─ create new socket namespaces: ├─ create new socket namespaces:
│ └─ service.get('socketManager').add("%namespace%"); │ └─ service.get('socketManager').add("%namespace%");
└─ add new startmenu entries: └─ add new startmenu entries:
├─ add context object to file '/src/models/integratedStartmenuItems.js', where you can define pass through context paramters ├─ add context object to file '/src/models/integratedStartmenuItems.js', where you can define pass through context paramters
└─ add view-template to '/public/views/integrated/' └─ add view-template to '/public/views/integrated/'
----------------------------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------------------------------
useful global features: useful global features:
----------------------------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------------------------------
├─ %plugin%/public/javascripts.main.js ** for each plugin, main.js is loading for global use ├─ %plugin%/public/javascripts.main.js ** for each plugin, main.js is loading for global use
├─ eventlog ├─ eventlog
│ ├─ service.get('eventManager).write(...) ** writes log entry and notifys admins on webui │ ├─ service.get('eventManager).write(...) ** writes log entry and notifys admins on webui
│ └─ service.get('eventManager).writeLog(...) ** writes log entry only without firing webui message │ └─ service.get('eventManager).writeLog(...) ** writes log entry only without firing webui message
├─ notifyTray ├─ notifyTray
│ └─ service.get('notifyTray').createAndNotify ... │ └─ service.get('notifyTray').createAndNotify ...
└─ └─
----------------------------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------------------------------
rules: rules:
----------------------------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------------------------------
├─ filesystem: ├─ filesystem:
│ ├─ app descriptions, file/folder names in English; except proper names │ ├─ app descriptions, file/folder names in English; except proper names
│ ├─ files and folders always lowercase; continue in uppercase instead of spaces │ ├─ files and folders always lowercase; continue in uppercase instead of spaces
│ ├─ files in routes folder, have to be named %name%Routes.js to generate dynamic menu │ ├─ files in routes folder, have to be named %name%Routes.js to generate dynamic menu
│ ├─ folder names in plural, if files are included │ ├─ folder names in plural, if files are included
│ └─ folder names in singular, if files are excluded │ └─ folder names in singular, if files are excluded
├─ code: ├─ code:
| ├─ javascript: | ├─ javascript:
| │ ├─ ids, classes, data-attributes (names and values) with hyphen (Bindestrich) instead of spaces; always lowercase | │ ├─ ids, classes, data-attributes (names and values) with hyphen (Bindestrich) instead of spaces; always lowercase
| │ └─ functions (and parameters in it) always lowercase; continue in uppercase instead of spaces | │ └─ functions (and parameters in it) always lowercase; continue in uppercase instead of spaces
| ├─ socket.io: | ├─ socket.io:
| │ └─ socket names with underscores instead of spaces; always lowercase | │ └─ socket names with underscores instead of spaces; always lowercase
| ├─ json: | ├─ json:
| │ └─ variables in strings: "${}" (e.g ${ROOTPATH}) | │ └─ variables in strings: "${}" (e.g ${ROOTPATH})
└─ others: └─ others:
├─ admin eventlog in English ├─ admin eventlog in English
├─ regions in English; first letter and proper names in capital ├─ regions in English; first letter and proper names in capital
└─ users eventlog/messaging in German └─ users eventlog/messaging in German
----------------------------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------------------------------
folder structur: folder structur:
----------------------------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------------------------------
root/ ** server relevant files root/ ** server relevant files
├─ node_modules/ ** npm third party modules for nodejs server ├─ node_modules/ ** npm third party modules for nodejs server
├─ plugins/ ** server webapp based extensions ├─ plugins/ ** server webapp based extensions
│ └─ %plugin_name%/ ** dynamic name reservation │ └─ %plugin_name%/ ** dynamic name reservation
│ ├─ views/ ** contains handlebar views │ ├─ views/ ** contains handlebar views
│ ├─ public/ ** contains plugin specified static files │ ├─ public/ ** contains plugin specified static files
│ │ ├─ helpers/ ** contains plugin specified handlebars helpers function │ │ ├─ helpers/ ** contains plugin specified handlebars helpers function
│ │ ├─ javascript/ ** contains plugin specified javascript code │ │ ├─ javascript/ ** contains plugin specified javascript code
│ │ ├─ others/ ** contains plugin specified files like options or templates │ │ ├─ others/ ** contains plugin specified files like options or templates
│ │ └─ styles/ ** contains plugin specified stylesheets │ │ └─ styles/ ** contains plugin specified stylesheets
│ ├─ docs/ │ ├─ docs/
│ │ ├─ help.hbs *** helper file for webapp description │ │ ├─ help.hbs *** helper file for webapp description
│ │ └─ tutorial.hbs *** tutorial file, for webapp tutorial │ │ └─ tutorial.hbs *** tutorial file, for webapp tutorial
│ ├─ index.js *** plugin entry point │ ├─ index.js *** plugin entry point
│ ├─ plugin.json *** metadata basefile │ ├─ plugin.json *** metadata basefile
│ └─ sockets.js *** plugin specified sockets │ └─ sockets.js *** plugin specified sockets
├─ public/ ** contains all visible static files ├─ public/ ** contains all visible static files
│ ├─ helpers/ ** javascript express handlebars helpers for client views │ ├─ helpers/ ** javascript express handlebars helpers for client views
│ ├─ images/ ** global images │ ├─ images/ ** global images
│ ├─ styles/ ** global stylesheets file │ ├─ styles/ ** global stylesheets file
│ │ ├─ responsive/ │ │ ├─ responsive/
│ │ │ ├─ desktop.css *** responsive layout for desktops │ │ │ ├─ desktop.css *** responsive layout for desktops
│ │ │ ├─ mobile.css *** responsive layout for smartphones │ │ │ ├─ mobile.css *** responsive layout for smartphones
│ │ │ └─ tablet.css *** responsive layout for tablets │ │ │ └─ tablet.css *** responsive layout for tablets
│ ├─ dark.css *** dark theme │ ├─ dark.css *** dark theme
│ ├─ light.css *** light theme │ ├─ light.css *** light theme
│ └─ default.css *** global layout for everything everywhere all at once │ └─ default.css *** global layout for everything everywhere all at once
│ └─ views/ ** contains the handlebars views │ └─ views/ ** contains the handlebars views
│ ├─ layouts/ ** templates for views │ ├─ layouts/ ** templates for views
│ │ ├─ default.hbs *** main layout for everything everywhere all at once │ │ ├─ default.hbs *** main layout for everything everywhere all at once
│ │ └─ stricted_area.hbs *** layout without menus and links │ │ └─ stricted_area.hbs *** layout without menus and links
│ └─ partials/ ** view snippets for multiple use │ └─ partials/ ** view snippets for multiple use
├─ src/ ** files for handle server inquiries ├─ src/ ** files for handle server inquiries
│ ├─ controllers/ ** contains the business logic receiving and validating client inquiries │ ├─ controllers/ ** contains the business logic receiving and validating client inquiries
│ ├─ models/ ** data/-base models │ ├─ models/ ** data/-base models
│ │ ├─ configuration.json *** server configuration file │ │ ├─ configuration.json *** server configuration file
│ │ └─ stylesheets.json *** global client stylesheet variabels │ │ └─ stylesheets.json *** global client stylesheet variabels
│ ├─ routes/ ** handles endpoint routing │ ├─ routes/ ** handles endpoint routing
│ ├─ secure/ ** contains encrypted passfiles and certificates │ ├─ secure/ ** contains encrypted passfiles and certificates
│ ├─ services/ ** contains business logic classes │ ├─ services/ ** contains business logic classes
│ │ ├─ authentication.js *** authenticates client connection attempts │ │ ├─ authentication.js *** authenticates client connection attempts
│ │ ├─ encryption.js *** de-/ encryption serialization class │ │ ├─ encryption.js *** de-/ encryption serialization class
│ │ ├─ eventlog.js *** messaging class; client and server based │ │ ├─ eventlog.js *** messaging class; client and server based
│ │ ├─ pluginsystem.js *** plugin engine │ │ ├─ pluginsystem.js *** plugin engine
│ │ └─ sql.js *** microsoft sql connection and processing queries │ │ └─ sql.js *** microsoft sql connection and processing queries
│ └─ sockets/ ** global sockets │ └─ sockets/ ** global sockets
│ development.json *** development to do's │ development.json *** development to do's
│ license_internal.txt *** license text file │ license_internal.txt *** license text file
│ package-lock.json *** npm link to node_modules │ package-lock.json *** npm link to node_modules
│ package.json *** file for server initialization │ package.json *** file for server initialization
│ release_notes.json *** shows server version release notes │ release_notes.json *** shows server version release notes
└─ server.js *** file for handle server start └─ server.js *** file for handle server start
----------------------------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------------------------------
stucture of style.json: stucture of style.json:
----------------------------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------------------------------
root root
├─ themes: ├─ themes:
│ ├─ dark: │ ├─ dark:
│ └─ light: │ └─ light:
└─ responsive: └─ responsive:
├─ desktop: ├─ desktop:
├─ tablet: ├─ tablet:
└─ mobile: └─ mobile:
----------------------------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------------------------------
structure of plugin: structure of plugin:
----------------------------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------------------------------
root/ root/
├─ plugins/ ├─ plugins/
│ ├─ ${plugin}/ │ ├─ ${plugin}/
│ │ ├─ views/ │ │ ├─ views/
│ │ │ └─ index.hbs (main file) │ │ │ └─ index.hbs (main file)
│ │ ├─ styles/ │ │ ├─ styles/
│ │ │ └─ *.css (Set stylesheet as usual in header-section) │ │ │ └─ *.css (Set stylesheet as usual in header-section)
│ │ ├─ scripts/ │ │ ├─ scripts/
│ │ │ └─ *.js (Load file with function reloadPluginScript("/${pluginname}/javascript/${name}.js") in script-section) │ │ │ └─ *.js (Load file with function reloadPluginScript("/${pluginname}/javascript/${name}.js") in script-section)
│ │ └─ files/ │ │ └─ files/
│ │ └─ *.png (Set the name exactly as it appears in the plugin.json file) │ │ └─ *.png (Set the name exactly as it appears in the plugin.json file)
│ └─ plugin.json │ └─ plugin.json
----------------------------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------------------------------