Skip to main content

Appendix D - Creating a New Module for ADITO xRM

Overview

This document provides a step-by-step guide for creating new modules in the ADITO xRM environment. It is intended for developers who want to extend the functionality of ADITO xRM by creating custom modules.

To create a new module, use existing ADITO xRM modules as templates.

Creating a New Module

1. Prepare Repository

  • Create an empty Git repository in the appropriate location
    (for xRM modules: https://gitlab.adito.de/xrm-modules)

  • Choose a template depending on module type and clone it using the Designer:
    File → New project → Clone from Git Repository

    Module TypeRecommended Template
    Project Modulebasic-project
    Parent Modulecontactmanagement
    Feature Moduleactivity

2. Update Git Origin

After cloning the repository, update its Git origin.

git remote set-url origin https://gitlab.adito.de/xrm-modules/your-new-module.git

3. Adapt Module Metadata

Update or verify the following files:

  • .transpilerignore
  • .npmrc
  • package.json
    (Update name, version, dependencies, etc.)
  • README.md
    (Informal description of the module)
  • CHANGELOG.md
    (Use format based on https://keepachangelog.com/en/1.0.0/)

4. Clean Up Template Content

Remove any content from the template that does not apply to your module.

5. Install and Commit

  • Run:

    npm install
  • Commit and push your changes:

    git commit -am "Initialize new module"
    git push

You can now begin implementing functionality in your new module (Contexts, Entities, etc.).

warning

There is a dedicated module template in ADITO GitLab, but it is outdated and deprecated. Use the suggested existing modules instead.

jsconfig.json

The purpose of jsconfig.json is to enable features such as code completion and ESLint support across module boundaries. This file helps development tools locate libraries and resolve module paths correctly.

To avoid manual setup, jsconfig.json is automatically generated using @aditosoftware/devtools. During the first npm install, a postinstall script from devtools creates the file. Afterward, it is only regenerated by running a clean install:

npm clean-install

If dependencies change (e.g., modules are added or removed), you must run npm clean-install to regenerate jsconfig.json.

Optionally, you can define a jsconfig.template.json file. If present, this file is copied to jsconfig.json during installation, allowing you to preserve custom settings that should not be overwritten by the automated generator.

Keyword Registries

In modularized ADITO xRM projects, the former centralized KeywordRegistry_basic is divided into module-specific registries.

Each module defines its own keyword registry as needed. The naming convention follows the pattern:

<ModuleName>Keywords_registry

Examples:

  • ActivityKeywords_registry
  • ContactManagementKeywords_registry

This modular structure ensures that keywords are scoped and maintained per module, improving maintainability and clarity across projects.