create-vexcms 0.0.3

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 (116) hide show
  1. package/dist/index.d.ts +1 -0
  2. package/dist/index.js +2409 -0
  3. package/package.json +37 -0
  4. package/templates/base-nextjs/.prettierignore +26 -0
  5. package/templates/base-nextjs/.prettierrc +7 -0
  6. package/templates/base-nextjs/README.md +256 -0
  7. package/templates/base-nextjs/_gitignore +2 -0
  8. package/templates/base-nextjs/components.json +24 -0
  9. package/templates/base-nextjs/convex/_generated/api.d.ts +125 -0
  10. package/templates/base-nextjs/convex/_generated/api.js +23 -0
  11. package/templates/base-nextjs/convex/_generated/dataModel.d.ts +60 -0
  12. package/templates/base-nextjs/convex/_generated/server.d.ts +143 -0
  13. package/templates/base-nextjs/convex/_generated/server.js +93 -0
  14. package/templates/base-nextjs/convex/auth/adapter/index.ts +230 -0
  15. package/templates/base-nextjs/convex/auth/adapter/utils.ts +547 -0
  16. package/templates/base-nextjs/convex/auth/api.ts +8 -0
  17. package/templates/base-nextjs/convex/auth/config.ts +10 -0
  18. package/templates/base-nextjs/convex/auth/db.ts +303 -0
  19. package/templates/base-nextjs/convex/auth/index.ts +14 -0
  20. package/templates/base-nextjs/convex/auth/options.ts +63 -0
  21. package/templates/base-nextjs/convex/auth/plugins/index.ts +20 -0
  22. package/templates/base-nextjs/convex/auth/sessions.ts +60 -0
  23. package/templates/base-nextjs/convex/auth.config.ts +7 -0
  24. package/templates/base-nextjs/convex/convex.config.ts +5 -0
  25. package/templates/base-nextjs/convex/http.ts +28 -0
  26. package/templates/base-nextjs/convex/schema.ts +3 -0
  27. package/templates/base-nextjs/convex/vex/auth.ts +38 -0
  28. package/templates/base-nextjs/convex/vex/collections.ts +321 -0
  29. package/templates/base-nextjs/convex/vex/firstUser.ts +134 -0
  30. package/templates/base-nextjs/convex/vex/helpers.ts +33 -0
  31. package/templates/base-nextjs/convex/vex/impersonation.ts +51 -0
  32. package/templates/base-nextjs/convex/vex/media.ts +246 -0
  33. package/templates/base-nextjs/convex/vex/migrate.ts +74 -0
  34. package/templates/base-nextjs/convex/vex/model/collections.ts +196 -0
  35. package/templates/base-nextjs/convex/vex/model/media.ts +87 -0
  36. package/templates/base-nextjs/convex/vex/model/versions.ts +254 -0
  37. package/templates/base-nextjs/convex/vex/previewSnapshot.ts +53 -0
  38. package/templates/base-nextjs/convex/vex/versions.ts +588 -0
  39. package/templates/base-nextjs/eslint.config.mjs +164 -0
  40. package/templates/base-nextjs/next.config.ts +10 -0
  41. package/templates/base-nextjs/package.json +67 -0
  42. package/templates/base-nextjs/postcss.config.mjs +7 -0
  43. package/templates/base-nextjs/public/favicons/favicon.ico +0 -0
  44. package/templates/base-nextjs/public/file.svg +1 -0
  45. package/templates/base-nextjs/public/globe.svg +1 -0
  46. package/templates/base-nextjs/public/next.svg +1 -0
  47. package/templates/base-nextjs/public/vercel.svg +1 -0
  48. package/templates/base-nextjs/public/window.svg +1 -0
  49. package/templates/base-nextjs/src/app/(frontend)/@auth/(...)auth/[pathname]/page.tsx +9 -0
  50. package/templates/base-nextjs/src/app/(frontend)/@auth/(...)auth/[pathname]/view.tsx +23 -0
  51. package/templates/base-nextjs/src/app/(frontend)/@auth/default.tsx +3 -0
  52. package/templates/base-nextjs/src/app/(frontend)/@auth/page.tsx +3 -0
  53. package/templates/base-nextjs/src/app/(frontend)/auth/[pathname]/page.tsx +9 -0
  54. package/templates/base-nextjs/src/app/(frontend)/auth/[pathname]/view.tsx +11 -0
  55. package/templates/base-nextjs/src/app/(frontend)/layout.tsx +14 -0
  56. package/templates/base-nextjs/src/app/(frontend)/page.tsx +116 -0
  57. package/templates/base-nextjs/src/app/admin/AdminLayoutWrapper.tsx +33 -0
  58. package/templates/base-nextjs/src/app/admin/AdminPageWrapper.tsx +38 -0
  59. package/templates/base-nextjs/src/app/admin/RichTextFieldWithMedia.tsx +101 -0
  60. package/templates/base-nextjs/src/app/admin/[[...path]]/page.tsx +15 -0
  61. package/templates/base-nextjs/src/app/admin/layout.tsx +33 -0
  62. package/templates/base-nextjs/src/app/api/auth/[...all]/route.ts +6 -0
  63. package/templates/base-nextjs/src/app/favicon.ico +0 -0
  64. package/templates/base-nextjs/src/app/globals.css +130 -0
  65. package/templates/base-nextjs/src/app/layout.tsx +30 -0
  66. package/templates/base-nextjs/src/auth/client.tsx +41 -0
  67. package/templates/base-nextjs/src/auth/permissions.ts +102 -0
  68. package/templates/base-nextjs/src/auth/server.ts +16 -0
  69. package/templates/base-nextjs/src/auth/serverUtils.ts +64 -0
  70. package/templates/base-nextjs/src/auth/types.ts +3 -0
  71. package/templates/base-nextjs/src/components/component-example.tsx +474 -0
  72. package/templates/base-nextjs/src/components/example.tsx +52 -0
  73. package/templates/base-nextjs/src/components/providers/client.tsx +9 -0
  74. package/templates/base-nextjs/src/components/providers/convex.tsx +32 -0
  75. package/templates/base-nextjs/src/components/providers/server.tsx +15 -0
  76. package/templates/base-nextjs/src/components/providers/theme.tsx +11 -0
  77. package/templates/base-nextjs/src/components/ui/alert-dialog.tsx +162 -0
  78. package/templates/base-nextjs/src/components/ui/badge.tsx +52 -0
  79. package/templates/base-nextjs/src/components/ui/button.tsx +60 -0
  80. package/templates/base-nextjs/src/components/ui/card.tsx +92 -0
  81. package/templates/base-nextjs/src/components/ui/combobox.tsx +271 -0
  82. package/templates/base-nextjs/src/components/ui/dialog.tsx +135 -0
  83. package/templates/base-nextjs/src/components/ui/dropdown-menu.tsx +246 -0
  84. package/templates/base-nextjs/src/components/ui/field.tsx +224 -0
  85. package/templates/base-nextjs/src/components/ui/input-group.tsx +146 -0
  86. package/templates/base-nextjs/src/components/ui/input.tsx +20 -0
  87. package/templates/base-nextjs/src/components/ui/label.tsx +20 -0
  88. package/templates/base-nextjs/src/components/ui/select.tsx +189 -0
  89. package/templates/base-nextjs/src/components/ui/separator.tsx +21 -0
  90. package/templates/base-nextjs/src/components/ui/textarea.tsx +18 -0
  91. package/templates/base-nextjs/src/components/ui/theme-toggle.tsx +67 -0
  92. package/templates/base-nextjs/src/db/constants/auth.ts +8 -0
  93. package/templates/base-nextjs/src/db/constants/index.ts +44 -0
  94. package/templates/base-nextjs/src/db/types.ts +6 -0
  95. package/templates/base-nextjs/src/env.mjs +48 -0
  96. package/templates/base-nextjs/src/lib/utils.ts +6 -0
  97. package/templates/base-nextjs/src/proxy.ts +23 -0
  98. package/templates/base-nextjs/src/vexcms/access.ts +28 -0
  99. package/templates/base-nextjs/src/vexcms/auth.ts +4 -0
  100. package/templates/base-nextjs/src/vexcms/collections/index.ts +1 -0
  101. package/templates/base-nextjs/src/vexcms/collections/media.ts +15 -0
  102. package/templates/base-nextjs/src/vexcms/collections/users.ts +46 -0
  103. package/templates/base-nextjs/tsconfig.json +60 -0
  104. package/templates/base-nextjs/vex.config.ts +23 -0
  105. package/templates/marketing-site/convex/pages.ts +46 -0
  106. package/templates/marketing-site/src/app/(frontend)/[slug]/page.tsx +58 -0
  107. package/templates/marketing-site/src/app/(frontend)/preview/[slug]/page.tsx +69 -0
  108. package/templates/marketing-site/src/app/admin/AdminLayoutWrapper.tsx +71 -0
  109. package/templates/marketing-site/src/db/constants/index.ts +52 -0
  110. package/templates/marketing-site/src/vexcms/collections/footers.ts +28 -0
  111. package/templates/marketing-site/src/vexcms/collections/headers.ts +35 -0
  112. package/templates/marketing-site/src/vexcms/collections/index.ts +7 -0
  113. package/templates/marketing-site/src/vexcms/collections/pages.ts +40 -0
  114. package/templates/marketing-site/src/vexcms/collections/site_settings.ts +31 -0
  115. package/templates/marketing-site/src/vexcms/collections/themes.ts +37 -0
  116. package/templates/marketing-site/vex.config.ts +32 -0
package/package.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "create-vexcms",
3
+ "version": "0.0.3",
4
+ "type": "module",
5
+ "bin": {
6
+ "create-vexcms": "./dist/index.js"
7
+ },
8
+ "files": [
9
+ "dist",
10
+ "templates"
11
+ ],
12
+ "publishConfig": {
13
+ "access": "public"
14
+ },
15
+ "dependencies": {
16
+ "chalk": "^5.3.0",
17
+ "commander": "^12.0.0",
18
+ "execa": "^9.5.2",
19
+ "fs-extra": "^11.2.0",
20
+ "@inquirer/prompts": "^7.2.0",
21
+ "ora": "^8.1.0",
22
+ "sort-package-json": "^2.10.0",
23
+ "validate-npm-package-name": "^5.0.0"
24
+ },
25
+ "devDependencies": {
26
+ "@types/fs-extra": "^11.0.4",
27
+ "@types/validate-npm-package-name": "^4.0.2",
28
+ "tsup": "^8.5.0",
29
+ "typescript": "^5.9.3",
30
+ "vitest": "^4.0.0"
31
+ },
32
+ "scripts": {
33
+ "build": "tsup src/index.ts --format esm --dts",
34
+ "dev": "tsup src/index.ts --format esm --watch",
35
+ "test": "vitest run"
36
+ }
37
+ }
@@ -0,0 +1,26 @@
1
+ # Dependencies
2
+ node_modules
3
+ .pnp
4
+ .pnp.*
5
+
6
+ # Build outputs
7
+ .next
8
+ out
9
+ dist
10
+ build
11
+
12
+ # Generated files
13
+ convex/_generated
14
+
15
+ # Package manager
16
+ pnpm-lock.yaml
17
+ package-lock.json
18
+ yarn.lock
19
+
20
+ # Environment
21
+ .env*
22
+ !.env.example
23
+
24
+ # Misc
25
+ .DS_Store
26
+ *.pem
@@ -0,0 +1,7 @@
1
+ {
2
+ "semi": false,
3
+ "singleQuote": false,
4
+ "trailingComma": "es5",
5
+ "tabWidth": 2,
6
+ "printWidth": 100
7
+ }
@@ -0,0 +1,256 @@
1
+ # Next.js + Better Auth + Convex + shadcn/ui Template
2
+
3
+ A modern, production-ready SaaS template built with:
4
+
5
+ - **[Next.js](https://nextjs.org)** - The React framework for production with App Router
6
+ - **[Better Auth](https://www.better-auth.com/)** - Modern authentication with email/password and OAuth providers
7
+ - **[Convex](https://convex.dev/)** - Real-time database and backend
8
+ - **[shadcn/ui](https://ui.shadcn.com/)** - Beautifully designed components built on Radix UI
9
+ - **[Tailwind CSS](https://tailwindcss.com/)** - Utility-first CSS framework
10
+
11
+ ## Getting Started
12
+
13
+ ### 1. Prerequisites
14
+
15
+ - Node.js 18+ and npm/pnpm/yarn installed
16
+ - A Convex account (free at [convex.dev](https://convex.dev))
17
+
18
+ ### 2. Clone and Install
19
+
20
+ ```bash
21
+ # Clone this template
22
+ git clone <your-repo-url>
23
+ cd <your-project-name>
24
+
25
+ # Install dependencies
26
+ npm install
27
+ # or
28
+ pnpm install
29
+ # or
30
+ yarn install
31
+ ```
32
+
33
+ ### 3. Environment Setup
34
+
35
+ Copy the example environment file:
36
+
37
+ ```bash
38
+ cp .env.example .env
39
+ ```
40
+
41
+ ### 4. Generate Better Auth Secret
42
+
43
+ Generate a secure secret for Better Auth:
44
+
45
+ ```bash
46
+ npm run secret:create
47
+ # or
48
+ pnpm secret:create
49
+ # or
50
+ yarn secret:create
51
+ ```
52
+
53
+ This will generate a random 32-character hex string and copy it to your clipboard.
54
+
55
+ ### 5. Configure Convex
56
+
57
+ #### Set up Convex project
58
+
59
+ ```bash
60
+ npx convex dev
61
+ ```
62
+
63
+ This will:
64
+
65
+ - Create a new Convex project (or link to an existing one)
66
+ - Generate your `CONVEX_URL` and `NEXT_PUBLIC_CONVEX_URL`
67
+ - Start the Convex development server
68
+
69
+ #### Add environment variables to Convex
70
+
71
+ You need to add two critical environment variables to your Convex deployment via the [Convex Dashboard](https://dashboard.convex.dev):
72
+
73
+ 1. **BETTER_AUTH_SECRET**: Paste the secret you generated in step 4
74
+ 2. **SITE_URL**: Set to your application URL
75
+ - Development: `http://localhost:3000` (or whatever port your dev server uses)
76
+ - Production: Your production domain (e.g., `https://yourdomain.com`)
77
+
78
+ To add these in the Convex Dashboard:
79
+
80
+ 1. Go to your project at [dashboard.convex.dev](https://dashboard.convex.dev)
81
+ 2. Navigate to "Settings" → "Environment Variables"
82
+ 3. Add both `BETTER_AUTH_SECRET` and `SITE_URL`
83
+
84
+ ### 6. Update Your .env File
85
+
86
+ Update your `.env` file with the values from Convex setup:
87
+
88
+ ```env
89
+ NODE_ENV=development
90
+
91
+ # From Convex setup
92
+ CONVEX_URL=https://your-deployment.convex.cloud
93
+ NEXT_PUBLIC_CONVEX_URL=https://your-deployment.convex.cloud
94
+ CONVEX_SITE_URL=https://your-deployment.convex.site
95
+ NEXT_PUBLIC_CONVEX_SITE_URL=https://your-deployment.convex.site
96
+
97
+ # Better Auth (same secret you added to Convex Dashboard)
98
+ BETTER_AUTH_SECRET=your-generated-secret-here
99
+ NEXT_PUBLIC_SITE_URL=http://localhost:3000
100
+ ```
101
+
102
+ ### 7. Start Development
103
+
104
+ ```bash
105
+ # Terminal 1: Run Convex dev server
106
+ npx convex dev
107
+
108
+ # Terminal 2: Run the application
109
+ npm run dev
110
+ # or
111
+ pnpm dev
112
+ # or
113
+ yarn dev
114
+ ```
115
+
116
+ Visit `http://localhost:3000` to see your application running.
117
+
118
+ ## Authentication Setup
119
+
120
+ This project uses Better Auth for authentication.
121
+
122
+ <!-- {{OAUTH_SETUP_GUIDE}} -->
123
+
124
+ ## Customizing Authentication
125
+
126
+ ### Adding OAuth Providers
127
+
128
+ To add or modify OAuth providers:
129
+
130
+ 1. **Update Better Auth configuration** in `convex/auth/index.ts`:
131
+
132
+ ```typescript
133
+ export const createAuth = (ctx: GenericActionCtx<DataModel>) => {
134
+ return betterAuth({
135
+ socialProviders: {
136
+ google: {
137
+ clientId: process.env.GOOGLE_CLIENT_ID!,
138
+ clientSecret: process.env.GOOGLE_CLIENT_SECRET!,
139
+ redirectURI: `${process.env.SITE_URL}/api/auth/callback/google`,
140
+ },
141
+ // Add more providers
142
+ github: {
143
+ clientId: process.env.GITHUB_CLIENT_ID!,
144
+ clientSecret: process.env.GITHUB_CLIENT_SECRET!,
145
+ },
146
+ },
147
+ // ... rest of config
148
+ })
149
+ }
150
+ ```
151
+
152
+ 2. **Add credentials to Convex Dashboard** as environment variables
153
+
154
+ 3. **Consult the Better Auth documentation** for provider-specific configuration:
155
+ - [Better Auth Providers](https://www.better-auth.com/docs/authentication/social-login)
156
+
157
+ ### Customizing User Schema
158
+
159
+ To add custom fields to your user model:
160
+
161
+ 1. Update the `user.additionalFields` in `convex/auth/index.ts`
162
+ 2. Update your Convex schema accordingly
163
+ 3. See [Better Auth User Management](https://www.better-auth.com/docs/concepts/user-management) for details
164
+
165
+ ### Email/Password Configuration
166
+
167
+ The template has email/password authentication enabled by default. To customize:
168
+
169
+ - [Better Auth Email/Password Docs](https://www.better-auth.com/docs/authentication/email-password)
170
+ - [Email Verification Setup](https://www.better-auth.com/docs/authentication/email-verification)
171
+
172
+ ## Project Structure
173
+
174
+ ```
175
+ .
176
+ ├── src/
177
+ │ ├── app/ # Next.js App Router
178
+ │ │ ├── (frontend)/ # Frontend routes group
179
+ │ │ ├── api/ # API routes
180
+ │ │ └── layout.tsx # Root layout
181
+ │ ├── auth/ # Authentication components
182
+ │ ├── components/ # React components
183
+ │ ├── lib/ # Utilities and helpers
184
+ │ └── env.mjs # Typed environment variables
185
+ ├── convex/ # Convex backend
186
+ │ ├── auth/ # Better Auth integration
187
+ │ ├── schema.ts # Database schema
188
+ │ └── *.ts # Convex functions (queries, mutations, actions)
189
+ ├── public/ # Static assets
190
+ └── .env # Environment variables (not committed)
191
+ ```
192
+
193
+ ## Development Scripts
194
+
195
+ ```bash
196
+ npm run dev # Start development server
197
+ npm run build # Build for production
198
+ npm run start # Start production server
199
+ npm run lint # Lint code
200
+ npm run typecheck # Type check without emitting
201
+ npm run format # Format code with Prettier
202
+ npm run format:check # Check code formatting
203
+ npm run secret:create # Generate a Better Auth secret
204
+ ```
205
+
206
+ ## Documentation Resources
207
+
208
+ ### Core Technologies
209
+
210
+ - **Next.js**: [nextjs.org/docs](https://nextjs.org/docs)
211
+ - **Better Auth**: [better-auth.com/docs](https://www.better-auth.com/docs)
212
+ - **Convex**: [docs.convex.dev](https://docs.convex.dev)
213
+ - **shadcn/ui**: [ui.shadcn.com](https://ui.shadcn.com)
214
+ - **Tailwind CSS**: [tailwindcss.com/docs](https://tailwindcss.com/docs)
215
+
216
+ ### Integration Guides
217
+
218
+ - **Better Auth + Convex**: [better-auth.com/docs/integrations/convex](https://www.better-auth.com/docs/integrations/convex)
219
+ - **Better Auth + Next.js**: [better-auth.com/docs/integrations/nextjs](https://www.better-auth.com/docs/integrations/nextjs)
220
+
221
+ ## Deployment
222
+
223
+ ### Deploy to Production
224
+
225
+ 1. **Deploy Convex Backend**:
226
+
227
+ ```bash
228
+ npx convex deploy
229
+ ```
230
+
231
+ 2. **Update Convex environment variables** in production:
232
+ - Set `SITE_URL` to your production domain
233
+ - Keep `BETTER_AUTH_SECRET` the same (or rotate it)
234
+
235
+ 3. **Deploy your application** to your hosting provider (Vercel recommended):
236
+
237
+ For Vercel:
238
+
239
+ ```bash
240
+ npm install -g vercel
241
+ vercel
242
+ ```
243
+
244
+ Or connect your GitHub repository to Vercel for automatic deployments.
245
+
246
+ 4. **Update environment variables** in your hosting provider with production values:
247
+ - `NEXT_PUBLIC_CONVEX_URL`
248
+ - `NEXT_PUBLIC_CONVEX_SITE_URL`
249
+ - `NEXT_PUBLIC_SITE_URL`
250
+ - `BETTER_AUTH_SECRET`
251
+
252
+ See [Next.js Deployment](https://nextjs.org/docs/app/building-your-application/deploying) and [Convex Production Deployment](https://docs.convex.dev/production/hosting) for detailed deployment instructions.
253
+
254
+ ## License
255
+
256
+ MIT
@@ -0,0 +1,2 @@
1
+
2
+ .env.local
@@ -0,0 +1,24 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema.json",
3
+ "style": "base-vega",
4
+ "rsc": true,
5
+ "tsx": true,
6
+ "tailwind": {
7
+ "config": "",
8
+ "css": "src/app/globals.css",
9
+ "baseColor": "neutral",
10
+ "cssVariables": true,
11
+ "prefix": ""
12
+ },
13
+ "iconLibrary": "lucide",
14
+ "aliases": {
15
+ "components": "~/components",
16
+ "utils": "~/lib/utils",
17
+ "ui": "~/components/ui",
18
+ "lib": "~/lib",
19
+ "hooks": "~/hooks"
20
+ },
21
+ "menuColor": "default",
22
+ "menuAccent": "subtle",
23
+ "registries": {}
24
+ }
@@ -0,0 +1,125 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * Generated `api` utility.
4
+ *
5
+ * THIS CODE IS AUTOMATICALLY GENERATED.
6
+ *
7
+ * To regenerate, run `npx convex dev`.
8
+ * @module
9
+ */
10
+
11
+ import type * as auth_adapter_index from "../auth/adapter/index.js";
12
+ import type * as auth_adapter_utils from "../auth/adapter/utils.js";
13
+ import type * as auth_api from "../auth/api.js";
14
+ import type * as auth_config from "../auth/config.js";
15
+ import type * as auth_db from "../auth/db.js";
16
+ import type * as auth_index from "../auth/index.js";
17
+ import type * as auth_options from "../auth/options.js";
18
+ import type * as auth_plugins_index from "../auth/plugins/index.js";
19
+ import type * as auth_sessions from "../auth/sessions.js";
20
+ import type * as http from "../http.js";
21
+ import type * as vex_api_articles from "../vex/api/articles.js";
22
+ import type * as vex_api_categories from "../vex/api/categories.js";
23
+ import type * as vex_api_footers from "../vex/api/footers.js";
24
+ import type * as vex_api_headers from "../vex/api/headers.js";
25
+ import type * as vex_api_index from "../vex/api/index.js";
26
+ import type * as vex_api_media from "../vex/api/media.js";
27
+ import type * as vex_api_pages from "../vex/api/pages.js";
28
+ import type * as vex_api_posts from "../vex/api/posts.js";
29
+ import type * as vex_api_themes from "../vex/api/themes.js";
30
+ import type * as vex_api_user from "../vex/api/user.js";
31
+ import type * as vex_auth from "../vex/auth.js";
32
+ import type * as vex_collections from "../vex/collections.js";
33
+ import type * as vex_impersonation from "../vex/impersonation.js";
34
+ import type * as vex_media from "../vex/media.js";
35
+ import type * as vex_migrate from "../vex/migrate.js";
36
+ import type * as vex_model_api_articles from "../vex/model/api/articles.js";
37
+ import type * as vex_model_api_categories from "../vex/model/api/categories.js";
38
+ import type * as vex_model_api_footers from "../vex/model/api/footers.js";
39
+ import type * as vex_model_api_headers from "../vex/model/api/headers.js";
40
+ import type * as vex_model_api_media from "../vex/model/api/media.js";
41
+ import type * as vex_model_api_pages from "../vex/model/api/pages.js";
42
+ import type * as vex_model_api_posts from "../vex/model/api/posts.js";
43
+ import type * as vex_model_api_themes from "../vex/model/api/themes.js";
44
+ import type * as vex_model_api_user from "../vex/model/api/user.js";
45
+ import type * as vex_model_collections from "../vex/model/collections.js";
46
+ import type * as vex_model_media from "../vex/model/media.js";
47
+ import type * as vex_model_versions from "../vex/model/versions.js";
48
+ import type * as vex_previewSnapshot from "../vex/previewSnapshot.js";
49
+ import type * as vex_versions from "../vex/versions.js";
50
+
51
+ import type {
52
+ ApiFromModules,
53
+ FilterApi,
54
+ FunctionReference,
55
+ } from "convex/server";
56
+
57
+ declare const fullApi: ApiFromModules<{
58
+ "auth/adapter/index": typeof auth_adapter_index;
59
+ "auth/adapter/utils": typeof auth_adapter_utils;
60
+ "auth/api": typeof auth_api;
61
+ "auth/config": typeof auth_config;
62
+ "auth/db": typeof auth_db;
63
+ "auth/index": typeof auth_index;
64
+ "auth/options": typeof auth_options;
65
+ "auth/plugins/index": typeof auth_plugins_index;
66
+ "auth/sessions": typeof auth_sessions;
67
+ http: typeof http;
68
+ "vex/api/articles": typeof vex_api_articles;
69
+ "vex/api/categories": typeof vex_api_categories;
70
+ "vex/api/footers": typeof vex_api_footers;
71
+ "vex/api/headers": typeof vex_api_headers;
72
+ "vex/api/index": typeof vex_api_index;
73
+ "vex/api/media": typeof vex_api_media;
74
+ "vex/api/pages": typeof vex_api_pages;
75
+ "vex/api/posts": typeof vex_api_posts;
76
+ "vex/api/themes": typeof vex_api_themes;
77
+ "vex/api/user": typeof vex_api_user;
78
+ "vex/auth": typeof vex_auth;
79
+ "vex/collections": typeof vex_collections;
80
+ "vex/impersonation": typeof vex_impersonation;
81
+ "vex/media": typeof vex_media;
82
+ "vex/migrate": typeof vex_migrate;
83
+ "vex/model/api/articles": typeof vex_model_api_articles;
84
+ "vex/model/api/categories": typeof vex_model_api_categories;
85
+ "vex/model/api/footers": typeof vex_model_api_footers;
86
+ "vex/model/api/headers": typeof vex_model_api_headers;
87
+ "vex/model/api/media": typeof vex_model_api_media;
88
+ "vex/model/api/pages": typeof vex_model_api_pages;
89
+ "vex/model/api/posts": typeof vex_model_api_posts;
90
+ "vex/model/api/themes": typeof vex_model_api_themes;
91
+ "vex/model/api/user": typeof vex_model_api_user;
92
+ "vex/model/collections": typeof vex_model_collections;
93
+ "vex/model/media": typeof vex_model_media;
94
+ "vex/model/versions": typeof vex_model_versions;
95
+ "vex/previewSnapshot": typeof vex_previewSnapshot;
96
+ "vex/versions": typeof vex_versions;
97
+ }>;
98
+
99
+ /**
100
+ * A utility for referencing Convex functions in your app's public API.
101
+ *
102
+ * Usage:
103
+ * ```js
104
+ * const myFunctionReference = api.myModule.myFunction;
105
+ * ```
106
+ */
107
+ export declare const api: FilterApi<
108
+ typeof fullApi,
109
+ FunctionReference<any, "public">
110
+ >;
111
+
112
+ /**
113
+ * A utility for referencing Convex functions in your app's internal API.
114
+ *
115
+ * Usage:
116
+ * ```js
117
+ * const myFunctionReference = internal.myModule.myFunction;
118
+ * ```
119
+ */
120
+ export declare const internal: FilterApi<
121
+ typeof fullApi,
122
+ FunctionReference<any, "internal">
123
+ >;
124
+
125
+ export declare const components: {};
@@ -0,0 +1,23 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * Generated `api` utility.
4
+ *
5
+ * THIS CODE IS AUTOMATICALLY GENERATED.
6
+ *
7
+ * To regenerate, run `npx convex dev`.
8
+ * @module
9
+ */
10
+
11
+ import { anyApi, componentsGeneric } from "convex/server";
12
+
13
+ /**
14
+ * A utility for referencing Convex functions in your app's API.
15
+ *
16
+ * Usage:
17
+ * ```js
18
+ * const myFunctionReference = api.myModule.myFunction;
19
+ * ```
20
+ */
21
+ export const api = anyApi;
22
+ export const internal = anyApi;
23
+ export const components = componentsGeneric();
@@ -0,0 +1,60 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * Generated data model types.
4
+ *
5
+ * THIS CODE IS AUTOMATICALLY GENERATED.
6
+ *
7
+ * To regenerate, run `npx convex dev`.
8
+ * @module
9
+ */
10
+
11
+ import type {
12
+ DataModelFromSchemaDefinition,
13
+ DocumentByName,
14
+ TableNamesInDataModel,
15
+ SystemTableNames,
16
+ } from "convex/server";
17
+ import type { GenericId } from "convex/values";
18
+ import schema from "../schema.js";
19
+
20
+ /**
21
+ * The names of all of your Convex tables.
22
+ */
23
+ export type TableNames = TableNamesInDataModel<DataModel>;
24
+
25
+ /**
26
+ * The type of a document stored in Convex.
27
+ *
28
+ * @typeParam TableName - A string literal type of the table name (like "users").
29
+ */
30
+ export type Doc<TableName extends TableNames> = DocumentByName<
31
+ DataModel,
32
+ TableName
33
+ >;
34
+
35
+ /**
36
+ * An identifier for a document in Convex.
37
+ *
38
+ * Convex documents are uniquely identified by their `Id`, which is accessible
39
+ * on the `_id` field. To learn more, see [Document IDs](https://docs.convex.dev/using/document-ids).
40
+ *
41
+ * Documents can be loaded using `db.get(tableName, id)` in query and mutation functions.
42
+ *
43
+ * IDs are just strings at runtime, but this type can be used to distinguish them from other
44
+ * strings when type checking.
45
+ *
46
+ * @typeParam TableName - A string literal type of the table name (like "users").
47
+ */
48
+ export type Id<TableName extends TableNames | SystemTableNames> =
49
+ GenericId<TableName>;
50
+
51
+ /**
52
+ * A type describing your Convex data model.
53
+ *
54
+ * This type includes information about what tables you have, the type of
55
+ * documents stored in those tables, and the indexes defined on them.
56
+ *
57
+ * This type is used to parameterize methods like `queryGeneric` and
58
+ * `mutationGeneric` to make them type-safe.
59
+ */
60
+ export type DataModel = DataModelFromSchemaDefinition<typeof schema>;