create-vexcms 0.1.0-alpha.2 → 0.1.0-alpha.21

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.
Files changed (115) hide show
  1. package/README.md +48 -14
  2. package/dist/index.js +1714 -1504
  3. package/package.json +2 -2
  4. package/templates/base-nextjs/README.md +18 -5
  5. package/templates/base-nextjs/convex/auth/index.ts +2 -2
  6. package/templates/base-nextjs/convex/auth/options.ts +27 -26
  7. package/templates/base-nextjs/convex/auth/schema.ts +51 -0
  8. package/templates/base-nextjs/convex/auth/sessions.ts +3 -3
  9. package/templates/base-nextjs/convex/tsconfig.json +2 -2
  10. package/templates/base-nextjs/convex/vex/firstUser.ts +2 -2
  11. package/templates/base-nextjs/convex/vex/globals.ts +3 -2
  12. package/templates/base-nextjs/convex/vex/media.ts +3 -2
  13. package/templates/base-nextjs/convex/vex.schema.ts +1 -0
  14. package/templates/base-nextjs/convex/vex.ts +17 -4
  15. package/templates/base-nextjs/next.config.ts +52 -6
  16. package/templates/base-nextjs/package.json +18 -7
  17. package/templates/base-nextjs/public/favicons/favicon.ico +0 -0
  18. package/templates/base-nextjs/src/app/(frontend)/@auth/(...)auth/[pathname]/view.tsx +27 -15
  19. package/templates/base-nextjs/src/app/(vexcms)/admin/[[...path]]/page.tsx +2 -2
  20. package/templates/base-nextjs/src/app/(vexcms)/admin/clientProviders.tsx +9 -14
  21. package/templates/base-nextjs/src/app/(vexcms)/admin/layout.tsx +8 -6
  22. package/templates/base-nextjs/src/app/api/vex/revalidate/route.ts +19 -0
  23. package/templates/base-nextjs/src/app/globals.css +10 -9
  24. package/templates/base-nextjs/src/app/layout.tsx +6 -0
  25. package/templates/base-nextjs/src/auth/access.ts +14 -2
  26. package/templates/base-nextjs/src/auth/serverUtils.ts +20 -6
  27. package/templates/base-nextjs/src/components/WelcomePage.tsx +54 -43
  28. package/templates/base-nextjs/src/components/component-example.tsx +1 -1
  29. package/templates/base-nextjs/src/components/providers/server.tsx +16 -8
  30. package/templates/base-nextjs/src/vex.config.server.ts +30 -0
  31. package/templates/base-nextjs/src/vex.config.ts +14 -11
  32. package/templates/base-nextjs/src/vex.types.ts +2 -1
  33. package/templates/base-nextjs/src/vexcms/collections/images.ts +1 -1
  34. package/templates/base-nextjs/src/vexcms/collections/users.ts +3 -1
  35. package/templates/marketing-site/convex/pages.ts +20 -1
  36. package/templates/marketing-site/convex/schema.ts +4 -4
  37. package/templates/marketing-site/convex/seed.ts +515 -70
  38. package/templates/marketing-site/convex/siteSettings.ts +1 -1
  39. package/templates/marketing-site/convex/theme.ts +3 -3
  40. package/templates/marketing-site/convex/vex.schema.ts +75 -38
  41. package/templates/marketing-site/public/favicon.svg +14 -0
  42. package/templates/marketing-site/public/favicons/apple-touch-icon.png +0 -0
  43. package/templates/marketing-site/public/favicons/favicon.ico +0 -0
  44. package/templates/marketing-site/src/app/(frontend)/(site)/PageContent.tsx +64 -0
  45. package/templates/marketing-site/src/app/(frontend)/(site)/SiteLivePreviewProvider.tsx +31 -0
  46. package/templates/marketing-site/src/app/(frontend)/(site)/[slug]/page.tsx +63 -0
  47. package/templates/marketing-site/src/app/(frontend)/(site)/layout.tsx +50 -0
  48. package/templates/marketing-site/src/app/(frontend)/(site)/page.tsx +33 -0
  49. package/templates/marketing-site/src/app/(frontend)/layout.tsx +10 -24
  50. package/templates/marketing-site/src/app/(vexcms)/admin/layout.tsx +32 -0
  51. package/templates/marketing-site/src/app/globals.css +413 -0
  52. package/templates/marketing-site/src/app/layout.tsx +85 -0
  53. package/templates/marketing-site/src/app/robots.ts +13 -0
  54. package/templates/marketing-site/src/app/sitemap.ts +18 -0
  55. package/templates/marketing-site/src/components/BrandMark.tsx +27 -0
  56. package/templates/marketing-site/src/components/CodeHighlightContext.tsx +76 -0
  57. package/templates/marketing-site/src/components/CodePane.tsx +98 -0
  58. package/templates/marketing-site/src/components/Container.tsx +25 -0
  59. package/templates/marketing-site/src/components/CopyButton.tsx +80 -0
  60. package/templates/marketing-site/src/components/FirstAdminBootstrap.tsx +54 -0
  61. package/templates/marketing-site/src/components/InstallCommand.tsx +29 -0
  62. package/templates/marketing-site/src/components/MediaImage.tsx +59 -0
  63. package/templates/marketing-site/src/components/SectionHeader.tsx +51 -0
  64. package/templates/marketing-site/src/components/SiteFooter.tsx +8 -6
  65. package/templates/marketing-site/src/components/SiteHeader.tsx +8 -6
  66. package/templates/marketing-site/src/components/ThemeLive.tsx +1 -2
  67. package/templates/marketing-site/src/components/ThemeStyle.tsx +3 -3
  68. package/templates/marketing-site/src/components/motion-primitives/animated-group.tsx +44 -120
  69. package/templates/marketing-site/src/components/motion-primitives/reveal.module.css +32 -0
  70. package/templates/marketing-site/src/components/motion-primitives/text-effect.tsx +47 -266
  71. package/templates/marketing-site/src/lib/codeHighlightKey.ts +27 -0
  72. package/templates/marketing-site/src/lib/highlight.ts +134 -0
  73. package/templates/marketing-site/src/lib/highlightClient.ts +37 -0
  74. package/templates/marketing-site/src/lib/metadata.ts +61 -33
  75. package/templates/marketing-site/src/lib/resolvePagePath.ts +8 -0
  76. package/templates/marketing-site/src/lib/vex.ts +18 -0
  77. package/templates/marketing-site/src/proxy.ts +179 -0
  78. package/templates/marketing-site/src/vex.config.server.ts +27 -0
  79. package/templates/marketing-site/src/vex.config.ts +27 -9
  80. package/templates/marketing-site/src/vex.types.ts +102 -76
  81. package/templates/marketing-site/src/vexcms/api.ts +2 -2
  82. package/templates/marketing-site/src/vexcms/blocks/CTA/config.ts +3 -2
  83. package/templates/marketing-site/src/vexcms/blocks/CTA/index.tsx +40 -24
  84. package/templates/marketing-site/src/vexcms/blocks/CodeShowcase/config.ts +62 -0
  85. package/templates/marketing-site/src/vexcms/blocks/CodeShowcase/index.tsx +106 -0
  86. package/templates/marketing-site/src/vexcms/blocks/FAQ/config.ts +4 -3
  87. package/templates/marketing-site/src/vexcms/blocks/FAQ/index.tsx +63 -50
  88. package/templates/marketing-site/src/vexcms/blocks/Features/config.ts +1 -0
  89. package/templates/marketing-site/src/vexcms/blocks/Features/index.tsx +43 -58
  90. package/templates/marketing-site/src/vexcms/blocks/Footer/config.ts +6 -3
  91. package/templates/marketing-site/src/vexcms/blocks/Footer/index.tsx +90 -53
  92. package/templates/marketing-site/src/vexcms/blocks/Header/config.ts +10 -3
  93. package/templates/marketing-site/src/vexcms/blocks/Header/index.tsx +205 -138
  94. package/templates/marketing-site/src/vexcms/blocks/Hero/config.ts +27 -12
  95. package/templates/marketing-site/src/vexcms/blocks/Hero/index.tsx +174 -119
  96. package/templates/marketing-site/src/vexcms/blocks/HowItWorks/config.ts +2 -1
  97. package/templates/marketing-site/src/vexcms/blocks/HowItWorks/index.tsx +59 -51
  98. package/templates/marketing-site/src/vexcms/blocks/Roadmap/config.ts +26 -5
  99. package/templates/marketing-site/src/vexcms/blocks/Roadmap/index.tsx +256 -73
  100. package/templates/marketing-site/src/vexcms/blocks/Split/config.ts +62 -0
  101. package/templates/marketing-site/src/vexcms/blocks/Split/index.tsx +186 -0
  102. package/templates/marketing-site/src/vexcms/blocks/Stats/config.ts +35 -0
  103. package/templates/marketing-site/src/vexcms/blocks/Stats/index.tsx +77 -0
  104. package/templates/marketing-site/src/vexcms/blocks/config.ts +27 -11
  105. package/templates/marketing-site/src/vexcms/blocks/constants.ts +3 -0
  106. package/templates/marketing-site/src/vexcms/blocks/index.ts +9 -0
  107. package/templates/marketing-site/src/vexcms/collections/footers.ts +1 -0
  108. package/templates/marketing-site/src/vexcms/collections/headers.ts +1 -0
  109. package/templates/marketing-site/src/vexcms/collections/pages.ts +23 -1
  110. package/templates/marketing-site/src/vexcms/collections/themeColors.ts +14 -14
  111. package/templates/marketing-site/src/vexcms/collections/users.ts +20 -0
  112. package/dist/index.mjs +0 -30976
  113. package/templates/marketing-site/src/app/(frontend)/PageContent.tsx +0 -53
  114. package/templates/marketing-site/src/app/(frontend)/[slug]/page.tsx +0 -25
  115. package/templates/marketing-site/src/app/(frontend)/page.tsx +0 -21
package/README.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # create-vexcms
2
2
 
3
+ > [!WARNING]
4
+ > `create-vexcms` is pre-release software, published only under the `alpha` npm
5
+ > dist-tag (`0.1.0-alpha.x`) — the `latest` tag on npm still points at an old,
6
+ > unrelated `0.0.20` line, so always scaffold with an explicit tag:
7
+ > `pnpm create vexcms@alpha`. Use it for experiments and evaluation only; the
8
+ > projects it scaffolds should not carry production traffic or real user data.
9
+ > Breaking changes land between alpha releases without deprecation cycles, and
10
+ > there is no migration path between alphas. See the
11
+ > [roadmap](https://docs.vexcms.dev) for what is and is not shipped.
12
+
3
13
  Scaffolding CLI for [VexCMS](https://github.com/ianyimi/vex) projects. Creates a complete
4
14
  Next.js application with a Convex backend, Better Auth authentication, and a self-hosted admin
5
15
  panel — ready to run.
@@ -7,19 +17,19 @@ panel — ready to run.
7
17
  ## Usage
8
18
 
9
19
  ```bash
10
- pnpm create vexcms@latest
20
+ pnpm create vexcms@alpha
11
21
  ```
12
22
 
13
23
  Or with a project name:
14
24
 
15
25
  ```bash
16
- pnpm create vexcms@latest my-project
26
+ pnpm create vexcms@alpha my-project
17
27
  ```
18
28
 
19
29
  Supports relative paths, including scaffolding straight into a monorepo app directory:
20
30
 
21
31
  ```bash
22
- pnpm create vexcms@latest apps/website
32
+ pnpm create vexcms@alpha apps/website
23
33
  ```
24
34
 
25
35
  ## Flags
@@ -33,16 +43,16 @@ pnpm create vexcms@latest apps/website
33
43
 
34
44
  ```bash
35
45
  # Empty project, no pre-built collections
36
- pnpm create vexcms@latest my-app --bare
46
+ pnpm create vexcms@alpha my-app --bare
37
47
 
38
48
  # Project with multi-tenant organizations
39
- pnpm create vexcms@latest my-app --orgs
49
+ pnpm create vexcms@alpha my-app --orgs
40
50
 
41
51
  # Non-interactive, defaults only
42
- pnpm create vexcms@latest my-app --yes
52
+ pnpm create vexcms@alpha my-app --yes
43
53
 
44
54
  # Inside a pnpm workspace, catalog-aware
45
- pnpm create vexcms@latest my-app --monorepo --yes
55
+ pnpm create vexcms@alpha my-app --monorepo --yes
46
56
  ```
47
57
 
48
58
  ## Interactive prompts
@@ -90,6 +100,17 @@ site:
90
100
  - `convex/seed.ts` — an idempotent `init` mutation seeding site settings, a header, a footer, the
91
101
  starter palettes, and a complete home page from the blocks' own defaults (`pnpm seed`)
92
102
 
103
+ ### Configuration
104
+
105
+ Every scaffold ships two config files: `src/vex.config.ts` — client-safe, holds collections,
106
+ globals, media collections, access rules, and the auth collections
107
+ `betterAuthCollections(authSchema)` derives from `src/auth/schema.ts` — and
108
+ `src/vex.config.server.ts`, which layers the Better Auth adapter and the storage adapter(s)
109
+ onto it via `defineServerConfig`. Nothing is generated for auth: `src/auth/schema.ts` is the
110
+ one source of truth for model names and fields (organizations on or off, per the `--orgs`
111
+ flag) — the client config calls `betterAuthCollections()` on it directly, and
112
+ `src/auth/options.ts` spreads it into the real Better Auth options.
113
+
93
114
  ## Getting started
94
115
 
95
116
  After scaffolding:
@@ -110,13 +131,25 @@ First run only — links or creates a Convex project and prints your real
110
131
  replacing the generated placeholder values so the app stops pointing at
111
132
  `https://placeholder.convex.cloud`. Leave `Ctrl-C` once it reports functions are ready.
112
133
 
134
+ `next.config.ts` derives `images.remotePatterns` from `NEXT_PUBLIC_CONVEX_URL`
135
+ automatically, so `next/image` picks up the real deployment's hostname without any
136
+ further edits.
137
+
113
138
  ### 2. Configure environment variables
114
139
 
115
140
  The installer writes `.env.local` with a generated `BETTER_AUTH_SECRET`,
116
141
  `NEXT_PUBLIC_SITE_URL`, and `SITE_URL` already filled in — only the two Convex URLs above need
117
- replacing for local dev. In the [Convex Dashboard](https://dashboard.convex.dev), add
118
- `BETTER_AUTH_SECRET` and `SITE_URL` under **Settings → Environment Variables** using the same
119
- values so server-side auth checks and email links resolve correctly.
142
+ replacing for local dev.
143
+
144
+ Better Auth runs *inside* the Convex deployment, not the Next.js server, so it never reads
145
+ `.env.local`. Push the same two values to the deployment itself:
146
+
147
+ ```bash
148
+ npx convex env set SITE_URL http://localhost:3010
149
+ npx convex env set BETTER_AUTH_SECRET <the BETTER_AUTH_SECRET value from .env.local>
150
+ ```
151
+
152
+ Skipping this step is the most common cause of a `403` on the first sign-in attempt.
120
153
 
121
154
  ### 3. Run the dev servers
122
155
 
@@ -145,7 +178,7 @@ Run from inside an existing pnpm workspace to scaffold a new app under it instea
145
178
  standalone project:
146
179
 
147
180
  ```bash
148
- pnpm create vexcms@latest my-app --monorepo --yes
181
+ pnpm create vexcms@alpha my-app --monorepo --yes
149
182
  ```
150
183
 
151
184
  The installer walks up from the current directory for the nearest `pnpm-workspace.yaml`, targets
@@ -156,11 +189,12 @@ versions), and skips both `git init` and dependency install — the root workspa
156
189
  ## Versioning
157
190
 
158
191
  `create-vexcms` is versioned alongside every `@vexcms/*` package. Running
159
- `pnpm create vexcms@latest` always scaffolds with the latest package versions; pin a specific
160
- release the same way:
192
+ `pnpm create vexcms@alpha` always scaffolds with the newest pre-release. The npm
193
+ `latest` tag still points at an old, unrelated `0.0.20` line, so `@alpha` — or an
194
+ exact version — is the only way to get the current API:
161
195
 
162
196
  ```bash
163
- pnpm create vexcms@0.1.0
197
+ pnpm create vexcms@0.1.0-alpha.10
164
198
  ```
165
199
 
166
200
  The scaffolded project's `@vexcms/*` dependencies match the version of `create-vexcms` used to