codepapu

Liferay DXP · extension lab · 8 min

28 client extensions and 25 OSGi modules — one working example of each common Liferay extension type, each with a README.

Liferay DXP · OSGi · Client Extensions · Java

View on GitHub

Architecture

From the real repo — how the pieces fit.

CX Lab

28 client extensions · 25 OSGi modules · one workspace

modules/

25 · OSGi · inside DXP

APIs & data

REST samplesService BuilderObjects hooks

Sign-in

Auth filtersLogin hooks

Admin

Control PanelConfiguration

Content / search / WF

Web contentSearchKaleo

Language · Commerce

i18nCommerce APIs

client-extensions/

28 · outside the portal

Browser

Custom elementsIFramesJS

Theme

CSSFaviconJS theme

Config & data

Batch listsObjectsOAuth

Microservices

Spring BootNode samples

Commerce jobs

PaymentShippingTax

Client extension when it can live outside · Module when you need portal internals

A lab inventory: modules inside the JVM, client extensions outside. Pick by where the code must run.

Deck

Short overview of modules vs client extensions — open here or download the PPTX.

Loading deck…

CX Lab is a Liferay workspace with one small, working example of every common extension type. Each project has its own README: what it is, why to use it, when to use it, how it works, and how to try it.

What it is

A test bench for Liferay DXP (Java 21, Node 22, Gradle). It does not ship a portal — point liferay.workspace.home.dir at your DXP home, then build and deploy. Source: codepapu/liferay-cx-lab.

There are two folders:

  • client-extensions/ — 28 projects that run outside the portal JVM (browser widgets, theme bits, batch, microservices, Commerce engines).
  • modules/ — 25 OSGi modules that run inside the portal JVM (REST, Service Builder, sign-in, Control Panel, content, Commerce).

Two ways to extend

  • OSGi module — inside the portal. Full access to Liferay services, permissions, and lifecycle.
  • Client extension — outside the portal. Deploy and upgrade on its own; talks to Liferay over Headless APIs and OAuth 2.

Client extensions (28)

Full list from client-extensions/README.md. Open a name to see that project on GitHub.

Browser13

Theme3

Configuration and data3

Microservices3

Commerce6

OSGi modules (25)

Full list from modules/README.md. Each module runs inside the portal JVM.

APIs and data5

Sign-in3

Administration6

Content, search, and workflow5

Language and localization4

Commerce2

Try it

bash
# point at your DXP home in gradle.properties
./gradlew deploy

# or one project
./gradlew :client-extensions:cx-lab-hello-tile:deploy
./gradlew :modules:cx-lab-greeting-rest:deploy

After modules deploy, lb -s com.cxlab in Gogo should list them as Active. Microservices also need their own process (see each project README for bootRun / yarn start).