create-convex-monorepo 0.2.0

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 (93) hide show
  1. package/CONTRIBUTING.md +55 -0
  2. package/LICENSE +21 -0
  3. package/README.md +213 -0
  4. package/assets/backend/PROVENANCE.md +3 -0
  5. package/assets/backend/convex/_generated/api.d.ts +51 -0
  6. package/assets/backend/convex/_generated/api.js +23 -0
  7. package/assets/backend/convex/_generated/dataModel.d.ts +60 -0
  8. package/assets/backend/convex/_generated/server.d.ts +162 -0
  9. package/assets/backend/convex/_generated/server.js +101 -0
  10. package/assets/backend/convex/messages.ts +38 -0
  11. package/assets/backend/convex/schema.ts +9 -0
  12. package/assets/backend/convex/tsconfig.json +26 -0
  13. package/assets/backend-blank/PROVENANCE.md +3 -0
  14. package/assets/backend-blank/convex/_generated/api.d.ts +45 -0
  15. package/assets/backend-blank/convex/_generated/api.js +23 -0
  16. package/assets/backend-blank/convex/_generated/dataModel.d.ts +60 -0
  17. package/assets/backend-blank/convex/_generated/server.d.ts +162 -0
  18. package/assets/backend-blank/convex/_generated/server.js +101 -0
  19. package/assets/backend-blank/convex/schema.ts +3 -0
  20. package/assets/setup/convex-setup.mjs +250 -0
  21. package/dist/cli/index.d.ts +2 -0
  22. package/dist/cli/index.js +19 -0
  23. package/dist/cli/index.js.map +1 -0
  24. package/dist/commands/create.d.ts +8 -0
  25. package/dist/commands/create.js +182 -0
  26. package/dist/commands/create.js.map +1 -0
  27. package/dist/generator/context.d.ts +3 -0
  28. package/dist/generator/context.js +81 -0
  29. package/dist/generator/context.js.map +1 -0
  30. package/dist/generator/index.d.ts +12 -0
  31. package/dist/generator/index.js +123 -0
  32. package/dist/generator/index.js.map +1 -0
  33. package/dist/generator/options.d.ts +15 -0
  34. package/dist/generator/options.js +85 -0
  35. package/dist/generator/options.js.map +1 -0
  36. package/dist/generator/types.d.ts +47 -0
  37. package/dist/generator/types.js +2 -0
  38. package/dist/generator/types.js.map +1 -0
  39. package/dist/index.d.ts +5 -0
  40. package/dist/index.js +3 -0
  41. package/dist/index.js.map +1 -0
  42. package/dist/integrations/auth/clerk/index.d.ts +2 -0
  43. package/dist/integrations/auth/clerk/index.js +114 -0
  44. package/dist/integrations/auth/clerk/index.js.map +1 -0
  45. package/dist/integrations/auth/index.d.ts +2 -0
  46. package/dist/integrations/auth/index.js +7 -0
  47. package/dist/integrations/auth/index.js.map +1 -0
  48. package/dist/integrations/auth/none/index.d.ts +2 -0
  49. package/dist/integrations/auth/none/index.js +18 -0
  50. package/dist/integrations/auth/none/index.js.map +1 -0
  51. package/dist/integrations/auth/shared.d.ts +11 -0
  52. package/dist/integrations/auth/shared.js +40 -0
  53. package/dist/integrations/auth/shared.js.map +1 -0
  54. package/dist/package-manager/index.d.ts +6 -0
  55. package/dist/package-manager/index.js +22 -0
  56. package/dist/package-manager/index.js.map +1 -0
  57. package/dist/templates/apps/expo/index.d.ts +2 -0
  58. package/dist/templates/apps/expo/index.js +91 -0
  59. package/dist/templates/apps/expo/index.js.map +1 -0
  60. package/dist/templates/apps/index.d.ts +2 -0
  61. package/dist/templates/apps/index.js +11 -0
  62. package/dist/templates/apps/index.js.map +1 -0
  63. package/dist/templates/apps/next/index.d.ts +2 -0
  64. package/dist/templates/apps/next/index.js +66 -0
  65. package/dist/templates/apps/next/index.js.map +1 -0
  66. package/dist/templates/apps/shared.d.ts +24 -0
  67. package/dist/templates/apps/shared.js +124 -0
  68. package/dist/templates/apps/shared.js.map +1 -0
  69. package/dist/templates/apps/tanstack-start/index.d.ts +2 -0
  70. package/dist/templates/apps/tanstack-start/index.js +82 -0
  71. package/dist/templates/apps/tanstack-start/index.js.map +1 -0
  72. package/dist/templates/apps/vite/index.d.ts +2 -0
  73. package/dist/templates/apps/vite/index.js +42 -0
  74. package/dist/templates/apps/vite/index.js.map +1 -0
  75. package/dist/templates/backend/index.d.ts +2 -0
  76. package/dist/templates/backend/index.js +58 -0
  77. package/dist/templates/backend/index.js.map +1 -0
  78. package/dist/templates/root/index.d.ts +2 -0
  79. package/dist/templates/root/index.js +178 -0
  80. package/dist/templates/root/index.js.map +1 -0
  81. package/dist/templates/versions.d.ts +18 -0
  82. package/dist/templates/versions.js +19 -0
  83. package/dist/templates/versions.js.map +1 -0
  84. package/dist/version.d.ts +1 -0
  85. package/dist/version.js +11 -0
  86. package/dist/version.js.map +1 -0
  87. package/docs/adding-a-framework.md +27 -0
  88. package/docs/adding-an-auth-provider.md +31 -0
  89. package/docs/architecture.md +49 -0
  90. package/docs/releases.md +78 -0
  91. package/docs/research.md +76 -0
  92. package/docs/verification.md +78 -0
  93. package/package.json +77 -0
@@ -0,0 +1,55 @@
1
+ # Contributing
2
+
3
+ Use Node.js 22.12 or newer and the pnpm version pinned in `package.json`.
4
+
5
+ ```sh
6
+ pnpm install
7
+ pnpm test
8
+ pnpm lint
9
+ pnpm typecheck
10
+ pnpm build
11
+ pnpm format:check
12
+ ```
13
+
14
+ `pnpm dev` runs the source CLI from this checkout:
15
+
16
+ ```sh
17
+ pnpm dev fixture --apps web:next,mobile:expo --no-install --no-git
18
+ ```
19
+
20
+ To check the package exactly as users receive it:
21
+
22
+ ```sh
23
+ pnpm pack
24
+ pnpm test:package
25
+ ```
26
+
27
+ The package smoke test installs the tarball in a temporary directory and exercises its binary, exports, starter assets and URL linker. Registry commands such as `pnpm create convex-monorepo` use the published package, not your checkout.
28
+
29
+ Install and check the generated project when changing templates. `pnpm test:e2e` runs the repository's generated-project checks; inspect its script and CI configuration for the current matrix. `pnpm test:backend` runs backend behavior tests. These commands can need network access and more time than unit tests. A template snapshot does not prove that its framework builds.
30
+
31
+ ## Scope a change
32
+
33
+ Describe the failing behavior, the generated combination involved, and the expected result. Preserve unrelated changes. Keep framework-specific work in its template and provider-specific work in its auth adapter. Read [architecture](docs/architecture.md), [adding a framework](docs/adding-a-framework.md), or [adding auth](docs/adding-an-auth-provider.md) before changing those contracts.
34
+
35
+ Check current upstream documentation before changing Convex generation, exports, bundler resolution, or SDK versions. Record compatibility findings in `docs/research.md`. Do not edit Convex-generated internals, cast away shared API types, or suppress errors to pass a build. Refresh official generated assets through supported Convex tooling when the example backend changes.
36
+
37
+ ## Tests and pull requests
38
+
39
+ Add focused regression tests for the behavior being fixed. Run generated-app typechecks and builds for affected frameworks and auth choices. For Expo, include Metro export evidence. Report exact checks run, failures, skipped checks, and whether real backend/auth interaction was exercised. Never include deployment keys or personal environment files in fixtures or logs.
40
+
41
+ Run `pnpm format` before the final checks. A pull request should state the concrete behavior change, compatibility impact, and verification. Keep snapshots small enough that reviewers can identify meaningful changes.
42
+
43
+ ## Releases
44
+
45
+ Use Conventional Commits for commits and PR titles. For example, `feat(cli): initialize Convex after generation`, `fix(expo): resolve shared backend imports`, or `docs: clarify deployment setup`. The PR title check runs on each pull request. Maintainers squash merge with that title so release-please can read the resulting commit.
46
+
47
+ Use `fix:` for a patch, `feat:` for a minor, and `!` for a breaking change, such as `feat(cli)!: change application selection flags`. Explain breaking changes and migration steps in the PR body. These rules also apply before v1.0, so a breaking change from 0.1.0 proposes 1.0.0. `perf:` also triggers a patch; other ordinary maintenance commits do not trigger a release alone.
48
+
49
+ Release-please maintains a PR with the next version and changelog. Do not add changeset files or manually bump versions for normal changes. Maintainers review and merge the release PR to create a GitHub release, which starts the npm publishing workflow. It verifies the release commit and publishes the tested tarball using a bootstrap token for the first release and trusted publishing afterward. See [release setup and publishing](docs/releases.md).
50
+
51
+ ## Reporting problems
52
+
53
+ Use the issue templates for reproducible bugs and concrete feature requests. Include framework/auth choices, operating system, Node and pnpm versions, and the first useful error. Remove credentials and deployment secrets. Do not post vulnerabilities with exploitable private details in public issues; contact the repository maintainers privately through their published contact information.
54
+
55
+ Set `CCM_EXAMPLE=none` when running `pnpm test:e2e` to check blank starters. The default is `messages`. New framework and auth combinations must support both choices or reject unsupported options explicitly.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 create-convex-monorepo contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,213 @@
1
+ # create-convex-monorepo
2
+
3
+ A TypeScript CLI that generates pnpm and Turborepo workspaces with multiple frontends sharing one typed Convex backend. Choose Next.js, Vite + React, TanStack Start, Expo, or a combination, with optional Clerk authentication.
4
+
5
+ The generator composes framework templates and auth adapters. It does not copy a single starter and delete unwanted pieces. Choose blank apps or a messages example. The example includes a query and mutation, plus compile-time assertions for the shared API's argument and return types.
6
+
7
+ ## Why this exists
8
+
9
+ Convex already generates an API from your backend functions. Sharing that API between independently bundled web and native apps should preserve its types without duplicating backend code. This project supplies the workspace wiring, framework-specific environment handling, and checks needed to keep that boundary intact.
10
+
11
+ ## Usage
12
+
13
+ Requires Node.js 22.12 or newer and pnpm for the generated workspace.
14
+
15
+ ```sh
16
+ pnpm create convex-monorepo@latest
17
+ ```
18
+
19
+ Or use npx:
20
+
21
+ ```sh
22
+ npx create-convex-monorepo@latest
23
+ ```
24
+
25
+ Both commands run the same CLI. You can also install it globally with `npm install --global create-convex-monorepo` and run `create-convex-monorepo` directly. Running through npx does not change the generated workspace's package manager, which is pnpm.
26
+
27
+ The first npm publication is being prepared. These registry commands become available after that release is published. Contributors can run the checkout with `pnpm dev`; see [CONTRIBUTING.md](CONTRIBUTING.md).
28
+
29
+ ## Interactive usage
30
+
31
+ With a terminal attached, the CLI asks for missing choices:
32
+
33
+ ```text
34
+ Project name? my-app
35
+ Package manager? pnpm
36
+ Application framework? Next.js
37
+ Application name? web
38
+ Add another frontend? Yes
39
+ Application framework? Expo / React Native
40
+ Application name? mobile
41
+ Add another frontend? No
42
+ Authentication? Clerk
43
+ Starter content? Blank project
44
+ Initialize git? Yes
45
+ Initialize Convex and link frontend URLs? Yes
46
+ ```
47
+
48
+ Selecting Convex initialization installs dependencies first, then opens Convex's own account and deployment prompts. Declining it leaves a separate dependency-install prompt. Turborepo and the backend, TypeScript config, and ESLint config packages are included in every v0.1 project.
49
+
50
+ ## Non-interactive usage
51
+
52
+ ```sh
53
+ pnpm create convex-monorepo@latest my-app --apps next,expo --example none --init-convex --yes
54
+ npx create-convex-monorepo@latest my-app --apps next,expo --auth clerk --yes
55
+ pnpm create convex-monorepo@latest my-app --apps web:next,admin:vite --no-install --no-git
56
+ pnpm create convex-monorepo@latest my-app --apps app:tanstack-start,dashboard:next --auth none --package-manager pnpm --yes
57
+ ```
58
+
59
+ | Option | Meaning |
60
+ | ----------------------------------- | ----------------------------------------------------------- |
61
+ | `--apps` | Comma-separated framework IDs or `name:framework` entries |
62
+ | `--auth` | `none`, the default, or `clerk` |
63
+ | `--example` | `messages`, the default, or `none` for blank projects |
64
+ | `--package-manager` | `pnpm`; other managers are rejected in v0.1 |
65
+ | `--install`, `--no-install` | Enable or skip dependency installation |
66
+ | `--init-convex`, `--no-init-convex` | Initialize Convex and link URLs; enables installation |
67
+ | `--git`, `--no-git` | Enable or skip `git init`; no commit is created |
68
+ | `--yes`, `-y` | Skip prompts and accept defaults, including install and git |
69
+ | `--help`, `--version` | Show usage or the generator version |
70
+
71
+ Without a terminal, prompts are disabled and install/git default to off unless explicitly enabled or `--yes` is passed. Explicit negative flags override `--yes`. Convex initialization defaults to off when prompts are skipped, including with `--yes`; request it explicitly with `--init-convex`. That flag still lets Convex prompt for an account or deployment, and conflicts with `--no-install`. The default app is Next.js. Project and app names must be lowercase letters, digits, and hyphens, at most 100 characters, with no path separators or reserved device names.
72
+
73
+ ## Blank projects
74
+
75
+ Choose **Blank project** in the starter-content prompt, or pass `--example none`:
76
+
77
+ ```sh
78
+ pnpm create convex-monorepo@latest my-app --apps next,expo --example none --yes
79
+ ```
80
+
81
+ Every selected app starts with a minimal page or screen showing its name. Convex providers, workspace dependencies, environment setup, and the selected auth integration remain configured. The backend has an empty schema and official generated types. There are no example tables, messages functions, access helpers, query/mutation screens, or demo-specific type-test files to remove.
82
+
83
+ Add your tables to `packages/backend/convex/schema.ts` and your functions beside it. Run `pnpm convex:dev` to generate their shared API references. With Clerk, add server-side identity and authorization checks to your protected functions. The blank starter retains sign-in controls and the existing authenticated provider behavior.
84
+
85
+ The choice applies to the whole workspace. `--example messages` keeps the existing query/mutation demo and remains the default, including with `--yes`.
86
+
87
+ ## Supported frameworks
88
+
89
+ | ID | Application | Public Convex variable |
90
+ | ---------------- | ------------------------ | ------------------------ |
91
+ | `next` | Next.js App Router | `NEXT_PUBLIC_CONVEX_URL` |
92
+ | `vite` | Vite + React | `VITE_CONVEX_URL` |
93
+ | `tanstack-start` | TanStack Start with Vite | `VITE_CONVEX_URL` |
94
+ | `expo` | Expo / React Native | `EXPO_PUBLIC_CONVEX_URL` |
95
+
96
+ Versions are pinned in the templates. Start uses ordinary Convex React hooks; server-side Convex prefetching is not configured. Expo's build command exports JavaScript, not native application binaries. See [research and upstream caveats](docs/research.md).
97
+
98
+ ## Generated architecture
99
+
100
+ ```text
101
+ my-app/
102
+ ├── apps/
103
+ │ ├── web/
104
+ │ ├── admin/ # if selected
105
+ │ └── mobile/ # if selected
106
+ ├── packages/
107
+ │ ├── backend/
108
+ │ │ ├── convex/_generated/
109
+ │ │ ├── convex/schema.ts
110
+ │ │ ├── convex/messages.ts # messages example only
111
+ │ │ ├── convex.json
112
+ │ │ └── package.json
113
+ │ ├── typescript-config/
114
+ │ └── eslint-config/
115
+ ├── convex-monorepo.json
116
+ ├── pnpm-workspace.yaml
117
+ ├── turbo.json
118
+ └── package.json
119
+ ```
120
+
121
+ `convex-monorepo.json` records the selected applications and auth provider. It is metadata for later tooling; it does not implement upgrade or add commands.
122
+
123
+ ## Multiple frontends
124
+
125
+ Use explicit names to choose folders and repeat a framework:
126
+
127
+ ```sh
128
+ pnpm create convex-monorepo@latest acme --apps web:next,admin:next,mobile:expo --yes
129
+ ```
130
+
131
+ Apps become `@acme/web`, `@acme/admin`, and `@acme/mobile`. All depend on `@acme/backend` through `workspace:*`. The generator assigns distinct web development ports. v0.1 creates a new workspace; adding an app to an existing workspace is not implemented.
132
+
133
+ ## First run and development
134
+
135
+ Inside the generated project:
136
+
137
+ ```sh
138
+ pnpm install # if installation was skipped
139
+ pnpm convex:setup
140
+ ```
141
+
142
+ Skip these commands if you selected initialization during generation. Setup runs the installed Convex CLI in `packages/backend`, selects or creates a deployment, and pushes once. After success, it links the backend's `CONVEX_URL` to every app's `.env.local` using that framework's public variable. Existing comments and other settings remain intact; backend credentials stay in the backend. For Clerk, follow the next section before completing the backend push.
143
+
144
+ After switching deployments, run `pnpm convex:link` to refresh the frontend URLs without initializing or pushing again. Restart development processes after linking. This updates local files only; configure production URLs separately in your hosting provider.
145
+
146
+ ```sh
147
+ pnpm dev # one backend watcher and all selected apps
148
+ pnpm dev:web # only the named app
149
+ pnpm convex:dev # only the backend watcher
150
+ pnpm typecheck
151
+ pnpm lint
152
+ pnpm build
153
+ ```
154
+
155
+ Complete setup in a normal terminal before starting Turbo. Stop a separately running backend watcher before `pnpm dev`, which starts its own. Public environment values are embedded at build time; rebuild frontends when they change. Backend build checks types and does not deploy.
156
+
157
+ ## Convex backend sharing
158
+
159
+ ```ts
160
+ import { api } from '@my-app/backend/api';
161
+ import type { Doc, Id } from '@my-app/backend/dataModel';
162
+ ```
163
+
164
+ `/api` points directly to Convex's original runtime JavaScript and paired declaration file. `/dataModel` is a type-only export. There is no bundled declaration file or root barrel. Keep the backend sources and `convex/_generated` in version control, and run `pnpm convex:dev` after changing backend modules.
165
+
166
+ Dynamic Convex declarations refer to backend source modules. Client TypeScript programs therefore inspect those sources, even though client runtime bundles should not include the backend implementations. Do not introduce incompatible backend-only path aliases or a frontend `rootDir` that excludes those sources. Apps using the messages example include `src/convex-api.type-test.ts` to detect lost inference. Blank API types are checked in disposable test fixtures. The [architecture](docs/architecture.md) explains the export contract.
167
+
168
+ ## Authentication
169
+
170
+ `--auth clerk` adds SDK-specific bindings, a Convex auth configuration, and provider wiring. The messages example also includes backend identity checks and an owner index that keeps messages private. With `--auth none`, that example is a public message board. Blank projects have no data or functions; add authorization checks when writing protected functions. UI visibility alone is not authorization.
171
+
172
+ Use one Clerk application across the frontends. Configure Clerk's Convex integration and a JWT template named `convex`. Set `CLERK_JWT_ISSUER_DOMAIN` on the Convex deployment:
173
+
174
+ ```sh
175
+ pnpm --filter @my-app/backend exec convex env set CLERK_JWT_ISSUER_DOMAIN https://your-instance.clerk.accounts.dev
176
+ ```
177
+
178
+ On a fresh deployment, first run `pnpm convex:setup` to select it. If the push reports a missing issuer, set that value and rerun setup. Repeat the configuration for production.
179
+
180
+ Append the variables from each app's `.env.clerk.example` to its `.env.local`, alongside the Convex URL. Publishable keys belong in the appropriate public variables. Next.js and Start use a server-only `CLERK_SECRET_KEY`; Vite and Expo must never receive that secret. See [Convex's Clerk guide](https://docs.convex.dev/auth/clerk).
181
+
182
+ ## Expo notes
183
+
184
+ Expo uses the SDK's React and React Native versions, the default `expo/metro-config`, and a shared workspace backend dependency. Do not add old manual symlink resolver overrides or upgrade React independently in one app.
185
+
186
+ Use a cloud development deployment for physical devices; `localhost` on a phone refers to the phone itself. The Clerk example uses Google OAuth and SecureStore token caching. Enable Google's connection and the Native API in your Clerk application, allow the generated scheme redirect listed in `.env.clerk.example`, and use a native development build for that scheme. Additional MFA and session-task flows are not implemented.
187
+
188
+ Typechecking and Metro export checks do not establish that real OAuth, device permissions, or native binaries work. Those require your Clerk configuration and device testing. See [Expo monorepos](https://docs.expo.dev/guides/monorepos/) and [Clerk Expo setup](https://clerk.com/docs/expo/getting-started/quickstart).
189
+
190
+ ## Troubleshooting
191
+
192
+ - **Destination already exists:** choose a new or empty directory. The CLI refuses non-empty directories and symlinks. Template failures remove staging output; install/git/Convex setup failures preserve the completed project and print a retry command.
193
+ - **Missing URL screen:** run `pnpm convex:setup`, or `pnpm convex:link` if the backend is already configured, then restart development.
194
+ - **Authentication never connects:** check the `convex` JWT template and deployment issuer. Use the same Clerk application across frontends.
195
+ - **Missing API types:** keep both generated JavaScript and declarations, run the backend watcher, and verify matching Convex versions. Do not fix this by casting the API.
196
+ - **Missing Start route tree:** run that app's `routes:generate` script. Its typecheck script runs route generation automatically.
197
+ - **Metro resolution after dependency changes:** run `pnpm --filter @my-app/mobile exec expo start --clear`. Check SDK-compatible dependency versions before changing resolver settings.
198
+
199
+ [Research](docs/research.md) records upstream reports about declaration bundling, large backend type graphs, hoisted Node external packages, and Windows component symlinks. An open report is not proof that its failure reproduces on the pinned versions.
200
+
201
+ ## Contributing
202
+
203
+ See [CONTRIBUTING.md](CONTRIBUTING.md), [adding a framework](docs/adding-a-framework.md), and [adding an auth provider](docs/adding-an-auth-provider.md). Run generated-project checks when changing templates; generator unit tests alone cannot verify a framework bundler.
204
+
205
+ ## Roadmap
206
+
207
+ The next release should add `doctor` to check deployment URLs, generated types, version alignment, and auth setup in an existing workspace. Later candidates are `add app`, another auth provider, and additional package-manager adapters. These commands are not available in v0.1.
208
+
209
+ MIT licensed. See [LICENSE](LICENSE).
210
+
211
+ ## Verification record
212
+
213
+ See [the v0.1 verification record](docs/verification.md) for executed installs, typechecks, framework builds, Metro exports, backend tests and remaining runtime limits.
@@ -0,0 +1,3 @@
1
+ Generated files under convex/\_generated were produced unchanged by convex@1.45.0 with CONVEX_AGENT_MODE=anonymous convex dev --once on 2026-09-09. Dynamic JS/declaration output. Input modules: schema.ts, messages.ts, access.ts. access.ts is supplied by the selected auth adapter; its exported helper has no registered public functions. No internal codegen entry point was called. Run normal convex dev after changing backend modules.
2
+
3
+ Convex SDK source is Apache-2.0 licensed: https://github.com/get-convex/convex-js/blob/main/LICENSE.
@@ -0,0 +1,51 @@
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 access from "../access.js";
12
+ import type * as messages from "../messages.js";
13
+
14
+ import type {
15
+ ApiFromModules,
16
+ FilterApi,
17
+ FunctionReference,
18
+ } from "convex/server";
19
+
20
+ declare const fullApi: ApiFromModules<{
21
+ access: typeof access;
22
+ messages: typeof messages;
23
+ }>;
24
+
25
+ /**
26
+ * A utility for referencing Convex functions in your app's public API.
27
+ *
28
+ * Usage:
29
+ * ```js
30
+ * const myFunctionReference = api.myModule.myFunction;
31
+ * ```
32
+ */
33
+ export declare const api: FilterApi<
34
+ typeof fullApi,
35
+ FunctionReference<any, "public">
36
+ >;
37
+
38
+ /**
39
+ * A utility for referencing Convex functions in your app's internal API.
40
+ *
41
+ * Usage:
42
+ * ```js
43
+ * const myFunctionReference = internal.myModule.myFunction;
44
+ * ```
45
+ */
46
+ export declare const internal: FilterApi<
47
+ typeof fullApi,
48
+ FunctionReference<any, "internal">
49
+ >;
50
+
51
+ 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>;
@@ -0,0 +1,162 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * Generated utilities for implementing server-side Convex query and mutation functions.
4
+ *
5
+ * THIS CODE IS AUTOMATICALLY GENERATED.
6
+ *
7
+ * To regenerate, run `npx convex dev`.
8
+ * @module
9
+ */
10
+
11
+ import {
12
+ ActionBuilder,
13
+ HttpActionBuilder,
14
+ MutationBuilder,
15
+ QueryBuilder,
16
+ GenericActionCtx,
17
+ GenericMutationCtx,
18
+ GenericQueryCtx,
19
+ GenericDatabaseReader,
20
+ GenericDatabaseWriter,
21
+ } from "convex/server";
22
+ import type { DataModel } from "./dataModel.js";
23
+
24
+ /**
25
+ * Typesafe environment variables.
26
+ *
27
+ * This includes platform-provided env vars and any variables declared in
28
+ * `convex.config.ts`.
29
+ */
30
+ type Env = {
31
+ readonly CONVEX_CLOUD_URL: string;
32
+ readonly CONVEX_SITE_URL: string;
33
+ };
34
+
35
+ /**
36
+ * Define a query in this Convex app's public API.
37
+ *
38
+ * This function will be allowed to read your Convex database and will be accessible from the client.
39
+ *
40
+ * @param func - The query function. It receives a {@link QueryCtx} as its first argument.
41
+ * @returns The wrapped query. Include this as an `export` to name it and make it accessible.
42
+ */
43
+ export declare const query: QueryBuilder<DataModel, "public">;
44
+
45
+ /**
46
+ * Define a query that is only accessible from other Convex functions (but not from the client).
47
+ *
48
+ * This function will be allowed to read from your Convex database. It will not be accessible from the client.
49
+ *
50
+ * @param func - The query function. It receives a {@link QueryCtx} as its first argument.
51
+ * @returns The wrapped query. Include this as an `export` to name it and make it accessible.
52
+ */
53
+ export declare const internalQuery: QueryBuilder<DataModel, "internal">;
54
+
55
+ /**
56
+ * Define a mutation in this Convex app's public API.
57
+ *
58
+ * This function will be allowed to modify your Convex database and will be accessible from the client.
59
+ *
60
+ * @param func - The mutation function. It receives a {@link MutationCtx} as its first argument.
61
+ * @returns The wrapped mutation. Include this as an `export` to name it and make it accessible.
62
+ */
63
+ export declare const mutation: MutationBuilder<DataModel, "public">;
64
+
65
+ /**
66
+ * Define a mutation that is only accessible from other Convex functions (but not from the client).
67
+ *
68
+ * This function will be allowed to modify your Convex database. It will not be accessible from the client.
69
+ *
70
+ * @param func - The mutation function. It receives a {@link MutationCtx} as its first argument.
71
+ * @returns The wrapped mutation. Include this as an `export` to name it and make it accessible.
72
+ */
73
+ export declare const internalMutation: MutationBuilder<DataModel, "internal">;
74
+
75
+ /**
76
+ * Define an action in this Convex app's public API.
77
+ *
78
+ * An action is a function which can execute any JavaScript code, including non-deterministic
79
+ * code and code with side-effects, like calling third-party services.
80
+ * They can be run in Convex's JavaScript environment or in Node.js using the "use node" directive.
81
+ * They can interact with the database indirectly by calling queries and mutations using the {@link ActionCtx}.
82
+ *
83
+ * @param func - The action. It receives an {@link ActionCtx} as its first argument.
84
+ * @returns The wrapped action. Include this as an `export` to name it and make it accessible.
85
+ */
86
+ export declare const action: ActionBuilder<DataModel, "public">;
87
+
88
+ /**
89
+ * Define an action that is only accessible from other Convex functions (but not from the client).
90
+ *
91
+ * @param func - The function. It receives an {@link ActionCtx} as its first argument.
92
+ * @returns The wrapped function. Include this as an `export` to name it and make it accessible.
93
+ */
94
+ export declare const internalAction: ActionBuilder<DataModel, "internal">;
95
+
96
+ /**
97
+ * Define an HTTP action.
98
+ *
99
+ * The wrapped function will be used to respond to HTTP requests received
100
+ * by a Convex deployment if the requests matches the path and method where
101
+ * this action is routed. Be sure to route your httpAction in `convex/http.js`.
102
+ *
103
+ * @param func - The function. It receives an {@link ActionCtx} as its first argument
104
+ * and a Fetch API `Request` object as its second.
105
+ * @returns The wrapped function. Import this function from `convex/http.js` and route it to hook it up.
106
+ */
107
+ export declare const httpAction: HttpActionBuilder;
108
+
109
+ /**
110
+ * Typesafe environment variables.
111
+ *
112
+ * This includes platform-provided env vars and any variables declared in
113
+ * `convex.config.ts`.
114
+ */
115
+ export declare const env: Env;
116
+
117
+ /**
118
+ * A set of services for use within Convex query functions.
119
+ *
120
+ * The query context is passed as the first argument to any Convex query
121
+ * function run on the server.
122
+ *
123
+ * This differs from the {@link MutationCtx} because all of the services are
124
+ * read-only.
125
+ */
126
+ export type QueryCtx = GenericQueryCtx<DataModel>;
127
+
128
+ /**
129
+ * A set of services for use within Convex mutation functions.
130
+ *
131
+ * The mutation context is passed as the first argument to any Convex mutation
132
+ * function run on the server.
133
+ */
134
+ export type MutationCtx = GenericMutationCtx<DataModel>;
135
+
136
+ /**
137
+ * A set of services for use within Convex action functions.
138
+ *
139
+ * The action context is passed as the first argument to any Convex action
140
+ * function run on the server.
141
+ */
142
+ export type ActionCtx = GenericActionCtx<DataModel>;
143
+
144
+ /**
145
+ * An interface to read from the database within Convex query functions.
146
+ *
147
+ * The two entry points are {@link DatabaseReader.get}, which fetches a single
148
+ * document by its {@link Id}, or {@link DatabaseReader.query}, which starts
149
+ * building a query.
150
+ */
151
+ export type DatabaseReader = GenericDatabaseReader<DataModel>;
152
+
153
+ /**
154
+ * An interface to read from and write to the database within Convex mutation
155
+ * functions.
156
+ *
157
+ * Convex guarantees that all writes within a single mutation are
158
+ * executed atomically, so you never have to worry about partial writes leaving
159
+ * your data in an inconsistent state. See [the Convex Guide](https://docs.convex.dev/understanding/convex-fundamentals/functions#atomicity-and-optimistic-concurrency-control)
160
+ * for the guarantees Convex provides your functions.
161
+ */
162
+ export type DatabaseWriter = GenericDatabaseWriter<DataModel>;