create-vexcms 0.1.0-alpha.2 → 0.1.0-alpha.20
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/README.md +48 -14
- package/dist/index.js +1714 -1504
- package/package.json +1 -1
- package/templates/base-nextjs/README.md +18 -5
- package/templates/base-nextjs/convex/auth/index.ts +2 -2
- package/templates/base-nextjs/convex/auth/options.ts +27 -26
- package/templates/base-nextjs/convex/auth/schema.ts +51 -0
- package/templates/base-nextjs/convex/auth/sessions.ts +3 -3
- package/templates/base-nextjs/convex/tsconfig.json +2 -2
- package/templates/base-nextjs/convex/vex/firstUser.ts +2 -2
- package/templates/base-nextjs/convex/vex/globals.ts +3 -2
- package/templates/base-nextjs/convex/vex/media.ts +3 -2
- package/templates/base-nextjs/convex/vex.schema.ts +1 -0
- package/templates/base-nextjs/convex/vex.ts +17 -4
- package/templates/base-nextjs/next.config.ts +52 -6
- package/templates/base-nextjs/package.json +18 -7
- package/templates/base-nextjs/public/favicons/favicon.ico +0 -0
- package/templates/base-nextjs/src/app/(frontend)/@auth/(...)auth/[pathname]/view.tsx +27 -15
- package/templates/base-nextjs/src/app/(vexcms)/admin/[[...path]]/page.tsx +2 -2
- package/templates/base-nextjs/src/app/(vexcms)/admin/clientProviders.tsx +9 -14
- package/templates/base-nextjs/src/app/(vexcms)/admin/layout.tsx +8 -6
- package/templates/base-nextjs/src/app/api/vex/revalidate/route.ts +19 -0
- package/templates/base-nextjs/src/app/globals.css +10 -9
- package/templates/base-nextjs/src/app/layout.tsx +6 -0
- package/templates/base-nextjs/src/auth/access.ts +14 -2
- package/templates/base-nextjs/src/auth/serverUtils.ts +20 -6
- package/templates/base-nextjs/src/components/WelcomePage.tsx +54 -43
- package/templates/base-nextjs/src/components/component-example.tsx +1 -1
- package/templates/base-nextjs/src/components/providers/server.tsx +16 -8
- package/templates/base-nextjs/src/vex.config.server.ts +30 -0
- package/templates/base-nextjs/src/vex.config.ts +14 -11
- package/templates/base-nextjs/src/vex.types.ts +2 -1
- package/templates/base-nextjs/src/vexcms/collections/images.ts +1 -1
- package/templates/base-nextjs/src/vexcms/collections/users.ts +3 -1
- package/templates/marketing-site/convex/pages.ts +20 -1
- package/templates/marketing-site/convex/schema.ts +4 -4
- package/templates/marketing-site/convex/seed.ts +515 -70
- package/templates/marketing-site/convex/siteSettings.ts +1 -1
- package/templates/marketing-site/convex/theme.ts +3 -3
- package/templates/marketing-site/convex/vex.schema.ts +75 -38
- package/templates/marketing-site/public/favicon.svg +14 -0
- package/templates/marketing-site/public/favicons/apple-touch-icon.png +0 -0
- package/templates/marketing-site/public/favicons/favicon.ico +0 -0
- package/templates/marketing-site/src/app/(frontend)/{PageContent.tsx → (site)/PageContent.tsx} +7 -8
- package/templates/marketing-site/src/app/(frontend)/(site)/[slug]/page.tsx +58 -0
- package/templates/marketing-site/src/app/(frontend)/(site)/layout.tsx +49 -0
- package/templates/marketing-site/src/app/(frontend)/(site)/page.tsx +28 -0
- package/templates/marketing-site/src/app/(frontend)/layout.tsx +10 -24
- package/templates/marketing-site/src/app/(vexcms)/admin/layout.tsx +32 -0
- package/templates/marketing-site/src/app/globals.css +374 -0
- package/templates/marketing-site/src/app/layout.tsx +85 -0
- package/templates/marketing-site/src/app/robots.ts +13 -0
- package/templates/marketing-site/src/app/sitemap.ts +18 -0
- package/templates/marketing-site/src/components/BrandMark.tsx +27 -0
- package/templates/marketing-site/src/components/CodePane.tsx +86 -0
- package/templates/marketing-site/src/components/Container.tsx +25 -0
- package/templates/marketing-site/src/components/CopyButton.tsx +80 -0
- package/templates/marketing-site/src/components/FirstAdminBootstrap.tsx +54 -0
- package/templates/marketing-site/src/components/InstallCommand.tsx +29 -0
- package/templates/marketing-site/src/components/MediaImage.tsx +59 -0
- package/templates/marketing-site/src/components/SectionHeader.tsx +51 -0
- package/templates/marketing-site/src/components/SiteFooter.tsx +8 -6
- package/templates/marketing-site/src/components/SiteHeader.tsx +8 -6
- package/templates/marketing-site/src/components/ThemeLive.tsx +1 -2
- package/templates/marketing-site/src/components/ThemeStyle.tsx +3 -3
- package/templates/marketing-site/src/components/motion-primitives/animated-group.tsx +44 -120
- package/templates/marketing-site/src/components/motion-primitives/reveal.module.css +32 -0
- package/templates/marketing-site/src/components/motion-primitives/text-effect.tsx +47 -266
- package/templates/marketing-site/src/lib/highlight.ts +71 -0
- package/templates/marketing-site/src/lib/metadata.ts +61 -33
- package/templates/marketing-site/src/lib/shikiStarkEmber.json +57 -0
- package/templates/marketing-site/src/lib/vex.ts +18 -0
- package/templates/marketing-site/src/proxy.ts +123 -0
- package/templates/marketing-site/src/vex.config.server.ts +27 -0
- package/templates/marketing-site/src/vex.config.ts +19 -9
- package/templates/marketing-site/src/vex.types.ts +102 -76
- package/templates/marketing-site/src/vexcms/api.ts +2 -2
- package/templates/marketing-site/src/vexcms/blocks/CTA/config.ts +3 -2
- package/templates/marketing-site/src/vexcms/blocks/CTA/index.tsx +40 -24
- package/templates/marketing-site/src/vexcms/blocks/CodeShowcase/config.ts +62 -0
- package/templates/marketing-site/src/vexcms/blocks/CodeShowcase/index.tsx +106 -0
- package/templates/marketing-site/src/vexcms/blocks/FAQ/config.ts +4 -3
- package/templates/marketing-site/src/vexcms/blocks/FAQ/index.tsx +63 -50
- package/templates/marketing-site/src/vexcms/blocks/Features/config.ts +1 -0
- package/templates/marketing-site/src/vexcms/blocks/Features/index.tsx +43 -58
- package/templates/marketing-site/src/vexcms/blocks/Footer/config.ts +6 -3
- package/templates/marketing-site/src/vexcms/blocks/Footer/index.tsx +90 -53
- package/templates/marketing-site/src/vexcms/blocks/Header/config.ts +10 -3
- package/templates/marketing-site/src/vexcms/blocks/Header/index.tsx +205 -138
- package/templates/marketing-site/src/vexcms/blocks/Hero/config.ts +27 -12
- package/templates/marketing-site/src/vexcms/blocks/Hero/index.tsx +174 -119
- package/templates/marketing-site/src/vexcms/blocks/HowItWorks/config.ts +2 -1
- package/templates/marketing-site/src/vexcms/blocks/HowItWorks/index.tsx +59 -51
- package/templates/marketing-site/src/vexcms/blocks/Roadmap/config.ts +26 -5
- package/templates/marketing-site/src/vexcms/blocks/Roadmap/index.tsx +256 -73
- package/templates/marketing-site/src/vexcms/blocks/Split/config.ts +62 -0
- package/templates/marketing-site/src/vexcms/blocks/Split/index.tsx +186 -0
- package/templates/marketing-site/src/vexcms/blocks/Stats/config.ts +35 -0
- package/templates/marketing-site/src/vexcms/blocks/Stats/index.tsx +77 -0
- package/templates/marketing-site/src/vexcms/blocks/config.ts +27 -11
- package/templates/marketing-site/src/vexcms/blocks/constants.ts +3 -0
- package/templates/marketing-site/src/vexcms/blocks/index.ts +9 -0
- package/templates/marketing-site/src/vexcms/collections/footers.ts +1 -0
- package/templates/marketing-site/src/vexcms/collections/headers.ts +1 -0
- package/templates/marketing-site/src/vexcms/collections/pages.ts +19 -1
- package/templates/marketing-site/src/vexcms/collections/themeColors.ts +14 -14
- package/templates/marketing-site/src/vexcms/collections/users.ts +20 -0
- package/dist/index.mjs +0 -30976
- package/templates/marketing-site/src/app/(frontend)/[slug]/page.tsx +0 -25
- 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@
|
|
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@
|
|
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@
|
|
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@
|
|
46
|
+
pnpm create vexcms@alpha my-app --bare
|
|
37
47
|
|
|
38
48
|
# Project with multi-tenant organizations
|
|
39
|
-
pnpm create vexcms@
|
|
49
|
+
pnpm create vexcms@alpha my-app --orgs
|
|
40
50
|
|
|
41
51
|
# Non-interactive, defaults only
|
|
42
|
-
pnpm create vexcms@
|
|
52
|
+
pnpm create vexcms@alpha my-app --yes
|
|
43
53
|
|
|
44
54
|
# Inside a pnpm workspace, catalog-aware
|
|
45
|
-
pnpm create vexcms@
|
|
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.
|
|
118
|
-
|
|
119
|
-
|
|
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@
|
|
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@
|
|
160
|
-
|
|
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
|