Client Portal
Serve customers with the standalone portal template backed by Client Portal credentials. This guide follows version 3.1.7 (03acdf712c).
For portal authentication, see Authentication. For CMS reads, see CMS + Next.js.
App
apps/client-portal-template/ is a standalone Next.js 16 (React 19) starter, not an Nx project. Development port is 3800 (next dev --port 3800).
- Apollo client:
modules/apollo/apolloClient.tspoints at${ERXES_API_URL}/graphqlwithx-app-token: NEXT_PUBLIC_ERXES_CP_TOKEN. - Wrapper:
modules/apollo/ApolloWrapper.tsxusesNEXT_PUBLIC_ERXES_API_URL/graphql.
Configure the Client Portal in erxes (enable the Content or related plugin, create the portal, copy its token), then set the website's private environment to the deployment's gateway URL and that portal token. Keep the token server-side; see the CMS Setup credential boundaries.
Verify
- Create a portal, a test post, and a draft; confirm only published content appears.
- Load the portal, sign in as a portal user where applicable, and exercise one mutation through its authorized endpoint.
- Confirm browser requests carry no Apps token.