Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPA starters Monorepo #186

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

SPA starters Monorepo #186

wants to merge 9 commits into from

Conversation

yavorsk
Copy link
Collaborator

@yavorsk yavorsk commented Nov 18, 2024

This PR introduces:

  • the spa-starters monorepo (located under headapps).
  • the Angular SPA starter
  • the XM Cloud proxy application.
    Includes README for the monorepo.
    Root README has been updated.

Copy link
Collaborator

@art-alexeyenko art-alexeyenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solid work, thank you Yavor.
Please check the comments - and let's merge this only when 22.3 is released (and sync the apps before that).

"description": "This repository contains the Starter Kits for Sitecore XM Cloud Development.",
"scripts": {
"install-build": "pnpm install && pnpm build:angular",
"install-all": "pnpm install",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this script is probably no longer needed right?
And the install-build one might also not be needed, if pnpm install is done by Deploy scripts

# dependencies
/node_modules

.netlify
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

speaking of this, let's include netlify.toml out of the box.
It's a starter kit - so we can provide everything clients can start with.


## Angular SPA for xmcloud

> Sitecore JSS Angular App for XM Cloud. For the current release this feature is experimental.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's leave only one disclaimer on this feature being experimental

## Deplopying the Angular SPA Starter + Proxy to XM CLoud

- Create your repository based on this one;
- The default configuration would deploy the NsxtJS starter application, so to deploy Angular SPA + Proxy we need to make update `xmcloud.build.json`:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo here

- Push the updates;
- Log into the Sitecore XM Cloud Deploy Portal, create a project and a deployment using your code and select your repository;
- Sitename resolution in the NextJS starter is being done by the multisite plugin, since Angular does not support multisite yet we need to specify the name of the site in the environment variables. So when you create a site you need to go to your environment, open 'variables' tab and create a new variable with:
- name: 'SITECORE_SITE+NAME'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo here, and also, is SITECORE_SITE_NAME not being set by default when deploying to XMC? A new deployment will be created without a site and the value will become available only later.

- rendering host name: your host name from `xmcloud.build.json`
- you should now be able to see your site in Pages

## Running your Angular SPA Starter + Proxy against the XM CLoud instance
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A small nitpick - please clarify this section is about running them locally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants