Prerequisites
- Node.js 20 or later
- Access to the Azure App registration (tenant ID, client ID, client secret)
- Access to the SharePoint sites for CMS and CRM data
Setup steps
Install dependencies
postinstall script automatically runs nuxt prepare to generate type declarations.Create your environment file
Copy the example below to See the Environment variables section below for a full reference.
.env in the project root and fill in each value.Sync SharePoint content
Pull categories and products from SharePoint into This script reads from the CMS SharePoint site using Microsoft Graph and writes
cms/catalog.json:cms/catalog.json and cms/routes.json. It must run before the dev server starts so that content is available.Environment variables
Azure / Microsoft Graph
Required for SharePoint access (CMS sync, price request CRM, and optional email via Graph).SharePoint CRM (price requests)
SharePoint CMS (content)
scripts/sync-sharepoint-to-cms.mjs) reads these from a separate .env.imports file:
Public / frontend
Available npm scripts
| Script | Description |
|---|---|
npm run dev | Start development server at http://localhost:3000 |
npm run build | Run cms:sync then build for Node.js server |
npm run generate | Run cms:sync then generate static output |
npm run preview | Preview the production build locally |
npm run cms:sync | Fetch SharePoint data and write cms/catalog.json |
npm run validate:all | Run all validation scripts (MD structure, SEO, categories) |
npm run generate:products | Scaffold product MDX files from catalog data |
npm run validate:products | Validate generated product files |
npm run dev:clean | Clear Nuxt and Vite caches then start dev server |
npm run fix:types | Full reinstall + nuxi prepare to reset type generation |