@aem-kit/templates
v2.1.0
Published
AEM project templates emitted by create-aem-enterprise (Monolith, Multi-repo, React, Angular, Spring Boot, AEMaaCS overlay).
Downloads
1,541
Readme
@aem-kit/templates
The AEM project templates emitted by
@aem-kit/create-project.
Each is a complete, buildable-shaped multi-module Maven project. The wizard
picks the tree(s) to scaffold from your answers.
Part of the AEM Enterprise Engineering Kit.
What's inside
There are two base repo types; frontend and backend are choices applied as overlays, not separate templates.
monorepo/ Base unified AEM repo — traditional baseline (HTL + JS Use-API, UnoCSS)
multirepo/
general/ Foundation repo (common components, styles, utils, base template)
backend/ API repo (bin-API servlets, integrations)
child/ Cloned by `aem multirepo create <category>` (dynamic child)
frontends/
react/ angular/ Frontend OVERLAYS — swap ui.frontend + the page component
backends/
spring-boot-proxy/ Backend OVERLAY — turns the bin API into a Spring Boot proxy
springboot/service/ Spring Boot 3 microservice, cloned by `aem springboot create service <name>`
overlays/
aemaacs/ ui.config (runmode OSGi) + dispatcher.cloud (added when opted in)Every AEM tree mirrors the same module shape (core / ui.apps / ui.content /
ui.frontend / all) plus config/ (Checkstyle), .githooks/, and .github/.
Target: AEM 6.5 (uber-jar apis 6.5.5), Core Components 2.24.x, Java 11; the
Spring Boot service targets Java 17 / Spring Boot 3.
How templates compose
resolveTemplate(answers) returns { baseJobs, removals, overlayJobs }:
- Base —
monorepo/, ormultirepo/general+multirepo/backend. - Removals — for a react/angular frontend, the base's
ui.frontend, page component and default clientlib are deleted first. - Overlays — the chosen
frontends/<fe>(onto the site repo), thenbackends/spring-boot-proxy(onto the API repo) when backend = spring-boot, thenoverlays/aemaacswhen opted in. A starterspringboot/serviceis also copied toservices/<artifact>-service.
| architecture | frontend | backend | result |
|--------------|----------|---------|--------|
| monorepo | traditional | servlet | monorepo/ |
| monorepo | react | spring-boot | monorepo/ + frontends/react + backends/spring-boot-proxy + starter service |
| multirepo | angular | servlet | general + backend, frontends/angular → general |
reposToInit(answers) lists the directories that each get their own git init
(multi-repo repos and Spring Boot services are independent repos).
Usage
This package is a template payload, not a runnable tool. Use it via the wizard, which rewrites the identifiers to your project:
npm create aem-enterpriseProgrammatic access to the templates:
import { templates, resolveTemplate, templateDefaults } from "@aem-kit/templates";
// templates.monolith, templates.react, templates.multirepoGeneral, ...
// resolveTemplate(answers) → { jobs: [{from, to}], primaryTo }Note: the template ships its
.gitignoreas a file namedgitignore(npm strips literal.gitignorefrom tarballs); the scaffolder restores the dot on generation.
Related packages
| Package | Purpose |
|---------|---------|
| @aem-kit/create-project | Scaffold a new AEM project (consumes this template) |
| aem-kit | The aem CLI — generators, doctor, deploy |
| @aem-kit/generators | Component / model / servlet / service generators |
| @aem-kit/templates | The project template (this package) |
| @aem-kit/shared | Shared utilities |
License
MIT
