Skip to main content

Creating a New Module for ADITO xRM

This guide provides a concise, step-by-step guide to creating a new module for ADITO xRM. It is intended for developers extending ADITO xRM with custom functionality.

You might use existing ADITO xRM modules as references but create new modules from scratch to avoid hidden legacy artifacts.

Creating a New Module or Project

tip

Even though you could duplicate an existing module/project, it is safer to create a new one from scratch to prevent carrying over legacy issues.

1. Prepare the repository

  • Create an empty Git repository in the appropriate location (for xRM modules: https://gitlab.adito.de/xrm-modules).
  • Check the naming guidelines on how to name your Git project.
  • Do not add any initial files via the hosting platform's wizard if you will initialize locally.

2. Create a new project in ADITO Designer

  • Create an empty project in the ADITO Designer via "File → New Project → Create empty project".
  • Provide a project name and choose a local path.

3. Initialize the package

  • Open the project folder in your terminal.
  • Run:npm init
  • Provide the package metadata (name, version, description, author, license, etc.).
    • Use a scoped package name, e.g., @aditosoftware/or your customer scope, to avoid conflicts with public npm packages.
    • You can adjust all those values later by directly editing the package.json file.
  • You now have a minimal npm package.
  • Add basic scripts to package.json, for example, eslint or test scripts.

4. Classify as a module or project

Adjust package.json to declare whether this package is a module or a project. Ensure required fields and scripts are present.

5. Add standard package files

  • .npmrc
  • .gitignore
  • .transpilerignore
  • any ESLint configuration file
  • README.md
  • CHANGELOG.md (follow keep a changelog)
tip

For standard files that should be included in all ADITO packages, see the module-template.

6. Initialize Git and push

git init --initial-branch=main
git remote add origin <<path to your new module>>
git add .
git commit -m "Initial commit"
git push --set-upstream origin main

7. Add dependencies and implement features

  • Add required dependencies for your module.
  • Begin implementing module functionality (e.g., contexts, entities, UI, services).
  • Add or adjust data models as needed.

Modularized vs. Non‑Modularized xRM

There are important differences between non‑modularized xRM (classic, monolithic structures) and modularized xRM (split into cohesive modules).

note

The sections below illustrate some differences but are not exhaustive.

Services instead of Processes

In modularized ADITO xRM projects, a lot of processes are now enriched with Services.

An example is the AttributeUtil_lib where the implementation is now split into multiple services.

Keyword Registries

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

  • Each module defines its own keyword registry process when needed.
  • Naming convention: <ModuleName>Keywords_registry

Examples:

  • ActivityKeywords_registry
  • ContactManagementKeywords_registry

This structure keeps keywords scoped to their modules, improving clarity and maintainability.

See also