Content
The Content plugin is the erxes CMS and website layer. It stores posts, pages, menus, categories, tags, and custom fields per site, serves them over GraphQL, and can build and deploy a rendered website through the Web Builder.
Projects
The plugin has two projects in the erxes/erxes monorepo:
| Project | Path | Runs on |
|---|---|---|
content_api | backend/plugins/content_api | Plugin GraphQL service, port 3303 |
content_ui | frontend/plugins/content_ui | Module Federation remote, dev server port 3003 |
content_api has two modules. src/modules/cms handles websites-as-CMS-sites, posts, pages, menus, categories, tags, custom post types, custom fields, and translations. src/modules/webbuilder handles Web Builder site and page records plus the Vercel deployment pipeline in utils/utils.ts.
content_ui mounts its routes under /content and registers two entries in src/config.tsx: cms at /content/cms and web-builder at /content/web-builder. Feature internals live in src/modules/cms and src/modules/web-builder.
Key concepts
- A Client Portal is a website's identity. CMS and Web Builder records carry a
clientPortalIdthat ties them to one site. The portal itself is a core-apiclientportalrecord, and the standalone Client Portal Next.js template (apps/client-portal-template) usescp*operations with a portal token. - Two operation families.
cp*operations such ascpPostList,cpCmsPageDetail, andcpMenusserve website integrations; the gateway identifies the portal from thex-app-tokenJWT and the resolvers are flaggedforClientPortal.cms*operations such ascmsPageListandcmsMenusserve the admin UI, go through the permission wrapper, and require an explicitclientPortalId.cp*is not read-only; it also includes writes likecpCmsPagesAdd. - Pages carry sections.
Page.pageItemsis an ordered list of items withname,type,content,order,objectType/objectId, and a free-form JSONconfig. A front-end template maps those items to components. - Menus have a
kind. The Web Builder deployer collectskind: "main"andkind: "footer"menu items to build site navigation. - Templates live outside this repo.
cpDeployWebclonesgithub.com/erxes-web-templates/<templateId>, writesdata/configs.jsonanddata/pages/<slug>.jsoninto it, and deploys to Vercel. The product repo defines the data shape; the template repositories define the rendering.
Enable the plugin
The plugin name is content. Enable it in .env, then start the dev services:
ENABLED_PLUGINS=content
pnpm dev:apis # includes content_api on :3303
pnpm dev:uis # serves core-ui with the content_ui remote on :3003
To run one project, use pnpm nx serve content_api or pnpm nx serve content_ui. The API gateway on port 4000 composes the plugin's GraphQL subgraph.
Guides
Pick the track that matches your role. The last card is the standalone Client Portal Next.js app, not part of the CMS or Web Builder tracks.