customGPT.ai - Jahia indexer icon
Module Id
customgpt-ai
Group Id
org.jahia.modules.community
Updated
Requires Jahia
8.2.3.0
Author
Florent BOURASSE
Category
Business and Commerce
Status
COMMUNITY info

customGPT.ai - Jahia indexer group_work

ai

Jahia module that integrates with the CustomGPT.ai API to index Jahia site content (pages and files) into a CustomGPT project, keeping it in sync with JCR publish/unpublish events.

Dependencies & Dependants

Changelog 1.0.5

Highlights

  • Resolved all 86 pre-existing SonarQube issues across the codebase, significantly improving code quality.
  • Fixed WCAG 2.1 AA accessibility issues throughout the admin UI and CustomGptSettings component.
  • Hardened the rate-limit interceptor by moving Thread.sleep outside of the synchronized block to reduce contention.

Changes

Features

  • None in this range.

Fixes

  • ecd752e fix: resolve all 86 pre-existing SonarQube issues.
  • d711461 fix(rate-limit): move Thread.sleep outside synchronized block and reduce lock-hold time.
  • 1edf8a0 fix(ui): stick scrollbar to right edge by removing max-width from scroll container.
  • c45528e fix(a11y): resolve WCAG 2.1 AA issues in CustomGptSettings.
  • f34db7e fix: resolve WCAG 2.1 AA accessibility issues in admin UI.

Refactoring / chores

  • None in this range. (Touched files include broad refactors across Service.javaIndexerJCRListener.javaCustomGptIndexerNodeHandler.java, etc., bundled inside the SonarQube fix commit.)

Tests / CI

  • 86876a6 test(cypress): assert scheduleJobASAP resets to false after save.
  • d962126 test(cypress): increase defaultCommandTimeout to 10000ms.

Full Changelog1_0_4...1_0_5

FAQ

Configuration

The module uses the OSGi config PID org.jahia.community.modules.customgpt.
Drop a .cfg file in $JAHIA_HOME/digital-factory-data/karaf/etc/ or edit from the Admin UI:

Property Default Description
projectId (empty) CustomGPT project ID
token (empty) CustomGPT API Bearer token
apiBaseUrl https://app.customgpt.ai/api/v1/ CustomGPT API base URL
content.indexedMainResourceTypes jnt:page,jmix:mainResource Comma-separated main resource node types to index
content.indexedSubNodeTypes jmix:droppableContent Comma-separated sub-node types whose text content is included
content.indexedFileExtensions pdf Comma-separated file extensions to index
operations.batch.size 500 Batch size for concurrent deletions and indexing jobs
jahia.username (empty) Jahia user for rendering pages during indexing
jahia.password (empty) Jahia password for the rendering user
jahia.serverCookie.name/value/domain (empty) Optional server cookie injected during rendering
dryRun true When true, simulate indexing without calling CustomGPT
scheduleJobASAP false When true, schedule indexing jobs immediately; auto-resets to false after jobs are queued

Admin UI

Navigate to Jahia Administration → CustomGPT.ai (/jahia/administration/customgptAiSettings).

The panel allows:

  • Editing all configuration properties
  • Viewing the CustomGPT project name (resolved live from the API)
  • Saving settings (writes the OSGi config file)
  • Purge All Pages — deletes every page registered in the CustomGPT project (irreversible, requires confirmation)

GraphQL API

All operations are exposed under the admin.customGpt namespace.

Queries

  • admin.customGpt.settings — read all settings (including projectName resolved from the API)
  • admin.customGpt.listSites — list indexed sites and their indexation status

Mutations

  • admin.customGpt.addSite(siteKey) — register a site for indexing (adds jmix:customGptIndexableSite mixin)
  • admin.customGpt.saveSettings(...) — persist settings to OSGi config
  • admin.customGpt.startIndex(siteKeys, force) — trigger full-site indexing (all sites if siteKeys omitted)
  • admin.customGpt.startNodeIndex(nodePaths, inclDescendants) — trigger indexing for specific nodes
  • admin.customGpt.purgeAllPages — delete all pages in the CustomGPT project; returns the number of pages deleted

JCR Data Model

Each indexed node gets a customgptIndex child node (type jnt:customGptIndexEntry) storing the CustomGPT pageId as a string property. This replaces the legacy jmix:customGptIndexed mixin approach.

Migration from legacy mixins

Run scripts/cleanup-legacy-customgpt-mixins.groovy from the Jahia Groovy console to remove the old jmix:customGptIndexed / jmix:customGptFileIndexed mixins and the customGptPageId property from all nodes in both EDIT and LIVE workspaces.

How To Install

Installation

  • In Jahia, go to "Administration --> Server settings --> System components --> Modules"
  • Upload the JAR customgpt-ai-X.X.X.jar
  • Check that the module is started

Configuration

  • Edit the file JAHIA_HOME/digital-factory-data/karaf/etc/org.jahia.community.modules.customgpt.cfg

License

MIT License

Copyright (c) 2025 - present Florent BOURASSÉ

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.