68 lines
1.2 KiB
Markdown
68 lines
1.2 KiB
Markdown
# System Bootstrap
|
|
|
|
## Fresh local development
|
|
|
|
```bash
|
|
npm install
|
|
ALLOW_DB_RESET=true npm run db:fresh
|
|
npm exec tsc --noEmit
|
|
npm run dev
|
|
```
|
|
|
|
## Fresh UAT or demo data
|
|
|
|
```bash
|
|
ALLOW_DB_RESET=true npm run db:fresh:uat
|
|
```
|
|
|
|
## Existing database upgrade
|
|
|
|
```bash
|
|
npm run db:migrate
|
|
npm run seed:system
|
|
```
|
|
|
|
## PDF template reseed only
|
|
|
|
```bash
|
|
npm run seed:pdf-template
|
|
```
|
|
|
|
Product Item template version:
|
|
|
|
```bash
|
|
# create product-v1 as inactive version
|
|
node --experimental-strip-types scripts/reseed-pdf-template-version.ts --template-variant=product-v1
|
|
|
|
# create and activate product-v1 immediately
|
|
node --experimental-strip-types scripts/reseed-pdf-template-version.ts --template-variant=product-v1 --activate
|
|
|
|
# restore legacy 1.0 as active version
|
|
npm run seed:pdf-template
|
|
```
|
|
|
|
## Verification
|
|
|
|
```bash
|
|
npm exec tsc --noEmit
|
|
npm run build
|
|
npm run verify:encoding
|
|
npm run verify:crm-access
|
|
npm run audit:pdf
|
|
npm run audit:pdf:visual
|
|
```
|
|
|
|
Refresh PDF visual baselines:
|
|
|
|
```bash
|
|
npm run audit:pdf:visual:baseline
|
|
```
|
|
|
|
## Script guide
|
|
|
|
- `db:*` = database lifecycle
|
|
- `seed:*` = data bootstrap
|
|
- `verify:*` = validation
|
|
- `audit:*` = diagnostics
|
|
- `legacy:*` = historical task-specific tools
|