Keep core untouched

Your app never edits an Arc CMS (core) file, so every Arc CMS update merges cleanly. One command tells you whether that still holds; run it before every commit.

Before every commit

npm run check:core

It compares your working copy, committed or not, new files included, with the Arc CMS version your app is based on, and sorts every difference:

KindFilesResult
customsrc/custom/, functions/src/custom/, firestore.app.rules, storage.app.rules, firestore.app.indexes.json, tests/rules/custom/, docs/custom/, custom/, .github/ (CI workflows)Fine: counted, not listed
installsrc/environments/environment.ts, src/environments/environment.prod.ts, src/environments/arc-install.ts, src/environments/firebase-web.<projectId>.tsFine: this install's own settings
reviewpackage.json, package-lock.json, functions/package.json, functions/package-lock.jsonAllowed, but listed: worth a look before the next update
coreEverything elseListed, and the check fails
Exit codeWhen
0No core file changed. Also in the Arc CMS repository itself, which has no core to protect.
1A core file changed, or there is no Arc CMS version to compare with

Because a failure exits with 1, the same command works as a CI step.

The upstream remote

The check compares with Arc CMS from a remote named upstream. Without it the check checks nothing and fails, so it can never pass by accident. Add it once:

git remote add upstream git@github.com:quadralyst/arccms.git
git fetch upstream

It compares with the Arc CMS branch your copy follows: of upstream/main and upstream/dev, the one your work is fewest commits ahead of, which is the one you copied or last merged. A copy taken from dev needs nothing extra. The first line of the report names the branch it chose. To choose yourself, name the branch:

npm run check:core -- --against upstream/dev

Moving a core file into the custom space still counts as a core change: the check looks at the old path too. Copying a core component into src/custom/ and editing the copy passes the check, but your app then misses every later fix to it. Use the component as it is, and ask for an option instead (below).

When the check lists a core file

Undo the edit to the core file, then put the change where it belongs:

You changedPut it in
A page or a routesrc/custom/pages/ or src/custom/routes.ts: Add pages and routes
The admin menu or the member menusrc/custom/nav.ts (your items) and src/custom/nav-changes.ts (changes to Arc CMS's): Change the admin menu, Change the member menu
Where people land, or the member dashboardsrc/custom/home.ts, src/custom/user-dashboard.ts: Build the member area
Wording or translationssrc/custom/i18n/, which can also reword core text
Stylessrc/custom/styles.css, loaded after every core stylesheet
Features on or offsrc/custom/features.ts: Choose your app's features
The home page, a content template, the site header or footer, the sign-in page's brand panel, a static page, the site's styles, favicon or error pages (anything in public/_site/ or public/)src/custom/site/, at the same path: Design templates. When the check lists files in public/, it points to npm run arc:own-site, which moves them for you: Move your site into src/custom/site
A Cloud Function or triggerfunctions/src/custom/index.ts: Write your own Cloud Functions
A command-line script, its data, or design filescustom/: Run scripts and keep data
Security rules or indexesfirestore.app.rules, storage.app.rules, firestore.app.indexes.json: Set security rules and indexes

The full list of places your app owns is in Use the custom space.

If none of them can do it, the custom space is missing a plug point or a component is missing an option. That change belongs in Arc CMS as a general feature that any app can use: make it there (see Keep core generic), then pull it into your app with the next update. Until then, keep the app's version out of core.

Take Arc CMS updates

With the check passing, an update is a merge of the newer Arc CMS into your repository, followed by installs, tests and a deploy. The steps, and what to do when the merge conflicts, are in Upgrade Arc CMS. Your custom files never conflict: Arc CMS ships them once, empty, and never changes them again. The install files (environment.ts, environment.prod.ts, arc-install.ts) ship with no Firebase project, and Arc CMS never changes their values either; when it adds a key to one, CHANGELOG.md names it (see Before the first npm run dev).

npm run arc:upgrade is not part of a routine update. It moves a project whose Arc CMS functions are still deployed under their plain names to the arccms- names, once; Upgrade Arc CMS covers when and how.