From 9cd004aa91ccf72cbb12958247bb9de488eeaf7f Mon Sep 17 00:00:00 2001 From: "Deployment Bot (from Travis CI)" Date: Sun, 1 Oct 2023 17:10:42 +0000 Subject: [PATCH] Deploy kalisio/kdk to github.com/kalisio/kdk.git:gh-pages --- 404.html | 2 +- about/contact.html | 2 +- about/contributing.html | 2 +- about/introduction.html | 2 +- about/license.html | 2 +- about/roadmap.html | 2 +- api/core/application.html | 2 +- api/core/components.html | 2 +- api/core/hooks.html | 2 +- api/core/introduction.html | 2 +- api/core/mixins.html | 2 +- api/core/services.html | 2 +- api/introduction.html | 2 +- api/map/components.html | 2 +- api/map/globe-mixins.html | 2 +- api/map/hooks.html | 2 +- api/map/introduction.html | 2 +- api/map/map-mixins.html | 2 +- api/map/mixins.html | 2 +- api/map/services.html | 2 +- architecture/component-view.html | 2 +- architecture/data-model-view.html | 2 +- architecture/global-architecture.html | 2 +- architecture/introduction.html | 2 +- architecture/main-concepts.html | 2 +- assets/guides_basics_introduction.md.add8148a.js | 1 - assets/guides_basics_introduction.md.dd1f66d1.js | 1 + ...an.js => guides_basics_introduction.md.dd1f66d1.lean.js} | 2 +- ...8a037.js => guides_development_configure.md.aea5d40e.js} | 2 +- ....js => guides_development_configure.md.aea5d40e.lean.js} | 2 +- ...156ebf78.js => guides_development_deploy.md.8efae057.js} | 2 +- ...ean.js => guides_development_deploy.md.8efae057.lean.js} | 2 +- ...421e930.js => guides_development_develop.md.78c86703.js} | 2 +- ...an.js => guides_development_develop.md.78c86703.lean.js} | 0 ...5a98895.js => guides_development_publish.md.56537144.js} | 2 +- ...an.js => guides_development_publish.md.56537144.lean.js} | 0 ....cd760145.js => guides_development_setup.md.bf15646e.js} | 2 +- ...lean.js => guides_development_setup.md.bf15646e.lean.js} | 2 +- ...d.3df91803.js => guides_development_test.md.5d69d9de.js} | 2 +- ....lean.js => guides_development_test.md.5d69d9de.lean.js} | 0 guides/basics/introduction.html | 6 +++--- guides/development/configure.html | 6 +++--- guides/development/deploy.html | 6 +++--- guides/development/develop.html | 6 +++--- guides/development/publish.html | 6 +++--- guides/development/setup.html | 6 +++--- guides/development/test.html | 6 +++--- guides/introduction.html | 2 +- hashmap.json | 2 +- index.html | 2 +- tips/app-development.html | 2 +- tips/introduction.html | 2 +- tips/mobile-configuration.html | 2 +- tools/browsers.html | 2 +- tools/cli.html | 2 +- tools/db.html | 2 +- tools/documentation.html | 2 +- tools/infrastructure.html | 2 +- tools/introduction.html | 2 +- 59 files changed, 69 insertions(+), 69 deletions(-) delete mode 100644 assets/guides_basics_introduction.md.add8148a.js create mode 100644 assets/guides_basics_introduction.md.dd1f66d1.js rename assets/{guides_basics_introduction.md.add8148a.lean.js => guides_basics_introduction.md.dd1f66d1.lean.js} (85%) rename assets/{guides_development_configure.md.7688a037.js => guides_development_configure.md.aea5d40e.js} (68%) rename assets/{guides_development_configure.md.7688a037.lean.js => guides_development_configure.md.aea5d40e.lean.js} (68%) rename assets/{guides_development_deploy.md.156ebf78.js => guides_development_deploy.md.8efae057.js} (62%) rename assets/{guides_development_deploy.md.156ebf78.lean.js => guides_development_deploy.md.8efae057.lean.js} (62%) rename assets/{guides_development_develop.md.6421e930.js => guides_development_develop.md.78c86703.js} (92%) rename assets/{guides_development_develop.md.6421e930.lean.js => guides_development_develop.md.78c86703.lean.js} (100%) rename assets/{guides_development_publish.md.e5a98895.js => guides_development_publish.md.56537144.js} (90%) rename assets/{guides_development_publish.md.e5a98895.lean.js => guides_development_publish.md.56537144.lean.js} (100%) rename assets/{guides_development_setup.md.cd760145.js => guides_development_setup.md.bf15646e.js} (94%) rename assets/{guides_development_setup.md.cd760145.lean.js => guides_development_setup.md.bf15646e.lean.js} (85%) rename assets/{guides_development_test.md.3df91803.js => guides_development_test.md.5d69d9de.js} (92%) rename assets/{guides_development_test.md.3df91803.lean.js => guides_development_test.md.5d69d9de.lean.js} (100%) diff --git a/404.html b/404.html index 52cd4f63e..e06066b52 100644 --- a/404.html +++ b/404.html @@ -16,7 +16,7 @@
Skip to content

404

PAGE NOT FOUND

But if you don't change your direction, and if you keep looking, you may end up where you are heading.
- + \ No newline at end of file diff --git a/about/contact.html b/about/contact.html index 153849c89..3ea2ab471 100644 --- a/about/contact.html +++ b/about/contact.html @@ -40,7 +40,7 @@
Skip to content

Contact

Please feel free to join our slack channel using the invitation link.

- + \ No newline at end of file diff --git a/about/contributing.html b/about/contributing.html index 5ff76570e..7a0f7cdc0 100644 --- a/about/contributing.html +++ b/about/contributing.html @@ -40,7 +40,7 @@
Skip to content

Contributing

Submission guidelines

Report a bug

Before creating an issue please make sure you have checked out the docs, you might want to also try searching Github. It's pretty likely someone has already asked a similar question.

Issues can be reported in the issue tracker.

Pull Requests

We love pull requests and we're continually working to make it as easy as possible for people to contribute.

We prefer small pull requests with minimal code changes. The smaller they are the easier they are to review and merge. A core team member will pick up your PR and review it as soon as they can. They may ask for changes or reject your pull request. This is not a reflection of you as an engineer or a person. Please accept feedback graciously as we will also try to be sensitive when providing it.

Although we generally accept many PRs they can be rejected for many reasons. We will be as transparent as possible but it may simply be that you do not have the same context or information regarding the roadmap that the core team members have. We value the time you take to put together any contributions so we pledge to always be respectful of that time and will try to be as open as possible so that you don't waste it.

Commit message guidelines

We follow the Conventional commits specifications which provides a set of rules to make commit messages more readable when looking through the project history. But also, we use the git commit messages to generate the change log.

Commit message format

The commit message should be structured as follows:

<type>: <subject> [optional `breaking`]
<type>: <subject> [optional `breaking`]

Where type must be one of the following:

  • build: changes that affect the build system (external dependencies)
  • ci: changes to our CI configuration files and scripts
  • chore: changes that affect the project structure
  • docs: changes that affect the documentation only
  • feat: a new feature
  • fix: a bug fix
  • perf: a code change that improves performance
  • refactor: a code change that neither fixes a bug nor adds a feature
  • revert: revert changes
  • style: changes that do not affect the meaning of the code (lint issues)
  • test: adding missing tests or correcting existing tests

Use the optional [ breaking ] keyword to declare a BREAKING CHANGE.

Examples

  • Commit message with description and breaking change in body
feat: allow provided config object to extend other configs [ breaking ] (closes #12)
feat: allow provided config object to extend other configs [ breaking ] (closes #12)
  • Commit message with no body
docs: correct spelling in the contributing.md file
docs: correct spelling in the contributing.md file
  • Commit message for a fix using an issue number.
fix: fix minor issue in code (closes #12)
fix: fix minor issue in code (closes #12)

Versioning guidelines

We rely on Semantic Versioning for versioning a release. Indeed, given a version number MAJOR.MINOR.PATCH, increment the:

  • MAJOR version when you make a major evolution leading to breaking changes,
  • MINOR version when you add functionality in a backwards-compatible manner
  • PATCH version when you make backwards-compatible bug fixes.

The command yarn release:<type>, where <type> is either patch, minor or major, helps you to do the release.

It performs the following task for you:

  • increase the package version number in the package.json file
  • generate the change log
  • create a tag accordingly in the git repository and push it

TIP

Please refer to the Publish your app guide to learn more about the way to publish the modules and the applications

Contributor Code of Conduct

As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.

We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.

Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.

This Code of Conduct is adapted from the Contributor Covenant, version 1.0.0, available at http://contributor-covenant.org/version/1/0/0/

- + \ No newline at end of file diff --git a/about/introduction.html b/about/introduction.html index dab7bd3fd..b69b93bba 100644 --- a/about/introduction.html +++ b/about/introduction.html @@ -40,7 +40,7 @@
Skip to content

About

The Kalisio Development Kit (KDK) aims to simplify the development of geospatial web applications running on desktop or mobile devices. It is a strongly opiniated stack initially developed to build multitenancy applications provided as SaaS (i.e. Cloud) like Kalisio Crisis. However, you can also build legacy applications because of the modularity and the flexibility of the KDK.

Kano application built with the KDK

Our objective is to propose a microservice based platform. Each building block has the responsibility to deliver specific and limited functionalities. Such an architectural approach plays a key role in helping us face the challenge of maintaining several mature products that need scalability within multiple contexts in terms of processing, storage, and features delivery.

If you'd like more information on how this documentation is built please refer to our tools section.

- + \ No newline at end of file diff --git a/about/license.html b/about/license.html index 11dff4aa6..7ba4384a6 100644 --- a/about/license.html +++ b/about/license.html @@ -40,7 +40,7 @@
Skip to content

License

MIT License

Copyright (c) 2017-20xx Kalisio

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

- + \ No newline at end of file diff --git a/about/roadmap.html b/about/roadmap.html index 7dce073e5..fefcb5737 100644 --- a/about/roadmap.html +++ b/about/roadmap.html @@ -40,7 +40,7 @@
Skip to content

Roadmap

The roadmap is available on Github.

Release Notes

Release Notes for each modules are available on Github:

The changelogs are available on Github

- + \ No newline at end of file diff --git a/api/core/application.html b/api/core/application.html index 3211f4894..152d99d75 100644 --- a/api/core/application.html +++ b/api/core/application.html @@ -284,7 +284,7 @@ } this.showError(error.message) }) - + \ No newline at end of file diff --git a/api/core/components.html b/api/core/components.html index 79a71475a..90d133af0 100644 --- a/api/core/components.html +++ b/api/core/components.html @@ -130,7 +130,7 @@ 'create': { name: 'create-group', component: 'editor/KModalEditor', props: true }, 'edit/:objectId': { name: 'edit-group', component: 'editor/KModalEditor', props: true } }

The properties to declare a k-modal-editor are identical to those of the k-modal-editor plus:

Chart

The KDK provides a helper component that allows rendering charts based on chart.js.

In addition and only if needed, it uses chroma.js to provide the backgoundColor array in order to render the different datasets of the chart. You can provide the color scale of your choice by setting the scaleColor property on each datasets.

Checkout the ChartActivity to understand how it works.

TIP

Have a look at the choma color scales to see how to define your color scale.

Authentication

The KDK provides you with some default forms to manage login, logout, registration and server endpoint configuration for mobile apps in the authentication folder.

User Account

The KDK provides you with a default activity to manage user accounts in the account folder:

- + \ No newline at end of file diff --git a/api/core/hooks.html b/api/core/hooks.html index 07757e34d..9a76c724c 100644 --- a/api/core/hooks.html +++ b/api/core/hooks.html @@ -52,7 +52,7 @@ service.hooks({ before: { create: [ hooks.convertDates(['expireAt']) ] } })
import { hooks } from '@kalisio/kdk/core.api'
 // Will convert data.expireAt to Date
 service.hooks({ before: { create: [ hooks.convertDates(['expireAt']) ] } })

setAsDeleted(hook)

Flag the item as deleted when required by subsequent operations.

Delete flag is stored in the deleted field

populatePreviousObject(hook)

To be used a a before hook

Retrieve the target object before an update or a patch operation.

Previous object is stored in hook.params.previousItem

setExpireAfter(delayInSeconds)

To be used a a before hook Return a hook function according to provided delay

Set the MongoDB TTL on the target object.

TTL is stored in the expireAt field

Service

rateLimit(options)

To be used a before hook Return a hook function according to provided options

Rate limit the call of a target service (and possibly operation) according to the following options:

Rely on the token bucket algorithm

Authorisations

populateSubjects(hook)

Retrieve the target subject object(s) for an authorisation operation.

Specialises populateObjects with the following options:

populateResource(hook)

Retrieve the target resource object for an authorisation operation.

Specialises the populateObject with the following options:

authorise(hook)

Usually used as a app-level hook

Check permissions to access target resource object(s) for current user on the performed operation.

If the operation is authorised the hook.params.authorised flag will be set to true.

If you'd like to force/unforce authorisation check use the hook.params.checkAuthorisation flag.

By default check will only be performed when called from a client not from the server itself.

updateAbilities(options)

Return a hook function according to provided options

Update cached subject abilities when permissions have changed according to the following options:

Users

enforcePasswordPolicy(options)

To be used a before hook Return a hook function according to provided options

Check password policy when creating/updating the user's password according to the following options:

For more information read about password policy configuration.

storePreviousPassword(options)

To be used a before hook Return a hook function according to provided options

Update the password history when updating the user's password according to the following options:

For more information read about password policy configuration.

generatePassword(hook)

To be used a before hook

Generate a random password according to password policy (if any) and store it in the password item field.

For more information read about password policy configuration.

Organisations

createOrganisationServices(hook)

To be used an after hook

Create the database used to store organisation data and registered organisation services. Hook result is expected to be the organisation object and the organisation ID will be used as the database name.

removeOrganisationServices(hook)

To be used an after hook

Delete the database used to store organisation data and registered organisation services. Hook result is expected to be the organisation object.

createOrganisationAuthorisations(hook)

To be used an after hook

Set default membership of the user as params to organisation owner after creating it. Hook result is expected to be the organisation object.

removeOrganisationAuthorisations(hook)

To be used an after hook

Removes membership of all users of the organisation after removing it. Hook result is expected to be the organisation object.

Groups

createGroupAuthorisations(hook)

To be used an after hook

Set default membership of the user as params to group owner after creating it. Hook result is expected to be the group object.

removeGroupAuthorisations(hook)

To be used an after hook

Removes membership of all users of the group after removing it. Hook result is expected to be the group object.

Logs

log(hook)

Usually used as a app-level hook

Events

emit(hook)

Usually used as a app-level hook

Emit an event named {hook_type}Hook (e.g. beforeHook or afterHook) for each hook ran, the payload of the event being the hook object.

- + \ No newline at end of file diff --git a/api/core/introduction.html b/api/core/introduction.html index cf0121e6e..6337c90c0 100644 --- a/api/core/introduction.html +++ b/api/core/introduction.html @@ -58,7 +58,7 @@ Layout.bindContent([{ id: 'action', icon: 'las la-eye-dropper', label: 'MyActivity.ACTION_LABEL', handler: 'onAction' }], myComponent) - + \ No newline at end of file diff --git a/api/core/mixins.html b/api/core/mixins.html index 5e212ead2..565e79ef1 100644 --- a/api/core/mixins.html +++ b/api/core/mixins.html @@ -40,7 +40,7 @@
Skip to content

Mixins

Authentication

Provide basic methods to register(user), login(email, password), logout(), and restoreSession().

Will make the currently authenticated user available in the user property of the global store.

Authorisation

Compute user' abilities and keeps it up-to-date on user' permissions changes.

Abilities are stored in the user.abilities property of the global store.

Base Activity

Make it easier to update the application layout when the user changes his current activity:

  • clearTitle()/setTitle() (un)sets the application bar title in store appBar property
  • clearActions()/registerAction(type, action) (un)registers actions to be used by the activity
    • registerFabAction() registers actions to be used in action button, type = 'fab'
    • registerTabAction() registers actions to be used in navigation bar, type = 'tabBar'
  • clear/setSearchBar(field, services) (un)sets the application search bar in store searchBar property
  • clear/setLeftDrawer(component, content) (un)sets the application left drawer in store leftDrawer property
  • clear/setRightDrawer(component, content) (un)sets the application right drawer in store rightDrawer property
  • clearActivity() resets actions/title used by the activity
  • refreshActivity() should be overridden in concrete activities to implement action registration and title - search bar - right panel setup

Causes the activity to be automatically refreshed on user' permissions changes or route change.

Base Collection

Used to retrieve items from a specific service and keep track of real-time updates using RxJS:

  • (un)subscribe() causes the component to (un)subscribe to real-time events
  • refreshCollection() queries the service to retrieve items according to current pagination settings
  • getCollectionBaseQuery() should be overridden in concrete activities to implement any required parameter in the base query
  • getCollectionFilterQuery() should be overridden in concrete activities to provide any filtering parameter

To be used with the service mixin.

Base Item

Make it easier to setup items displayed by a collection:

  • clearActions()/registerAction(type, action) (un)registers actions to be used on the item
    • registerPaneAction() registers actions to be used in item pane, type = 'pane'
    • registerMenuAction() registers actions to be used in item menu, type = 'menu'
  • refreshActions() should be overridden in concrete items to implement action registration

Causes the item actions to be automatically refreshed on user' permissions changes.

Base Context

Retrieve the current context of the application from the contextId props, usually set on the target route:

  • clearContext() clears actions set by the context and context in store
  • refreshContext() clears the current context if contextId is not set or retrieve it if different from current one
  • getActionsForContext() can be overridden in concrete context-aware components to provide actions required by the context to be set it in the application bar, default behavior is to get the action list from the configuration context.actions property.

The context service to be used is the one set in the context.service property of the configuration.

Causes the context to be automatically refreshed on route change.

Will make the context available in the context property of the global store.

Service Proxy

Make it easier to access an underlying service from the contextId and service props:

  • getService() to retrieve the service

Object Proxy

Make it easier to access an underlying object of a given service from the objectId and perspective props:

  • getObject() to retrieve the service object
  • getObjectId() to retrieve the service object ID
  • loadObject() causes the service object to be resolved for current properties values

TIP

If a perspective is configured only that perspective will be retrieved.

DANGER

The service mixin is mandatory when using this mixin.

Schema Proxy

Make it easier to access an underlying JSON schema object for a given service from the schema-name, service or schema-json props:

  • getSchema() to retrieve the schema object
  • getSchemaId() to retrieve the schema object ID
  • getSchemaName() to retrieve the schema name
  • loadSchema() causes the schema object to be resolved for current properties values

If a JSON schema is directly provided (as a string) it will be parsed, otherwise it will load a schema file which name is computed like this:

  • basename is the given schema name or service name
  • suffix is .update if the objectId props is defined or .create otherwise
  • -perspective is added to suffix if the perspective props is defined
  • extension is always .json

WARNING

This mixin has been designed to be used with the service mixin and the object mixin.

For instance, if you set props like this <my-editor service="users"/> on your component using the mixins, the users.create.json schema file will be loaded. If you set props like this <my-editor service="users" :objectId="objectId" perspective="profile"/>, the users.update-profile.json schema file will be loaded.

Base Editor

Make it easier to build editors from baseObject and baseQuery props, as well as props defined on associated mixins:

  • getMode() returns updated or create depending if the objectId props is defined or not
  • fillEditor() fill all forms with current object values
  • clear() clear all forms back to default values
  • validateForms() validate all forms
  • applyForms() call apply() on all forms
  • submittedForms() call submitted() on all forms
  • getBaseObject() return retrieved object from service or input base object as defined in baseObject props, if a perspective is defined through the perspective props only that perspective is returned.
  • getBaseQuery() return input base query as defined in baseQuery props, will automatically add object ID and perspective to query if any defined
  • async apply(event, done) setups all the underlying objects to make it ready for edition
  • refresh() setups all the underlying objects to make it ready for edition
    1. load service from the contextId and service props
    2. load schema from the schema-name, service or schema-json props
    3. load object from the objectId and perspective props
    4. load form refs from the set of refs that have been defined
    5. build forms
    6. fill forms

DANGER

This mixin has been designed to be used with the service mixin, the schema mixin, the object mixin and the refs resolver mixin.

TIP

The baseObject props is usually used to keep track of existing or additional "hidden" or "internal" properties in addition to the ones edited throught the form.

Check out a code example here to see how to create your own editors.

Base Field

Make it easier to build form fields from the properties and display props:

  • emptyModel() get the default "empty" value of the field, returns an empty string by default
  • clear() set the current value of the field to be the default one if provided through properties.field.default, use "empty" model value otherwise
  • value() get the current value of the field, simply gets the value from model by default
  • fill(value) set the current value of the field, simply copies the value as model by default
  • apply (object, field) applies the current field value on the given target object, simply copies the value in the object by default, to be overloaded if you need to perform specific operations before the form has been submitted
  • submitted (object, field) does nothing by default, to be overloaded if you need to perform specific operations after the form has been submitted
  • onChanged() emits the field-changed event whenever the field value has changed, consequently the form will validate or invalidate the field, should be binded in template to events like blur.

Quasar field components are usually used to implement form fields, the given set of computed properties are available to be bound:

  • icon alias for properties.field.icon if display.icon is true, empty by default
  • label alias for properties.field.label if display.label is true, empty by default
  • helper alias for properties.field.helper
  • disabled alias for properties.field.disabled, false by default
  • hasError boolean indicating if a validation error has occured
  • errorLabel alias for properties.field.errorLabel, empty by default

TIP

label, helper and errorLabel properties will be automatically internationalized if corresponding values are valid translation keys.

Check out a code example here to see how to create your own fields.

Version

Make it easier to display information about client and API versions in applications:

  • refreshVersionNames() retrieves the version information, it will be stored in clientVersionName and apiVersionName data variables
- + \ No newline at end of file diff --git a/api/core/services.html b/api/core/services.html index 0e6460faa..d9a9cea9f 100644 --- a/api/core/services.html +++ b/api/core/services.html @@ -160,7 +160,7 @@ }, "required": ["x"] } - + \ No newline at end of file diff --git a/api/introduction.html b/api/introduction.html index 45068f513..1c1bcf62f 100644 --- a/api/introduction.html +++ b/api/introduction.html @@ -46,7 +46,7 @@ response.data.forEach(user => { // Do something with the current user })

Depending on the permissions set on the user by the application he might not have access to all items of the service.

Hooks

KDK modules provide a collection of hooks to be used by modules or client applications. They often rely on Feathers common hooks.

Hooks are the main way to introduce business logic into applications and modules so we recommend to understand them well first before reading this.

Each service can include a set of internal hooks, i.e. hooks required to make the service work. They are built-in with the service and cannot usually be removed.

Each module then exposes a set of external hooks you can use to extend the capabilities of your application. They are not built-in with the services and are usually added or removed on-demand by your application. The main reason is that you must have control over the order of execution when mixing different hooks to best fit your application logic and avoid any side effect.

We try to organise hooks in different categories:

Others hooks are usually service-centric and so attached to the target service.

Data model

Each service can declare a set of perspectives, which are not retrieved by default when querying the object(s), you will need to use $select to do so. A perspective is simply a field of the data model containing a nested object, like the profile field containing the user's profile information on the user data model.

All dates/times in KDK are managed as date or moment objects and expressed in UTC.

Client

KDK modules provide a collection of reusable mixins and components to be used by modules or applications.

Mixins are a flexible way to distribute reusable functionalities for Vue components. A mixin object can contain any component options. When a component uses a mixin, all options in the mixin will be "mixed" into the component's own options.

Although .vue single file components are stored at the module level to ensure synchronized configuration management with backend code they are not "processed" within. Instead, the application processes them directly using WebPack dynamic imports.

WARNING

Single component files are temporarily copied into the application folder during the build process, in development mode they are directly imported from (linked) modules using hot reload.

Testing

You will find here a collection of ready-to-go REST requests to test the API with the great POSTMAN tool. Simply download it and import it in your POSTMAN installation.

You should do the following:

  1. make your application run (the collection is configured for default dev port 8080 but you can easily switch to 8081 for production mode for instance or any other)
  2. use the authenticate request with a registered user e-mail/password to retrieve an authorization token
  3. set this token in the header of other requests in order to be authorized to perform the request
  4. renew your token when expired (step 2)
- + \ No newline at end of file diff --git a/api/map/components.html b/api/map/components.html index dfefc15b2..32bb620ba 100644 --- a/api/map/components.html +++ b/api/map/components.html @@ -172,7 +172,7 @@ ] }] }

TIP

It is also possible to add your own type of legend. You must implement the component responsible of the rendering and register it to the KLegend through the renderers prop. The component must overload the abstract KLegendRenderer component.

- + \ No newline at end of file diff --git a/api/map/globe-mixins.html b/api/map/globe-mixins.html index f88cd1ed5..ad9eb2455 100644 --- a/api/map/globe-mixins.html +++ b/api/map/globe-mixins.html @@ -152,7 +152,7 @@ geometry: { type: 'LineString', coordinates: [...] } }] }

File Layer

Make it possible to drag'n'drop GeoJson or KML file on the globe. It will automatically create a new GeoJson layer named after the filename on drop. As a consequence it has to be used with the GeoJson layer mixin and will use the configured styling.

Globe Activity

Make it easier to create 3D mapping activities:

DANGER

It assumes that the DOM element used by the render engine has a ref named globe

- + \ No newline at end of file diff --git a/api/map/hooks.html b/api/map/hooks.html index 34df8dea7..01fe048a6 100644 --- a/api/map/hooks.html +++ b/api/map/hooks.html @@ -40,7 +40,7 @@
Skip to content

Hooks

Query

asGeoJson(options)

Return a hook function according to provided options

Transform the hook results into a GeoJson object:

  • force: set to true to perform transformation whatever hook parameters, otherwise this hook will only be run when hook.params.asGeoJson is true (default)
  • longitudeProperty: name of the field where to read the longitude on result items
  • latitudeProperty: name of the field where to read the latitude on result items
  • altitudeProperty: name of the field where to read the altitude on result items
  • pick: an array of properties to be picked on result items using Lodash
  • omit: an array of properties to be omitted on result items using Lodash
  • properties: a map between input key path and output key path supporting dot notation, a value of the map is a structure like this:
    • from: input key path
    • to: output key path (defaults to input path if not given)
    • delete: boolean indicating if the input key path should be deleted or not after mapping
  • asFeatureCollection: true to output a GeoJson feature collection (default) otherwise will generate an array of GeoJson features

marshallSpatialQuery(hook)

Converts from client/server side spatial types (e.g. coordinates or numbers) to basic JS types, which is usually required when querying the database. Applies to MongoDB geospatial operators. It also manages shortcuts to create spatial queries for features in a given area.

Also set hook.params.asGeoJson to true when hook.query.geoJson is true (see above).

aggregateFeaturesQuery(hook)

Constructs query for feature aggregation over time.

Reads the query object to process from hook.params.query.$aggregate

- + \ No newline at end of file diff --git a/api/map/introduction.html b/api/map/introduction.html index b05f256c5..2bca0a39a 100644 --- a/api/map/introduction.html +++ b/api/map/introduction.html @@ -110,7 +110,7 @@ // Launch a geolocation await Geolocation.update() const position = this.$store.get('geolocation.position') - + \ No newline at end of file diff --git a/api/map/map-mixins.html b/api/map/map-mixins.html index d3fad0443..d8991f467 100644 --- a/api/map/map-mixins.html +++ b/api/map/map-mixins.html @@ -184,7 +184,7 @@ ] } }

The ctx object is the draw context and is the only object available from the draw code.

By default, the following fields are available on the draw context :

TIP

It is possible to extend what's available in the draw context from the application using the CanvasDrawContext singleton. In this case you should call CanvasDrawContext.merge(contextAdditionObject) to merge the content of contextAdditionObject with the draw context. This call must be done before the canvas layer mixin is created. This can be useful to build an application specific library of draw functions and make these available to the canvas layer instances.

Map Activity

Make it easier to create 2D mapping activities:

DANGER

It assumes that the DOM element used by the render engine has a ref named map

- + \ No newline at end of file diff --git a/api/map/mixins.html b/api/map/mixins.html index 9b2a91c00..3b3a016db 100644 --- a/api/map/mixins.html +++ b/api/map/mixins.html @@ -108,7 +108,7 @@ values: [ -10, -8, 0, 4, 9 ] */ }

The mixin adds the following functions:

This mixin also adds the following internal data properties:

- + \ No newline at end of file diff --git a/api/map/services.html b/api/map/services.html index 6d3799644..1646dfd4e 100644 --- a/api/map/services.html +++ b/api/map/services.html @@ -340,7 +340,7 @@ } }) // Do something with the resulting feature collection

Hooks

The following hooks are executed on the features service:

null

These are mainly hooks to convert from/to JS/MongoDB data types.

Alerts service

TIP

Available as a global and a contextual service

The service can be created using the global createAlertsService(options) function, if no context provided it will be available as a global service otherwise as a contextual service (e.g. attached to a specific organization), please also refer to core module createService().

WARNING

update method is not allowed now, you have to recreate the alert if you'd like to update it. patch method is only allowed from the server side in order to update the alert status.

Alerts are user-defined conditions automatically and continuously evaluated as new time-based data are gathered and target sensor measures or forecast data. It can be viewed as an automated query of the feature aggregation API or Weacast probe API that will raise an event or trigger a webhook whenever a matching result is found. With alerts you can create triggers which will fire on an occurrence of the selected measure or weather conditions (temperature, humidity, pressure, etc.) in a specified location and period of time.

Data model

The common model is a GeoJSON feature with the geometry of the source feature for measurements or a GeoJSON point for weather.

The data model of an alert as used by the API is detailed below.

Alert data model

The details of some of the properties are the following:

Hooks

The following hooks are executed on the alerts service:

null

These are mainly hooks to convert from/to JS/MongoDB data types.

- + \ No newline at end of file diff --git a/architecture/component-view.html b/architecture/component-view.html index 7a4ea6c45..51928b80a 100644 --- a/architecture/component-view.html +++ b/architecture/component-view.html @@ -40,7 +40,7 @@
Skip to content

Component view

The typical components and the underlying dependencies of KDK are summarized in the following diagram.

Component view

- + \ No newline at end of file diff --git a/architecture/data-model-view.html b/architecture/data-model-view.html index aa1d054a5..2382659a0 100644 --- a/architecture/data-model-view.html +++ b/architecture/data-model-view.html @@ -40,7 +40,7 @@
Skip to content

Data model-oriented view of the architecture

According to the Feathers philosophy each data model is manipulated using a service interface to perform CRUD operations of the persistence layer. So this data model-oriented view is a service-oriented view in the same manner.

Because data models internally rely on JSON they are by nature hierarchical. In the following diagrams each nested JSON object is represented as a smaller bubble in a bigger bubble (the nesting/parent object), the data model instance being the root JSON object or the biggest bubble. The name of the bubble is the name of the nesting object property owing the nested object.

Data models are dynamic by nature, allowing any plugin to add custom fields whenever required using hooks. Each data model includes an implicit ObjectID _id field provided by the database.

User data model

The most common properties of a user are described by the following data model:

User data model

The details of each property are the following:

  • email : user e-mail used as an internal unique ID
  • password : hashed user password
  • locale : user locale when registering
  • previousPasswords : hashed user password history if password policy has been enabled
  • profile : user profile information including name
  • [provider] : user profile information for associated OAuth provider, e.g. google
  • [scope] : user permissions for associated scope, e.g. groups
  • tags : user affected tags if any
  • devices : user mobile devices if any, each time the user uses a new device it is registered

Device data model

The most common properties of a device object are described by the following data model:

TODO

This data model is manipulated through the Device API.

The details of each property are the following:

  • platform: the platform of the device, e.g. Android
  • model: the model of the device, e.g. SM-G930U
  • manufacturer: the manufacturer of the device, e.g. samsung
  • uuid: UUID of the device
  • registrationId: the ID of the associated device in the notification system (APNS or Firebase)
  • arn: the ARN of associated SNS device
  • lastActivity: the date/time of the last connection of this device

Most data are retrieved using the cordova-plugin-device.

Tag data model

The most common properties of a tag object are described by the following data model:

TODO

This data model is manipulated through the Tag API.

The details of each property are the following:

  • scope: the scope of the tag (i.e. category), e.g. skill
  • value: the value of the tag, e.g. developer
  • count: the number of tagged objects
  • context: the ID of the associated context object providing this tag if any (e.g. the organisation)
  • topics: the ARN of associated SNS topics for each platform used to publish messages to tagged objects, used by the pusher service

Organization data model

The most common properties of an organization are described by the following data model:

Organization data model

This data model is manipulated through the organizations service.

The details of each property are the following:

  • name: the name of the organisation
  • topics: the ARN of associated SNS topics for each platform used to publish messages to organization' members, used by the pusher service

the organization ObjectID is used as the internal DB name

Group data model

The most common properties of a group object are described by the following data model:

Group data model

This data model is manipulated through the groups service.

The details of each property are the following:

  • name: the name of the group
  • description: the description of the group
  • topics: the ARN of associated SNS topics for each platform used to publish messages to group' members, used by pusher service
- + \ No newline at end of file diff --git a/architecture/global-architecture.html b/architecture/global-architecture.html index 3f2c0a41d..4295fb952 100644 --- a/architecture/global-architecture.html +++ b/architecture/global-architecture.html @@ -66,7 +66,7 @@ } } }

The above example will proxy the request /api/service/1 to http://my.service.com/api/1.

However, all of this requires manual work, creates a tight coupling with your underlying infrastructure and will not allow auto-scaling unless you have some discovery mechanism. You can make each instance automatically aware of others instances to distribute services and related events using feathers-distributed.

- + \ No newline at end of file diff --git a/architecture/introduction.html b/architecture/introduction.html index 4df21b883..175fdfbe2 100644 --- a/architecture/introduction.html +++ b/architecture/introduction.html @@ -40,7 +40,7 @@
Skip to content

Architecture

Before jumping to the global architecture view we recommend to read about the main concepts of KDK.

You can then have a look to the:

  1. component-oriented view
  2. data model-oriented view
- + \ No newline at end of file diff --git a/architecture/main-concepts.html b/architecture/main-concepts.html index 8cb848bf3..a47b32275 100644 --- a/architecture/main-concepts.html +++ b/architecture/main-concepts.html @@ -40,7 +40,7 @@
Skip to content

Main concepts

WARNING

Although this page details the main data model used for SaaS applications the organisation part is optional and you can build legacy applications just by using services.

Services

According to the Feathers philosophy each business operation should be performed through a service interface. As a consequence, these are are the building blocks at the heart of each KDK application.

Organisation model

Organisations are the basic elements that permit to create and configure teams (i.e. groups of users) and invite others to join and share content. Organisations are shared workspaces where users can collaborate using a set of services only available within the context of the organisation.

Data segregation

KDK implements an extreme solution to segregate data at the source: using different databases. This means that dedicated databases (respectively services) are created to hold (respectively to manage) the contextual assets when organisations are made available, and simply destroyed when they are not anymore.

TIP

Under the hood the feathers-mongodb-management module is used to dynamically create/remove a database per organisation whenever required

Using the KDK you can dynamically declare services to access organisation assets stored in this segregated DB.

Permissions

Organisation owners can manage member access to an organisation with a pre-defined set of permissions based on Attribute Based Access Control (ABAC), which allows to enforce authorization decisions based on any attribute accessible to the application and not just the user's role. Similarly, resource owners can manage member access to a given resource (e.g. a group).

All permissions are stored along with the user so that they are always available once authenticated. They are organised by resource types (what we call scopes). The authorisation service allow to:

  1. add, respectively remove, a set of permissions (e.g. being a owner or a manager)
  2. for a subject (i.e. a user in most case but it could be generalized)
  3. on a resource (e.g. an organisation or a group).

TIP

Under the hood the CASL module is used to manage the permissions

Domain model

The domain model is a set of high-level abstractions that describes selected aspects of a sphere of activity, it is a representation of meaningful real-world concepts pertinent to the domain that are modeled in the software. The concepts include the data involved in the business and rules the business uses in relation to that data.

The class diagram used to represent the domain model in the Unified Modeling Language (UML) is presented afterwards. The Kalisio domain model is implemented as a hybridation between objects and cross-cutting concerns within a layer that uses a lower-level layer for persistence and publishes an API to a higher-level layer to gain access to the data and behavior of the model.

Domain model

To get into the details of this model look at the persisted data model and the provided API.

- + \ No newline at end of file diff --git a/assets/guides_basics_introduction.md.add8148a.js b/assets/guides_basics_introduction.md.add8148a.js deleted file mode 100644 index b9162d425..000000000 --- a/assets/guides_basics_introduction.md.add8148a.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o as t,c as a,Q as r}from"./chunks/framework.70a39c86.js";const f=JSON.parse('{"title":"Introduction to KDK","description":"","frontmatter":{},"headers":[],"relativePath":"guides/basics/introduction.md","filePath":"guides/basics/introduction.md"}'),i={name:"guides/basics/introduction.md"},o=r('

Introduction to KDK

KDK is mainly powered by the following stack:

If you are not familiar with those technologies and want to develop with the KDK, we first recommend studying how they work. To get a deeper overview of some of the internals we also recommend you to read our technical articles on Medium:

Application template

A KDK-based application (a.k.a. kApp) usually includes a front-end side client as well as back-end services or an API gateway proxying requests to back-end services. In order to ease the development of new applications we provide you with a KDK application template called the kApp as a starting point. In this guide we will use the template as a reference when dealing with KDK-based application.

You can start your journey by running the kApp.

KDK internals

Our main module is simply called kdk, available now as a single package @kalisio/kdk. It is actually composed of two logical parts:

TIP

Although bundled together you can only use the core part without the map part, for instance our application template does not use it. Indeed, on the bakend side related services will not be allocated if the map part is not explicitely used, and on the frontend side Webpack will not bundle unused components.

WARNING

The KDK was previously available as separated modules like kCore/@kalisio/kdk-core, kMap/@kalisio/kdk-map, etc. We strongly recommend to upgrade to the latest single package as the features remain similar and development is made easier.

The KDK relies on third-party modules which not directly integrated (they can be used as standalone modules), but it might be useful to know more about them. For instance:

As a consequence, we recommend reading this articles on Medium to get a deeper overview:

',17),s=[o];function n(l,c,h,p,d,u){return t(),a("div",null,s)}const m=e(i,[["render",n]]);export{f as __pageData,m as default}; diff --git a/assets/guides_basics_introduction.md.dd1f66d1.js b/assets/guides_basics_introduction.md.dd1f66d1.js new file mode 100644 index 000000000..b0fe5b887 --- /dev/null +++ b/assets/guides_basics_introduction.md.dd1f66d1.js @@ -0,0 +1 @@ +import{_ as e,o as t,c as a,Q as r}from"./chunks/framework.70a39c86.js";const f=JSON.parse('{"title":"Introduction to KDK","description":"","frontmatter":{},"headers":[],"relativePath":"guides/basics/introduction.md","filePath":"guides/basics/introduction.md"}'),i={name:"guides/basics/introduction.md"},o=r('

Introduction to KDK

KDK is mainly powered by the following stack:

If you are not familiar with those technologies and want to develop with the KDK, we first recommend studying how they work. To get a deeper overview of some of the internals we also recommend you to read our technical articles on Medium:

Application template

A KDK-based application (a.k.a. skeleton) usually includes a front-end side client as well as back-end services or an API gateway proxying requests to back-end services. In order to ease the development of new applications we provide you with a KDK application template called the skeleton as a starting point. In this guide we will use the template as a reference when dealing with KDK-based application.

You can start your journey by running the skeleton.

KDK internals

Our main module is simply called kdk, available now as a single package @kalisio/kdk. It is actually composed of two logical parts:

TIP

Although bundled together you can only use the core part without the map part, for instance our application template does not use it. Indeed, on the bakend side related services will not be allocated if the map part is not explicitely used, and on the frontend side Webpack will not bundle unused components.

WARNING

The KDK was previously available as separated modules like kCore/@kalisio/kdk-core, kMap/@kalisio/kdk-map, etc. We strongly recommend to upgrade to the latest single package as the features remain similar and development is made easier.

The KDK relies on third-party modules which not directly integrated (they can be used as standalone modules), but it might be useful to know more about them. For instance:

As a consequence, we recommend reading this articles on Medium to get a deeper overview:

',17),s=[o];function n(l,c,h,d,p,u){return t(),a("div",null,s)}const m=e(i,[["render",n]]);export{f as __pageData,m as default}; diff --git a/assets/guides_basics_introduction.md.add8148a.lean.js b/assets/guides_basics_introduction.md.dd1f66d1.lean.js similarity index 85% rename from assets/guides_basics_introduction.md.add8148a.lean.js rename to assets/guides_basics_introduction.md.dd1f66d1.lean.js index c89de0d13..3d269c70d 100644 --- a/assets/guides_basics_introduction.md.add8148a.lean.js +++ b/assets/guides_basics_introduction.md.dd1f66d1.lean.js @@ -1 +1 @@ -import{_ as e,o as t,c as a,Q as r}from"./chunks/framework.70a39c86.js";const f=JSON.parse('{"title":"Introduction to KDK","description":"","frontmatter":{},"headers":[],"relativePath":"guides/basics/introduction.md","filePath":"guides/basics/introduction.md"}'),i={name:"guides/basics/introduction.md"},o=r("",17),s=[o];function n(l,c,h,p,d,u){return t(),a("div",null,s)}const m=e(i,[["render",n]]);export{f as __pageData,m as default}; +import{_ as e,o as t,c as a,Q as r}from"./chunks/framework.70a39c86.js";const f=JSON.parse('{"title":"Introduction to KDK","description":"","frontmatter":{},"headers":[],"relativePath":"guides/basics/introduction.md","filePath":"guides/basics/introduction.md"}'),i={name:"guides/basics/introduction.md"},o=r("",17),s=[o];function n(l,c,h,d,p,u){return t(),a("div",null,s)}const m=e(i,[["render",n]]);export{f as __pageData,m as default}; diff --git a/assets/guides_development_configure.md.7688a037.js b/assets/guides_development_configure.md.aea5d40e.js similarity index 68% rename from assets/guides_development_configure.md.7688a037.js rename to assets/guides_development_configure.md.aea5d40e.js index 2556c390f..5b1fb1377 100644 --- a/assets/guides_development_configure.md.7688a037.js +++ b/assets/guides_development_configure.md.aea5d40e.js @@ -1 +1 @@ -import{_ as t,o as a,c as r,k as e,a as o}from"./chunks/framework.70a39c86.js";const h=JSON.parse('{"title":"Configure your app","description":"","frontmatter":{},"headers":[],"relativePath":"guides/development/configure.md","filePath":"guides/development/configure.md"}'),n={name:"guides/development/configure.md"},i=e("h1",{id:"configure-your-app",tabindex:"-1"},[o("Configure your app "),e("a",{class:"header-anchor",href:"#configure-your-app","aria-label":'Permalink to "Configure your app"'},"​")],-1),s=e("p",null,[o("Please follow our "),e("a",{href:"https://kalisio.github.io/kApp/guides/development/configure.html",target:"_blank",rel:"noreferrer"},"application template configuration guide"),o(".")],-1),p=[i,s];function c(u,l,d,f,g,_){return a(),r("div",null,p)}const k=t(n,[["render",c]]);export{h as __pageData,k as default}; +import{_ as t,o as a,c as r,k as e,a as o}from"./chunks/framework.70a39c86.js";const h=JSON.parse('{"title":"Configure your app","description":"","frontmatter":{},"headers":[],"relativePath":"guides/development/configure.md","filePath":"guides/development/configure.md"}'),n={name:"guides/development/configure.md"},i=e("h1",{id:"configure-your-app",tabindex:"-1"},[o("Configure your app "),e("a",{class:"header-anchor",href:"#configure-your-app","aria-label":'Permalink to "Configure your app"'},"​")],-1),s=e("p",null,[o("Please follow our "),e("a",{href:"https://kalisio.github.io/skeleton/guides/development/configure.html",target:"_blank",rel:"noreferrer"},"application template configuration guide"),o(".")],-1),c=[i,s];function p(l,u,d,f,g,_){return a(),r("div",null,c)}const k=t(n,[["render",p]]);export{h as __pageData,k as default}; diff --git a/assets/guides_development_configure.md.7688a037.lean.js b/assets/guides_development_configure.md.aea5d40e.lean.js similarity index 68% rename from assets/guides_development_configure.md.7688a037.lean.js rename to assets/guides_development_configure.md.aea5d40e.lean.js index 2556c390f..5b1fb1377 100644 --- a/assets/guides_development_configure.md.7688a037.lean.js +++ b/assets/guides_development_configure.md.aea5d40e.lean.js @@ -1 +1 @@ -import{_ as t,o as a,c as r,k as e,a as o}from"./chunks/framework.70a39c86.js";const h=JSON.parse('{"title":"Configure your app","description":"","frontmatter":{},"headers":[],"relativePath":"guides/development/configure.md","filePath":"guides/development/configure.md"}'),n={name:"guides/development/configure.md"},i=e("h1",{id:"configure-your-app",tabindex:"-1"},[o("Configure your app "),e("a",{class:"header-anchor",href:"#configure-your-app","aria-label":'Permalink to "Configure your app"'},"​")],-1),s=e("p",null,[o("Please follow our "),e("a",{href:"https://kalisio.github.io/kApp/guides/development/configure.html",target:"_blank",rel:"noreferrer"},"application template configuration guide"),o(".")],-1),p=[i,s];function c(u,l,d,f,g,_){return a(),r("div",null,p)}const k=t(n,[["render",c]]);export{h as __pageData,k as default}; +import{_ as t,o as a,c as r,k as e,a as o}from"./chunks/framework.70a39c86.js";const h=JSON.parse('{"title":"Configure your app","description":"","frontmatter":{},"headers":[],"relativePath":"guides/development/configure.md","filePath":"guides/development/configure.md"}'),n={name:"guides/development/configure.md"},i=e("h1",{id:"configure-your-app",tabindex:"-1"},[o("Configure your app "),e("a",{class:"header-anchor",href:"#configure-your-app","aria-label":'Permalink to "Configure your app"'},"​")],-1),s=e("p",null,[o("Please follow our "),e("a",{href:"https://kalisio.github.io/skeleton/guides/development/configure.html",target:"_blank",rel:"noreferrer"},"application template configuration guide"),o(".")],-1),c=[i,s];function p(l,u,d,f,g,_){return a(),r("div",null,c)}const k=t(n,[["render",p]]);export{h as __pageData,k as default}; diff --git a/assets/guides_development_deploy.md.156ebf78.js b/assets/guides_development_deploy.md.8efae057.js similarity index 62% rename from assets/guides_development_deploy.md.156ebf78.js rename to assets/guides_development_deploy.md.8efae057.js index 0e1661a1e..a7af7f75a 100644 --- a/assets/guides_development_deploy.md.156ebf78.js +++ b/assets/guides_development_deploy.md.8efae057.js @@ -1 +1 @@ -import{_ as t,o as a,c as p,k as e,a as o}from"./chunks/framework.70a39c86.js";const f=JSON.parse('{"title":"Deploy your app","description":"","frontmatter":{},"headers":[],"relativePath":"guides/development/deploy.md","filePath":"guides/development/deploy.md"}'),l={name:"guides/development/deploy.md"},r=e("h1",{id:"deploy-your-app",tabindex:"-1"},[o("Deploy your app "),e("a",{class:"header-anchor",href:"#deploy-your-app","aria-label":'Permalink to "Deploy your app"'},"​")],-1),d=e("p",null,[o("Please follow our "),e("a",{href:"https://kalisio.github.io/kApp/guides/development/deploy.html",target:"_blank",rel:"noreferrer"},"application template deployment guide"),o(".")],-1),s=[r,d];function n(i,c,u,_,m,y){return a(),p("div",null,s)}const g=t(l,[["render",n]]);export{f as __pageData,g as default}; +import{_ as t,o as a,c as p,k as e,a as o}from"./chunks/framework.70a39c86.js";const f=JSON.parse('{"title":"Deploy your app","description":"","frontmatter":{},"headers":[],"relativePath":"guides/development/deploy.md","filePath":"guides/development/deploy.md"}'),l={name:"guides/development/deploy.md"},r=e("h1",{id:"deploy-your-app",tabindex:"-1"},[o("Deploy your app "),e("a",{class:"header-anchor",href:"#deploy-your-app","aria-label":'Permalink to "Deploy your app"'},"​")],-1),d=e("p",null,[o("Please follow our "),e("a",{href:"https://kalisio.github.io/skeleton/guides/development/deploy.html",target:"_blank",rel:"noreferrer"},"application template deployment guide"),o(".")],-1),s=[r,d];function n(i,c,u,_,m,y){return a(),p("div",null,s)}const g=t(l,[["render",n]]);export{f as __pageData,g as default}; diff --git a/assets/guides_development_deploy.md.156ebf78.lean.js b/assets/guides_development_deploy.md.8efae057.lean.js similarity index 62% rename from assets/guides_development_deploy.md.156ebf78.lean.js rename to assets/guides_development_deploy.md.8efae057.lean.js index 0e1661a1e..a7af7f75a 100644 --- a/assets/guides_development_deploy.md.156ebf78.lean.js +++ b/assets/guides_development_deploy.md.8efae057.lean.js @@ -1 +1 @@ -import{_ as t,o as a,c as p,k as e,a as o}from"./chunks/framework.70a39c86.js";const f=JSON.parse('{"title":"Deploy your app","description":"","frontmatter":{},"headers":[],"relativePath":"guides/development/deploy.md","filePath":"guides/development/deploy.md"}'),l={name:"guides/development/deploy.md"},r=e("h1",{id:"deploy-your-app",tabindex:"-1"},[o("Deploy your app "),e("a",{class:"header-anchor",href:"#deploy-your-app","aria-label":'Permalink to "Deploy your app"'},"​")],-1),d=e("p",null,[o("Please follow our "),e("a",{href:"https://kalisio.github.io/kApp/guides/development/deploy.html",target:"_blank",rel:"noreferrer"},"application template deployment guide"),o(".")],-1),s=[r,d];function n(i,c,u,_,m,y){return a(),p("div",null,s)}const g=t(l,[["render",n]]);export{f as __pageData,g as default}; +import{_ as t,o as a,c as p,k as e,a as o}from"./chunks/framework.70a39c86.js";const f=JSON.parse('{"title":"Deploy your app","description":"","frontmatter":{},"headers":[],"relativePath":"guides/development/deploy.md","filePath":"guides/development/deploy.md"}'),l={name:"guides/development/deploy.md"},r=e("h1",{id:"deploy-your-app",tabindex:"-1"},[o("Deploy your app "),e("a",{class:"header-anchor",href:"#deploy-your-app","aria-label":'Permalink to "Deploy your app"'},"​")],-1),d=e("p",null,[o("Please follow our "),e("a",{href:"https://kalisio.github.io/skeleton/guides/development/deploy.html",target:"_blank",rel:"noreferrer"},"application template deployment guide"),o(".")],-1),s=[r,d];function n(i,c,u,_,m,y){return a(),p("div",null,s)}const g=t(l,[["render",n]]);export{f as __pageData,g as default}; diff --git a/assets/guides_development_develop.md.6421e930.js b/assets/guides_development_develop.md.78c86703.js similarity index 92% rename from assets/guides_development_develop.md.6421e930.js rename to assets/guides_development_develop.md.78c86703.js index aea01f3b5..bb7a74e01 100644 --- a/assets/guides_development_develop.md.6421e930.js +++ b/assets/guides_development_develop.md.78c86703.js @@ -4,4 +4,4 @@ import{_ as a,o as e,c as s,Q as n}from"./chunks/framework.70a39c86.js";const g= yarn install yarn link

Linting the code

The KDK relies on JavaScript standard style.

To lint the code:

bash
$yarn lint
$yarn lint

You can also lint each of the submodules independently using the following commands:

bash
$yarn lint:core   # lint the core part
 $yarn lint:map    # lint the map part
$yarn lint:core   # lint the core part
-$yarn lint:map    # lint the map part

:::

Web app

Please follow our application template development guide.

`,12),o=[t];function p(r,i,c,d,h,y){return e(),s("div",null,o)}const m=a(l,[["render",p]]);export{g as __pageData,m as default}; +$yarn lint:map # lint the map part

:::

Web app

Please follow our application template development guide.

`,12),o=[t];function p(r,i,c,d,h,y){return e(),s("div",null,o)}const m=a(l,[["render",p]]);export{g as __pageData,m as default}; diff --git a/assets/guides_development_develop.md.6421e930.lean.js b/assets/guides_development_develop.md.78c86703.lean.js similarity index 100% rename from assets/guides_development_develop.md.6421e930.lean.js rename to assets/guides_development_develop.md.78c86703.lean.js diff --git a/assets/guides_development_publish.md.e5a98895.js b/assets/guides_development_publish.md.56537144.js similarity index 90% rename from assets/guides_development_publish.md.e5a98895.js rename to assets/guides_development_publish.md.56537144.js index 1b932befa..43f3744d0 100644 --- a/assets/guides_development_publish.md.e5a98895.js +++ b/assets/guides_development_publish.md.56537144.js @@ -1 +1 @@ -import{_ as e,o as a,c as o,Q as s}from"./chunks/framework.70a39c86.js";const b=JSON.parse('{"title":"Publish with KDK","description":"","frontmatter":{},"headers":[],"relativePath":"guides/development/publish.md","filePath":"guides/development/publish.md"}'),t={name:"guides/development/publish.md"},i=s('

Publish with KDK

The same process applies when releasing a patch, minor or major version of the KDK and third-party Kalisio modules, i.e. the following tasks are done automatically on release:

  1. increase the package version number in the package.json file (frontend and backend API)
  2. publish the module on the NPM registry
  3. create a tag accordingly in the git repository and push it

TIP

Kalisio maintained modules are published under the @kalisio namespace in NPM, e.g. kdk NPM package is named @kalisio/kdk, but you are free to use another one for your own modules.

WARNING

This requires you to have a NPM and GitHub account and be a team member of the namespace organization, if you'd like to become a maintainer of Kalisio maintained modules please tell us.

Depending on the release type the following command will do the job (where type is either patch, minor, major):

bash
npm run release:type
npm run release:type

WARNING

Before you publish a module take care of updating the version of your dependent modules to the latest version published, for example perform yarn upgrade xxx for a module depending on the xxx module before publishing it

Web app

Almost the same process applies as for the modules except the app is not published on the NPM registry but in the Docker Hub. However, the process is less automated to ensure more flexibility so that the build artefacts of the different flavors can be managed independently.

Please follow our application template publishing guide.

',11),l=[i];function n(p,r,d,c,h,u){return a(),o("div",null,l)}const g=e(t,[["render",n]]);export{b as __pageData,g as default}; +import{_ as e,o as a,c as o,Q as s}from"./chunks/framework.70a39c86.js";const b=JSON.parse('{"title":"Publish with KDK","description":"","frontmatter":{},"headers":[],"relativePath":"guides/development/publish.md","filePath":"guides/development/publish.md"}'),t={name:"guides/development/publish.md"},i=s('

Publish with KDK

The same process applies when releasing a patch, minor or major version of the KDK and third-party Kalisio modules, i.e. the following tasks are done automatically on release:

  1. increase the package version number in the package.json file (frontend and backend API)
  2. publish the module on the NPM registry
  3. create a tag accordingly in the git repository and push it

TIP

Kalisio maintained modules are published under the @kalisio namespace in NPM, e.g. kdk NPM package is named @kalisio/kdk, but you are free to use another one for your own modules.

WARNING

This requires you to have a NPM and GitHub account and be a team member of the namespace organization, if you'd like to become a maintainer of Kalisio maintained modules please tell us.

Depending on the release type the following command will do the job (where type is either patch, minor, major):

bash
npm run release:type
npm run release:type

WARNING

Before you publish a module take care of updating the version of your dependent modules to the latest version published, for example perform yarn upgrade xxx for a module depending on the xxx module before publishing it

Web app

Almost the same process applies as for the modules except the app is not published on the NPM registry but in the Docker Hub. However, the process is less automated to ensure more flexibility so that the build artefacts of the different flavors can be managed independently.

Please follow our application template publishing guide.

',11),l=[i];function n(p,r,d,c,h,u){return a(),o("div",null,l)}const g=e(t,[["render",n]]);export{b as __pageData,g as default}; diff --git a/assets/guides_development_publish.md.e5a98895.lean.js b/assets/guides_development_publish.md.56537144.lean.js similarity index 100% rename from assets/guides_development_publish.md.e5a98895.lean.js rename to assets/guides_development_publish.md.56537144.lean.js diff --git a/assets/guides_development_setup.md.cd760145.js b/assets/guides_development_setup.md.bf15646e.js similarity index 94% rename from assets/guides_development_setup.md.cd760145.js rename to assets/guides_development_setup.md.bf15646e.js index 6aceb1fd8..44a4e444b 100644 --- a/assets/guides_development_setup.md.cd760145.js +++ b/assets/guides_development_setup.md.bf15646e.js @@ -1 +1 @@ -import{_ as e,o as t,c as a,Q as r}from"./chunks/framework.70a39c86.js";const g=JSON.parse('{"title":"Setup your environment","description":"","frontmatter":{},"headers":[],"relativePath":"guides/development/setup.md","filePath":"guides/development/setup.md"}'),o={name:"guides/development/setup.md"},n=r('

Setup your environment

Prerequisites

Install Node.js

Node is a server platform which runs JavaScript. It's lightweight and efficient. It has the largest ecosystem of open source libraries in the world.

WARNING

At the time of writing the KDK modules v2.x (master branch) are expected to work with Node.js 16.x and KDK modules v1.x are expected to work with Node.js 12.x

TIP

In order to be able to switch easily between different versions of Node.js we recommand to use a version manager like n/nvm under Linux/Mac or nvm under Windows.

Install Git

git is the version control system most frequently used in open source. There are many resources available for installing it.

TIP

Under Windows we recommand using Tortoise Git and to set the autocrlf flag in settings.

Install MongoDB

Mongo is an open-source, document database designed for ease of development and scaling.

WARNING

At the time of writing the KDK modules v2.x (master branch) are expected to work with MongoDB 4.x and KDK modules v1.x are expected to work with MongoDB 3.x

TIP

We recommand using Compass as a GUI for MongoDB, Robo 37 is also a good choice.

Install Yarn

Due to some changes in the way npm manages linked modules we prefer to use Yarn as a package manager.

Install Yarn on your platform.

Web app

Please follow our application template installation from source code guide.

',21),l=[n];function s(i,c,d,p,h,m){return t(),a("div",null,l)}const f=e(o,[["render",s]]);export{g as __pageData,f as default}; +import{_ as e,o as t,c as a,Q as r}from"./chunks/framework.70a39c86.js";const g=JSON.parse('{"title":"Setup your environment","description":"","frontmatter":{},"headers":[],"relativePath":"guides/development/setup.md","filePath":"guides/development/setup.md"}'),o={name:"guides/development/setup.md"},n=r('

Setup your environment

Prerequisites

Install Node.js

Node is a server platform which runs JavaScript. It's lightweight and efficient. It has the largest ecosystem of open source libraries in the world.

WARNING

At the time of writing the KDK modules v2.x (master branch) are expected to work with Node.js 16.x and KDK modules v1.x are expected to work with Node.js 12.x

TIP

In order to be able to switch easily between different versions of Node.js we recommand to use a version manager like n/nvm under Linux/Mac or nvm under Windows.

Install Git

git is the version control system most frequently used in open source. There are many resources available for installing it.

TIP

Under Windows we recommand using Tortoise Git and to set the autocrlf flag in settings.

Install MongoDB

Mongo is an open-source, document database designed for ease of development and scaling.

WARNING

At the time of writing the KDK modules v2.x (master branch) are expected to work with MongoDB 4.x and KDK modules v1.x are expected to work with MongoDB 3.x

TIP

We recommand using Compass as a GUI for MongoDB, Robo 37 is also a good choice.

Install Yarn

Due to some changes in the way npm manages linked modules we prefer to use Yarn as a package manager.

Install Yarn on your platform.

Web app

Please follow our application template installation from source code guide.

',21),l=[n];function s(i,c,d,h,p,m){return t(),a("div",null,l)}const f=e(o,[["render",s]]);export{g as __pageData,f as default}; diff --git a/assets/guides_development_setup.md.cd760145.lean.js b/assets/guides_development_setup.md.bf15646e.lean.js similarity index 85% rename from assets/guides_development_setup.md.cd760145.lean.js rename to assets/guides_development_setup.md.bf15646e.lean.js index 452f58491..1b65ff839 100644 --- a/assets/guides_development_setup.md.cd760145.lean.js +++ b/assets/guides_development_setup.md.bf15646e.lean.js @@ -1 +1 @@ -import{_ as e,o as t,c as a,Q as r}from"./chunks/framework.70a39c86.js";const g=JSON.parse('{"title":"Setup your environment","description":"","frontmatter":{},"headers":[],"relativePath":"guides/development/setup.md","filePath":"guides/development/setup.md"}'),o={name:"guides/development/setup.md"},n=r("",21),l=[n];function s(i,c,d,p,h,m){return t(),a("div",null,l)}const f=e(o,[["render",s]]);export{g as __pageData,f as default}; +import{_ as e,o as t,c as a,Q as r}from"./chunks/framework.70a39c86.js";const g=JSON.parse('{"title":"Setup your environment","description":"","frontmatter":{},"headers":[],"relativePath":"guides/development/setup.md","filePath":"guides/development/setup.md"}'),o={name:"guides/development/setup.md"},n=r("",21),l=[n];function s(i,c,d,h,p,m){return t(),a("div",null,l)}const f=e(o,[["render",s]]);export{g as __pageData,f as default}; diff --git a/assets/guides_development_test.md.3df91803.js b/assets/guides_development_test.md.5d69d9de.js similarity index 92% rename from assets/guides_development_test.md.3df91803.js rename to assets/guides_development_test.md.5d69d9de.js index f51a5651f..3ca641973 100644 --- a/assets/guides_development_test.md.3df91803.js +++ b/assets/guides_development_test.md.5d69d9de.js @@ -1,3 +1,3 @@ import{_ as e,o as s,c as t,Q as a}from"./chunks/framework.70a39c86.js";const g=JSON.parse('{"title":"Testing with KDK","description":"","frontmatter":{},"headers":[],"relativePath":"guides/development/test.md","filePath":"guides/development/test.md"}'),o={name:"guides/development/test.md"},n=a(`

Testing with KDK

The KDK relies on the Mocha testing framework and the Chai assertion library.

KDK and third-party Kalisio modules are Feathers modules, so you will find most of the required information in the linked Feathers documentation.

To run the module tests including linting and coverage : $ yarn test

To speed-up things simply run the tests with: $ yarn mocha

You can run the tests of each submodule independently using the following commands for the KDK:

bash
$yarn mocha:core   # test the core module
 $yarn mocha:map    # test the map module
$yarn mocha:core   # test the core module
-$yarn mocha:map    # test the map module

TIP

If you need to perform some specific tests, you can use the -g or --grep option of the mocha command:

bash
$yarn mocha:core -g "core:team" # run the team tests
$yarn mocha:core -g "core:team" # run the team tests

Web app

Please follow our application template testing guide.

`,10),r=[n];function p(l,c,i,d,h,m){return s(),t("div",null,r)}const y=e(o,[["render",p]]);export{g as __pageData,y as default}; +$yarn mocha:map # test the map module

TIP

If you need to perform some specific tests, you can use the -g or --grep option of the mocha command:

bash
$yarn mocha:core -g "core:team" # run the team tests
$yarn mocha:core -g "core:team" # run the team tests

Web app

Please follow our application template testing guide.

`,10),r=[n];function p(l,c,i,d,h,m){return s(),t("div",null,r)}const y=e(o,[["render",p]]);export{g as __pageData,y as default}; diff --git a/assets/guides_development_test.md.3df91803.lean.js b/assets/guides_development_test.md.5d69d9de.lean.js similarity index 100% rename from assets/guides_development_test.md.3df91803.lean.js rename to assets/guides_development_test.md.5d69d9de.lean.js diff --git a/guides/basics/introduction.html b/guides/basics/introduction.html index 07a6e11c9..9d3c0b2a8 100644 --- a/guides/basics/introduction.html +++ b/guides/basics/introduction.html @@ -32,15 +32,15 @@ - + -
Skip to content

Introduction to KDK

KDK is mainly powered by the following stack:

If you are not familiar with those technologies and want to develop with the KDK, we first recommend studying how they work. To get a deeper overview of some of the internals we also recommend you to read our technical articles on Medium:

Application template

A KDK-based application (a.k.a. kApp) usually includes a front-end side client as well as back-end services or an API gateway proxying requests to back-end services. In order to ease the development of new applications we provide you with a KDK application template called the kApp as a starting point. In this guide we will use the template as a reference when dealing with KDK-based application.

You can start your journey by running the kApp.

KDK internals

Our main module is simply called kdk, available now as a single package @kalisio/kdk. It is actually composed of two logical parts:

  • core containing basic application services and components
  • map containing required services and components to build geospatial applications

TIP

Although bundled together you can only use the core part without the map part, for instance our application template does not use it. Indeed, on the bakend side related services will not be allocated if the map part is not explicitely used, and on the frontend side Webpack will not bundle unused components.

WARNING

The KDK was previously available as separated modules like kCore/@kalisio/kdk-core, kMap/@kalisio/kdk-map, etc. We strongly recommend to upgrade to the latest single package as the features remain similar and development is made easier.

The KDK relies on third-party modules which not directly integrated (they can be used as standalone modules), but it might be useful to know more about them. For instance:

As a consequence, we recommend reading this articles on Medium to get a deeper overview:

- +
Skip to content

Introduction to KDK

KDK is mainly powered by the following stack:

If you are not familiar with those technologies and want to develop with the KDK, we first recommend studying how they work. To get a deeper overview of some of the internals we also recommend you to read our technical articles on Medium:

Application template

A KDK-based application (a.k.a. skeleton) usually includes a front-end side client as well as back-end services or an API gateway proxying requests to back-end services. In order to ease the development of new applications we provide you with a KDK application template called the skeleton as a starting point. In this guide we will use the template as a reference when dealing with KDK-based application.

You can start your journey by running the skeleton.

KDK internals

Our main module is simply called kdk, available now as a single package @kalisio/kdk. It is actually composed of two logical parts:

  • core containing basic application services and components
  • map containing required services and components to build geospatial applications

TIP

Although bundled together you can only use the core part without the map part, for instance our application template does not use it. Indeed, on the bakend side related services will not be allocated if the map part is not explicitely used, and on the frontend side Webpack will not bundle unused components.

WARNING

The KDK was previously available as separated modules like kCore/@kalisio/kdk-core, kMap/@kalisio/kdk-map, etc. We strongly recommend to upgrade to the latest single package as the features remain similar and development is made easier.

The KDK relies on third-party modules which not directly integrated (they can be used as standalone modules), but it might be useful to know more about them. For instance:

As a consequence, we recommend reading this articles on Medium to get a deeper overview:

+ \ No newline at end of file diff --git a/guides/development/configure.html b/guides/development/configure.html index f8907f4f3..33e013d1a 100644 --- a/guides/development/configure.html +++ b/guides/development/configure.html @@ -32,15 +32,15 @@ - + -
Skip to content
- +
Skip to content
+ \ No newline at end of file diff --git a/guides/development/deploy.html b/guides/development/deploy.html index 5b31bac4e..6088f5338 100644 --- a/guides/development/deploy.html +++ b/guides/development/deploy.html @@ -32,15 +32,15 @@ - + -
Skip to content
- +
Skip to content
+ \ No newline at end of file diff --git a/guides/development/develop.html b/guides/development/develop.html index bf8645c9d..5afa03dc5 100644 --- a/guides/development/develop.html +++ b/guides/development/develop.html @@ -32,7 +32,7 @@ - + @@ -45,8 +45,8 @@ yarn install yarn link

Linting the code

The KDK relies on JavaScript standard style.

To lint the code:

bash
$yarn lint
$yarn lint

You can also lint each of the submodules independently using the following commands:

bash
$yarn lint:core   # lint the core part
 $yarn lint:map    # lint the map part
$yarn lint:core   # lint the core part
-$yarn lint:map    # lint the map part

:::

Web app

Please follow our application template development guide.

- +$yarn lint:map # lint the map part

:::

Web app

Please follow our application template development guide.

+ \ No newline at end of file diff --git a/guides/development/publish.html b/guides/development/publish.html index 28c10fb30..e910d98cc 100644 --- a/guides/development/publish.html +++ b/guides/development/publish.html @@ -32,15 +32,15 @@ - + -
Skip to content

Publish with KDK

The same process applies when releasing a patch, minor or major version of the KDK and third-party Kalisio modules, i.e. the following tasks are done automatically on release:

  1. increase the package version number in the package.json file (frontend and backend API)
  2. publish the module on the NPM registry
  3. create a tag accordingly in the git repository and push it

TIP

Kalisio maintained modules are published under the @kalisio namespace in NPM, e.g. kdk NPM package is named @kalisio/kdk, but you are free to use another one for your own modules.

WARNING

This requires you to have a NPM and GitHub account and be a team member of the namespace organization, if you'd like to become a maintainer of Kalisio maintained modules please tell us.

Depending on the release type the following command will do the job (where type is either patch, minor, major):

bash
npm run release:type
npm run release:type

WARNING

Before you publish a module take care of updating the version of your dependent modules to the latest version published, for example perform yarn upgrade xxx for a module depending on the xxx module before publishing it

Web app

Almost the same process applies as for the modules except the app is not published on the NPM registry but in the Docker Hub. However, the process is less automated to ensure more flexibility so that the build artefacts of the different flavors can be managed independently.

Please follow our application template publishing guide.

- +
Skip to content

Publish with KDK

The same process applies when releasing a patch, minor or major version of the KDK and third-party Kalisio modules, i.e. the following tasks are done automatically on release:

  1. increase the package version number in the package.json file (frontend and backend API)
  2. publish the module on the NPM registry
  3. create a tag accordingly in the git repository and push it

TIP

Kalisio maintained modules are published under the @kalisio namespace in NPM, e.g. kdk NPM package is named @kalisio/kdk, but you are free to use another one for your own modules.

WARNING

This requires you to have a NPM and GitHub account and be a team member of the namespace organization, if you'd like to become a maintainer of Kalisio maintained modules please tell us.

Depending on the release type the following command will do the job (where type is either patch, minor, major):

bash
npm run release:type
npm run release:type

WARNING

Before you publish a module take care of updating the version of your dependent modules to the latest version published, for example perform yarn upgrade xxx for a module depending on the xxx module before publishing it

Web app

Almost the same process applies as for the modules except the app is not published on the NPM registry but in the Docker Hub. However, the process is less automated to ensure more flexibility so that the build artefacts of the different flavors can be managed independently.

Please follow our application template publishing guide.

+ \ No newline at end of file diff --git a/guides/development/setup.html b/guides/development/setup.html index 26e492951..b6bb831af 100644 --- a/guides/development/setup.html +++ b/guides/development/setup.html @@ -32,15 +32,15 @@ - + -
Skip to content

Setup your environment

Prerequisites

Install Node.js

Node is a server platform which runs JavaScript. It's lightweight and efficient. It has the largest ecosystem of open source libraries in the world.

WARNING

At the time of writing the KDK modules v2.x (master branch) are expected to work with Node.js 16.x and KDK modules v1.x are expected to work with Node.js 12.x

TIP

In order to be able to switch easily between different versions of Node.js we recommand to use a version manager like n/nvm under Linux/Mac or nvm under Windows.

Install Git

git is the version control system most frequently used in open source. There are many resources available for installing it.

TIP

Under Windows we recommand using Tortoise Git and to set the autocrlf flag in settings.

Install MongoDB

Mongo is an open-source, document database designed for ease of development and scaling.

WARNING

At the time of writing the KDK modules v2.x (master branch) are expected to work with MongoDB 4.x and KDK modules v1.x are expected to work with MongoDB 3.x

TIP

We recommand using Compass as a GUI for MongoDB, Robo 37 is also a good choice.

Install Yarn

Due to some changes in the way npm manages linked modules we prefer to use Yarn as a package manager.

Install Yarn on your platform.

Web app

Please follow our application template installation from source code guide.

- +
Skip to content

Setup your environment

Prerequisites

Install Node.js

Node is a server platform which runs JavaScript. It's lightweight and efficient. It has the largest ecosystem of open source libraries in the world.

WARNING

At the time of writing the KDK modules v2.x (master branch) are expected to work with Node.js 16.x and KDK modules v1.x are expected to work with Node.js 12.x

TIP

In order to be able to switch easily between different versions of Node.js we recommand to use a version manager like n/nvm under Linux/Mac or nvm under Windows.

Install Git

git is the version control system most frequently used in open source. There are many resources available for installing it.

TIP

Under Windows we recommand using Tortoise Git and to set the autocrlf flag in settings.

Install MongoDB

Mongo is an open-source, document database designed for ease of development and scaling.

WARNING

At the time of writing the KDK modules v2.x (master branch) are expected to work with MongoDB 4.x and KDK modules v1.x are expected to work with MongoDB 3.x

TIP

We recommand using Compass as a GUI for MongoDB, Robo 37 is also a good choice.

Install Yarn

Due to some changes in the way npm manages linked modules we prefer to use Yarn as a package manager.

Install Yarn on your platform.

Web app

Please follow our application template installation from source code guide.

+ \ No newline at end of file diff --git a/guides/development/test.html b/guides/development/test.html index cfdcefd1d..41b777910 100644 --- a/guides/development/test.html +++ b/guides/development/test.html @@ -32,7 +32,7 @@ - + @@ -41,8 +41,8 @@
Skip to content

Testing with KDK

The KDK relies on the Mocha testing framework and the Chai assertion library.

KDK and third-party Kalisio modules are Feathers modules, so you will find most of the required information in the linked Feathers documentation.

To run the module tests including linting and coverage : $ yarn test

To speed-up things simply run the tests with: $ yarn mocha

You can run the tests of each submodule independently using the following commands for the KDK:

bash
$yarn mocha:core   # test the core module
 $yarn mocha:map    # test the map module
$yarn mocha:core   # test the core module
-$yarn mocha:map    # test the map module

TIP

If you need to perform some specific tests, you can use the -g or --grep option of the mocha command:

bash
$yarn mocha:core -g "core:team" # run the team tests
$yarn mocha:core -g "core:team" # run the team tests

Web app

Please follow our application template testing guide.

- +$yarn mocha:map # test the map module

TIP

If you need to perform some specific tests, you can use the -g or --grep option of the mocha command:

bash
$yarn mocha:core -g "core:team" # run the team tests
$yarn mocha:core -g "core:team" # run the team tests

Web app

Please follow our application template testing guide.

+ \ No newline at end of file diff --git a/guides/introduction.html b/guides/introduction.html index 730b388fe..978b61137 100644 --- a/guides/introduction.html +++ b/guides/introduction.html @@ -40,7 +40,7 @@
Skip to content

Guides

The Basics

The goal of this guide is to get you to the "A-ha!" moment as efficiently as possible. You will learn more about the underlying technological stack and how to deploy your first KDK app.

Development

In these guides you will learn step-by-step how the setup your development environment. You'll also learn how to create, develop and publish your own app and modules, which is also how we develop the KDK.

- + \ No newline at end of file diff --git a/hashmap.json b/hashmap.json index aeea89f15..7d37c37b0 100644 --- a/hashmap.json +++ b/hashmap.json @@ -1 +1 @@ -{"about_contact.md":"1380241d","about_contributing.md":"b84a75ce","tips_mobile-configuration.md":"3df82590","api_map_globe-mixins.md":"d3301eb0","api_map_hooks.md":"39132754","api_map_introduction.md":"237ef1f2","api_map_map-mixins.md":"8c396476","api_map_mixins.md":"8a477568","api_map_services.md":"11da6d57","architecture_component-view.md":"36feb425","architecture_data-model-view.md":"28ceaa18","guides_basics_introduction.md":"add8148a","guides_development_configure.md":"7688a037","guides_development_deploy.md":"156ebf78","guides_development_develop.md":"6421e930","guides_development_publish.md":"e5a98895","guides_development_setup.md":"cd760145","guides_introduction.md":"881f2716","index.md":"f7c86556","tips_introduction.md":"b1bb4966","tips_app-development.md":"eeb6f84e","guides_development_test.md":"3df91803","tools_documentation.md":"7c698f3f","architecture_introduction.md":"585ae33b","architecture_main-concepts.md":"53491173","architecture_global-architecture.md":"2e0fa195","tools_introduction.md":"94e34eab","about_introduction.md":"d4b7911f","about_license.md":"bb6fb7fa","about_roadmap.md":"d3c0c01a","api_core_application.md":"8d1c4bf9","api_core_components.md":"aa0faaad","api_core_hooks.md":"8a3a72ed","api_core_introduction.md":"04e59c7f","api_core_mixins.md":"b331782e","api_core_services.md":"7bed4f2e","api_introduction.md":"b47393e6","api_map_components.md":"8ff8f693","tools_browsers.md":"c5b780c0","tools_cli.md":"89bf136c","tools_db.md":"69d39df2","tools_infrastructure.md":"39b46f36"} +{"about_roadmap.md":"d3c0c01a","about_contact.md":"1380241d","about_license.md":"bb6fb7fa","tools_introduction.md":"94e34eab","about_contributing.md":"b84a75ce","about_introduction.md":"d4b7911f","api_core_application.md":"8d1c4bf9","api_core_components.md":"aa0faaad","api_core_hooks.md":"8a3a72ed","api_core_introduction.md":"04e59c7f","api_core_mixins.md":"b331782e","api_core_services.md":"7bed4f2e","api_introduction.md":"b47393e6","api_map_components.md":"8ff8f693","api_map_globe-mixins.md":"d3301eb0","api_map_hooks.md":"39132754","api_map_introduction.md":"237ef1f2","api_map_map-mixins.md":"8c396476","api_map_mixins.md":"8a477568","api_map_services.md":"11da6d57","architecture_component-view.md":"36feb425","architecture_data-model-view.md":"28ceaa18","architecture_global-architecture.md":"2e0fa195","architecture_introduction.md":"585ae33b","architecture_main-concepts.md":"53491173","guides_basics_introduction.md":"dd1f66d1","guides_development_configure.md":"aea5d40e","guides_development_deploy.md":"8efae057","guides_development_develop.md":"78c86703","guides_development_publish.md":"56537144","guides_development_setup.md":"bf15646e","guides_development_test.md":"5d69d9de","guides_introduction.md":"881f2716","index.md":"f7c86556","tips_app-development.md":"eeb6f84e","tips_introduction.md":"b1bb4966","tips_mobile-configuration.md":"3df82590","tools_browsers.md":"c5b780c0","tools_cli.md":"89bf136c","tools_db.md":"69d39df2","tools_documentation.md":"7c698f3f","tools_infrastructure.md":"39b46f36"} diff --git a/index.html b/index.html index 7defefb56..5762bc5db 100644 --- a/index.html +++ b/index.html @@ -40,7 +40,7 @@
Skip to content

KDK

The Kalisio Development Kit

kalisio-kdk
- + \ No newline at end of file diff --git a/tips/app-development.html b/tips/app-development.html index f201ba8e6..8c17c893d 100644 --- a/tips/app-development.html +++ b/tips/app-development.html @@ -72,7 +72,7 @@ // Monitor messages > SUBSCRIBE feathers-sync Reading messages... - + \ No newline at end of file diff --git a/tips/introduction.html b/tips/introduction.html index a53d846d1..7ed15a8f2 100644 --- a/tips/introduction.html +++ b/tips/introduction.html @@ -40,7 +40,7 @@
Skip to content

Tips

In this section we’ll share different tips that you can help you developing with the KDK.

Application development

Useful tips when developing.

Mobile configuration

Usefuld tips to configure the mobile applications.

- + \ No newline at end of file diff --git a/tips/mobile-configuration.html b/tips/mobile-configuration.html index 22e662a24..3c78c27cf 100644 --- a/tips/mobile-configuration.html +++ b/tips/mobile-configuration.html @@ -66,7 +66,7 @@ openssl pkcs12 -in ios-dev.p12 -nodes -passin pass:password | openssl x509 -noout -subject
openssl x509 -in ios-dev.cer -inform der -text
 // p12 file
 openssl pkcs12 -in ios-dev.p12 -nodes -passin pass:password | openssl x509 -noout -subject
- + \ No newline at end of file diff --git a/tools/browsers.html b/tools/browsers.html index cce4df48d..8ed301270 100644 --- a/tools/browsers.html +++ b/tools/browsers.html @@ -40,7 +40,7 @@
Skip to content
- + \ No newline at end of file diff --git a/tools/cli.html b/tools/cli.html index 1808519cf..b10a90a72 100644 --- a/tools/cli.html +++ b/tools/cli.html @@ -148,7 +148,7 @@ $ travis encrypt-file ssh.pem

Add the output to your build script:

bash
before_install:
   - openssl aes-256-cbc -K $encrypted_12c8071d2874_key -iv $encrypted_12c8071d2874_iv -in ssh.pem.enc -out ssh.pem -d
before_install:
   - openssl aes-256-cbc -K $encrypted_12c8071d2874_key -iv $encrypted_12c8071d2874_iv -in ssh.pem.enc -out ssh.pem -d
- + \ No newline at end of file diff --git a/tools/db.html b/tools/db.html index b23761415..bb00c3099 100644 --- a/tools/db.html +++ b/tools/db.html @@ -40,7 +40,7 @@
Skip to content

Database tools

MongoDB

GUI

As it offers a similar user experience than Mongo Atlas we prefer to use Compass.

We previously also used Robo 3T.

Useful commands

Export a given collection from a given DB using a query in a JSON file: mongoexport -d krawler-test -c world_cities_csv -q "{ 'properties.country': 'France' }" --jsonArray --out file.json

Export a given collection from a given DB using a query in a CSV file: mongoexport -d krawler-test -c world_cities_csv -q "{ 'properties.country': 'France' }" --type csv --fields properties.country,properties.pop --out file.csv

- + \ No newline at end of file diff --git a/tools/documentation.html b/tools/documentation.html index 4f84d6778..579d4afd8 100644 --- a/tools/documentation.html +++ b/tools/documentation.html @@ -364,7 +364,7 @@ keep-history: true on: branch: master

TIP

You must set the secure variable GITHUB_TOKEN in your Travis CI project settings

Working with diagrams

We use two distinct tools to work with diagrams:

To be able to include the diagrams within the documentation, we adopted the following methodology:

Draw.io

  1. make it with draw.io and store it in this folder
  2. export it as SVG/PNG in the root assets folder
  3. reference it in the documentation using a link like this ![My legend](https://raw.githubusercontent.com/kalisio/kdk/master/images/my-diagram.png)

mermaid

  1. install the mermaid CLI
  2. start from the hooks diagram template file
  3. output the SVG/PNG file in the root assets folder using mmdc -i ./my-hooks-diagram.mmd -t neutral -b transparent -o my-hooks-diagram.svg
  4. reference it in the documentation using a link like this ![My legend](https://raw.githubusercontent.com/kalisio/kdk/master/images/my-diagram.png)

The template looks like this: Hooks Diagram Template

- + \ No newline at end of file diff --git a/tools/infrastructure.html b/tools/infrastructure.html index 3a43856a8..ddc1bba93 100644 --- a/tools/infrastructure.html +++ b/tools/infrastructure.html @@ -60,7 +60,7 @@ docker-compose up ...

Check why a swarm service did not start (empty logs, no replica):

bash
docker service ps --no-trunc {serviceName}
docker service ps --no-trunc {serviceName}

To access host in Docker Desktop Edition on Windows or Mac use the special DNS name host.docker.internal.

Traefik

Extract access logs for a given date time: cat access.log | grep "10/Mar/2020:02" > access-10-03-2020-03.log Check access logs for a given HTTP error code: cat access.log | grep "1.0\" 404" or cat access.log | grep "2.0\" 404" Gzip access logs: gzip -c access.log > access.log.gz

Scaleway

A step-by-step configuration of a new server with Docker and a single logical volume.

Networking

List all running ssh sessions: netstat -tnpa | grep 'ESTABLISHED.*sshd'

List all ssh session attempts: cat /var/log/auth.log

Development domains

Some development tasks like OAuth2 authentication have strict security concerns so that you cannot use localhost, non-standard ports or need to enforce HTTPS in all URLs. Here is how to setup a "fake" domain on your host.

Let's say we have our app running on localhost:8080 in HTTP or localhost:8083 in HTTPS. First, edit the hosts file (/etc/hosts under Linux or C:\Windows\System32\drivers\etc\hosts under Windows) and add this line to redirect the domain to local host:

127.0.0.1 test.airbusoidc.com
127.0.0.1 test.airbusoidc.com

Then, since the hosts file does not allow to manage port redirections we need to do so using the operating system network tools.

Windows

To see what is currently running:

bash
netstat -a -n -p TCP | grep "LISTENING"
netstat -a -n -p TCP | grep "LISTENING"

To add port redirection for HTTP:

bash
netsh interface portproxy add v4tov4 listenport=80 listenaddress=127.0.0.1 connectport=8080 connectaddress=127.0.0.1
netsh interface portproxy add v4tov4 listenport=80 listenaddress=127.0.0.1 connectport=8080 connectaddress=127.0.0.1

To add port redirection for HTTPS:

bash
netsh interface portproxy add v4tov4 listenport=443 listenaddress=127.0.0.1 connectport=8083 connectaddress=127.0.0.1
netsh interface portproxy add v4tov4 listenport=443 listenaddress=127.0.0.1 connectport=8083 connectaddress=127.0.0.1

To see running proxied port:

bash
netsh interface portproxy show v4tov4
netsh interface portproxy show v4tov4

To see remove proxied port:

bash
netsh interface portproxy delete v4tov4 listenport=80 listenaddress=127.0.0.1
netsh interface portproxy delete v4tov4 listenport=80 listenaddress=127.0.0.1

Linux

First enable port redirection:

bash
echo "1" > /proc/sys/net/ipv4/ip_forward
echo "1" > /proc/sys/net/ipv4/ip_forward

Then add port redirect:

bash
iptables -t nat -A PREROUTING -s 127.0.0.1 -p tcp --dport 80 -j REDIRECT --to 8080`
 iptables -t nat -A OUTPUT -s 127.0.0.1 -p tcp --dport 80 -j REDIRECT --to 8080`
iptables -t nat -A PREROUTING -s 127.0.0.1 -p tcp --dport 80 -j REDIRECT --to 8080`
 iptables -t nat -A OUTPUT -s 127.0.0.1 -p tcp --dport 80 -j REDIRECT --to 8080`

To remove simply replace in the previous command the -D switch instead of the -A switch.

- + \ No newline at end of file diff --git a/tools/introduction.html b/tools/introduction.html index 60fb8ab98..6042f8710 100644 --- a/tools/introduction.html +++ b/tools/introduction.html @@ -40,7 +40,7 @@
Skip to content

Tools

At Kalisio we are using a large number of different tools to support application development and data generation.

CLI

Useful command line tools.

Browsers

Useful browser-based tools.

Databases

Useful tools to manage databases.

Infrastructure

Useful infrastructure tips and tools.

Documentation

Useful tips for documenting the projets.

- + \ No newline at end of file