@marvalt/digivalt-core 0.2.30 → 0.2.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/GLOBAL-SHORTCODES.md +7 -7
- package/README.md +10 -8
- package/bin/env-example-fragments.cjs +6 -0
- package/bin/init.cjs +44 -5
- package/dist/generators/index.d.ts +3 -0
- package/dist/generators/prerender-seo.d.ts +6 -0
- package/dist/generators/seo-manifest.d.ts +3 -0
- package/dist/generators/seo-urls.d.ts +29 -0
- package/dist/generators/sitemap-paths.d.ts +5 -9
- package/dist/generators.cjs +1005 -155
- package/dist/generators.cjs.map +1 -1
- package/dist/generators.d.ts +86 -6
- package/dist/generators.esm.js +992 -156
- package/dist/generators.esm.js.map +1 -1
- package/dist/index.cjs +1019 -156
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +103 -9
- package/dist/index.esm.js +1006 -157
- package/dist/index.esm.js.map +1 -1
- package/dist/registry/index.d.ts +20 -0
- package/dist/registry.cjs +1528 -0
- package/dist/registry.cjs.map +1 -0
- package/dist/registry.d.ts +26 -0
- package/dist/registry.esm.js +1523 -0
- package/dist/registry.esm.js.map +1 -0
- package/dist/seo/DigiValtRouteSeo.d.ts +12 -0
- package/dist/seo/DigiValtSeoHead.d.ts +2 -0
- package/dist/seo/buildPageJsonLd.d.ts +11 -0
- package/dist/seo/html.d.ts +8 -0
- package/dist/seo/index.d.ts +7 -0
- package/dist/seo/resolvePageSeo.d.ts +17 -0
- package/dist/seo/seoTypes.d.ts +57 -0
- package/dist/seo.cjs +307 -86
- package/dist/seo.cjs.map +1 -1
- package/dist/seo.d.ts +105 -2
- package/dist/seo.esm.js +300 -87
- package/dist/seo.esm.js.map +1 -1
- package/dist/static/wpStatic.d.ts +16 -0
- package/dist/static.cjs +10 -0
- package/dist/static.cjs.map +1 -1
- package/dist/static.d.ts +38 -2
- package/dist/static.esm.js +10 -1
- package/dist/static.esm.js.map +1 -1
- package/dist/utils/notifications.d.ts +3 -0
- package/docs/AI-LOCAL-WORDPRESS-BOOTSTRAP.md +7 -3
- package/docs/AI-MASTER-PROMPT.md +37 -0
- package/docs/ENVIRONMENT.md +3 -3
- package/docs/README.md +6 -4
- package/docs/SEO-AIO.md +59 -0
- package/docs/SEO-PERFORMANCE.md +44 -11
- package/docs/SHORTCODES.md +4 -5
- package/package.json +17 -6
- package/template/DIGIVALT_SETUP.md +14 -8
- package/template/functions/robots.txt.ts +27 -0
- package/template/functions/sitemap.xml.ts +143 -65
- package/template/scripts/generate.ts +3 -10
- package/template/scripts/prerender-seo.ts +10 -0
- package/docs/LOVABLE-MASTER-PROMPT.md +0 -140
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
# AI master prompt — DigiVAlt full local WordPress control
|
|
2
|
-
|
|
3
|
-
Use this as a single copy-paste master prompt in Cursor, Claude Code, Antigravity, Lovable, or similar AI coding tools.
|
|
4
|
-
|
|
5
|
-
The objective is a DigiValt app scaffold that is production-shaped from day one, where after generation a human only needs to set `.env` / `.env.local` values before first local run:
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm run build && npm run dev
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Scope
|
|
12
|
-
|
|
13
|
-
- **AI responsibilities:** scaffold code, install/wire dependencies, run `digivalt-init`, ensure scripts/files are correct, keep cloud/function wiring and SEO enabled, and build a WordPress-driven shell.
|
|
14
|
-
- **Human responsibilities:** set real env values on local PC and cloud dashboard, run first local build/dev, replace placeholder static data with real generated exports as needed.
|
|
15
|
-
|
|
16
|
-
## Canonical sources
|
|
17
|
-
|
|
18
|
-
- [README.md](../README.md)
|
|
19
|
-
- [template/DIGIVALT_SETUP.md](../template/DIGIVALT_SETUP.md)
|
|
20
|
-
- [template/scripts/generate.ts](../template/scripts/generate.ts)
|
|
21
|
-
- [docs/SEO-PERFORMANCE.md](./SEO-PERFORMANCE.md)
|
|
22
|
-
- [digivalt-landing/DIGIVALT_SETUP.md](../../../digivalt-landing/DIGIVALT_SETUP.md)
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## Master prompt text (paste below into your AI tool)
|
|
27
|
-
|
|
28
|
-
You are a senior full-stack engineer scaffolding a DigiValt consumer app (Vite + React + TypeScript) with full WordPress-controlled static content behavior. This workflow must work the same whether run from Cursor, Claude Code, Antigravity, Lovable, or another AI assistant.
|
|
29
|
-
|
|
30
|
-
### Non-negotiables
|
|
31
|
-
|
|
32
|
-
- Install `@marvalt/digivalt-core@latest`.
|
|
33
|
-
- Use `npx digivalt-init` to enforce DigiValt-managed scaffold files and scripts.
|
|
34
|
-
- Keep Cloudflare Pages Functions + `wrangler.toml` enabled.
|
|
35
|
-
- Keep SEO enabled by default (Helmet provider + DigiValt SEO helpers).
|
|
36
|
-
- Keep local secrets out of git and ignore `.env`, `.env.local`, `.env.*.local`, `.dev.vars`.
|
|
37
|
-
- Do not hand-maintain `public/sitemap-paths.json`; it is generated.
|
|
38
|
-
- Do not create `public/sitemap.xml` when using `functions/sitemap.xml.ts`.
|
|
39
|
-
|
|
40
|
-
### File/path requirements
|
|
41
|
-
|
|
42
|
-
Use these exact static data paths:
|
|
43
|
-
|
|
44
|
-
- `public/wordpress-data.json`
|
|
45
|
-
- `public/gravity-forms-data.json`
|
|
46
|
-
- `src/data/mautic-data.json`
|
|
47
|
-
|
|
48
|
-
If real exports are unavailable, use template starter fixtures (or equivalent minimal placeholders) so the app boots. Mark placeholders clearly.
|
|
49
|
-
|
|
50
|
-
### Build wiring requirements
|
|
51
|
-
|
|
52
|
-
Ensure these commands exist and are used:
|
|
53
|
-
|
|
54
|
-
```bash
|
|
55
|
-
npm install @marvalt/digivalt-core@latest
|
|
56
|
-
npm install -D vite-node
|
|
57
|
-
npx digivalt-init
|
|
58
|
-
npm install react-helmet-async
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
Expected scripts:
|
|
62
|
-
|
|
63
|
-
- `generate`: `npx vite-node --options.deps.inline="@marvalt/digivalt-core/generators" scripts/generate.ts`
|
|
64
|
-
- `build`: `npx vite-node --options.deps.inline="@marvalt/digivalt-core/generators" scripts/generate.ts && vite build`
|
|
65
|
-
- `build:dev`: `npx vite-node --options.deps.inline="@marvalt/digivalt-core/generators" scripts/generate.ts && vite build --mode development`
|
|
66
|
-
- `dev`: `vite`
|
|
67
|
-
|
|
68
|
-
### `scripts/generate.ts` behavior
|
|
69
|
-
|
|
70
|
-
Import from `@marvalt/digivalt-core/generators` only:
|
|
71
|
-
|
|
72
|
-
- In hosted fixture mode (`VITE_IS_LOVABLE=true`): skip fetch, run `generateSitemapPathsSafe()`.
|
|
73
|
-
- In normal local mode (default): run `generateAllData()` then sitemap; on fetch failure still run sitemap safe fallback.
|
|
74
|
-
|
|
75
|
-
### WordPress-driven runtime wiring (must implement)
|
|
76
|
-
|
|
77
|
-
After `loadWordPressData()` from `@marvalt/digivalt-core/static`, wire the app shell and routes using WordPress static data:
|
|
78
|
-
|
|
79
|
-
1. Menus from `getNavigationMenu()` / `getFooterNavigationMenu()` / `getMenuById()` (+ `getParsedHeader()` / `getHeaderMenuId()` / `getFooterMenuId()`). Assign classic menus in WP under **Appearance → Menus → Manage Locations** (`{frontendId}-header|footer`, then `default-*`).
|
|
80
|
-
2. Optional header/footer template blocks from `getHeader()` / `getFooter()` (legacy). Prefer app-owned chrome + location menus for multi-frontend.
|
|
81
|
-
3. Site identity from `getSiteSettings()` / `getLogoUrl()` / `getSiteIconUrl()`.
|
|
82
|
-
4. Theme styles from `getWordPressData().theme_styles` mapped into app styling/tokens.
|
|
83
|
-
5. Pages/posts/CPT routes from `getWordPressPages()`, `getWordPressPageBySlug()`, `getWordPressPosts()`, and `front_page`.
|
|
84
|
-
|
|
85
|
-
For forms, support Gravity Forms and Mautic via `@marvalt/digivalt-core/services` and/or JSON static stores.
|
|
86
|
-
|
|
87
|
-
### Cloudflare and sitemap requirements
|
|
88
|
-
|
|
89
|
-
- Keep `functions/sitemap.xml.ts`.
|
|
90
|
-
- Keep `functions/api/*` handlers from template and keep `wrangler.toml`.
|
|
91
|
-
- Ensure sitemap flow is active:
|
|
92
|
-
- input: `public/sitemap-static-paths.json`
|
|
93
|
-
- generated output: `public/sitemap-paths.json`
|
|
94
|
-
- runtime endpoint: `/sitemap.xml` from Pages Function
|
|
95
|
-
|
|
96
|
-
### AI output constraints
|
|
97
|
-
|
|
98
|
-
- Do not request humans to hand-edit code before first run.
|
|
99
|
-
- After scaffolding, the only required manual step before first run is env values in `.env` / `.env.local`.
|
|
100
|
-
- Provide a final validation checklist and commands:
|
|
101
|
-
- `npm run build`
|
|
102
|
-
- `npm run dev`
|
|
103
|
-
|
|
104
|
-
---
|
|
105
|
-
|
|
106
|
-
## Built-in defaults (use unless humans override later)
|
|
107
|
-
|
|
108
|
-
- Package: `@marvalt/digivalt-core@latest`
|
|
109
|
-
- Static data: template starter fixtures for WordPress, Gravity Forms, Mautic
|
|
110
|
-
- SEO: ON
|
|
111
|
-
- Cloudflare Functions + `wrangler.toml`: ON
|
|
112
|
-
- Form/page mapping: derive from WordPress content and shortcodes first (`gf_embed`, `mautic_form`, `phplist_subscribe`; see `GLOBAL-SHORTCODES.md`)
|
|
113
|
-
|
|
114
|
-
---
|
|
115
|
-
|
|
116
|
-
## Pre-flight checklist
|
|
117
|
-
|
|
118
|
-
| Step | Done |
|
|
119
|
-
|------|------|
|
|
120
|
-
| `@marvalt/digivalt-core@latest` installed | ☐ |
|
|
121
|
-
| `digivalt-init` run and scripts verified | ☐ |
|
|
122
|
-
| Required static data files exist (`wordpress`, `gravity-forms`, `mautic`) | ☐ |
|
|
123
|
-
| `sitemap-static-paths.json` exists and `sitemap-paths.json` is generated | ☐ |
|
|
124
|
-
| Cloudflare functions/wrangler files present | ☐ |
|
|
125
|
-
| SEO imports + `HelmetProvider` wired | ☐ |
|
|
126
|
-
| `.gitignore` excludes local secret files | ☐ |
|
|
127
|
-
|
|
128
|
-
---
|
|
129
|
-
|
|
130
|
-
## Reference paths in this monorepo
|
|
131
|
-
|
|
132
|
-
| Concern | File |
|
|
133
|
-
|---------|------|
|
|
134
|
-
| Local setup baseline | [digivalt-landing/DIGIVALT_SETUP.md](../../../digivalt-landing/DIGIVALT_SETUP.md) |
|
|
135
|
-
| Template setup baseline | [template/DIGIVALT_SETUP.md](../template/DIGIVALT_SETUP.md) |
|
|
136
|
-
| Init behavior and script expectations | [README.md](../README.md) |
|
|
137
|
-
| Generator script template | [template/scripts/generate.ts](../template/scripts/generate.ts) |
|
|
138
|
-
| Landing generator implementation | [digivalt-landing/scripts/generate.ts](../../../digivalt-landing/scripts/generate.ts) |
|
|
139
|
-
| SEO and sitemap behavior | [docs/SEO-PERFORMANCE.md](./SEO-PERFORMANCE.md) |
|
|
140
|
-
| WP static getters and shell helpers | [src/static/wpStatic.ts](../src/static/wpStatic.ts) |
|