@dedesfr/prompter 0.8.23 → 1.0.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.
- package/CHANGELOG.md +70 -0
- package/README.md +105 -77
- package/dist/cli/index.js +25 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/init.d.ts +1 -7
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +60 -299
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/login.d.ts +4 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +56 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/logout.d.ts +4 -0
- package/dist/commands/logout.d.ts.map +1 -0
- package/dist/commands/logout.js +14 -0
- package/dist/commands/logout.js.map +1 -0
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +31 -41
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/whoami.d.ts +4 -0
- package/dist/commands/whoami.d.ts.map +1 -0
- package/dist/commands/whoami.js +42 -0
- package/dist/commands/whoami.js.map +1 -0
- package/dist/core/auth-store.d.ts +10 -0
- package/dist/core/auth-store.d.ts.map +1 -0
- package/dist/core/auth-store.js +39 -0
- package/dist/core/auth-store.js.map +1 -0
- package/dist/core/configurators/slash/antigravity.d.ts +2 -5
- package/dist/core/configurators/slash/antigravity.d.ts.map +1 -1
- package/dist/core/configurators/slash/antigravity.js +2 -57
- package/dist/core/configurators/slash/antigravity.js.map +1 -1
- package/dist/core/configurators/slash/base.d.ts +6 -18
- package/dist/core/configurators/slash/base.d.ts.map +1 -1
- package/dist/core/configurators/slash/base.js +8 -77
- package/dist/core/configurators/slash/base.js.map +1 -1
- package/dist/core/configurators/slash/claude.d.ts +2 -5
- package/dist/core/configurators/slash/claude.d.ts.map +1 -1
- package/dist/core/configurators/slash/claude.js +2 -57
- package/dist/core/configurators/slash/claude.js.map +1 -1
- package/dist/core/configurators/slash/codex.d.ts +2 -5
- package/dist/core/configurators/slash/codex.d.ts.map +1 -1
- package/dist/core/configurators/slash/codex.js +2 -57
- package/dist/core/configurators/slash/codex.js.map +1 -1
- package/dist/core/configurators/slash/droid.d.ts +2 -5
- package/dist/core/configurators/slash/droid.d.ts.map +1 -1
- package/dist/core/configurators/slash/droid.js +2 -32
- package/dist/core/configurators/slash/droid.js.map +1 -1
- package/dist/core/configurators/slash/forge.d.ts +2 -5
- package/dist/core/configurators/slash/forge.d.ts.map +1 -1
- package/dist/core/configurators/slash/forge.js +2 -32
- package/dist/core/configurators/slash/forge.js.map +1 -1
- package/dist/core/configurators/slash/github-copilot.d.ts +2 -7
- package/dist/core/configurators/slash/github-copilot.d.ts.map +1 -1
- package/dist/core/configurators/slash/github-copilot.js +2 -96
- package/dist/core/configurators/slash/github-copilot.js.map +1 -1
- package/dist/core/configurators/slash/index.d.ts +1 -1
- package/dist/core/configurators/slash/index.d.ts.map +1 -1
- package/dist/core/configurators/slash/index.js +1 -1
- package/dist/core/configurators/slash/index.js.map +1 -1
- package/dist/core/configurators/slash/kilocode.d.ts +2 -5
- package/dist/core/configurators/slash/kilocode.d.ts.map +1 -1
- package/dist/core/configurators/slash/kilocode.js +2 -57
- package/dist/core/configurators/slash/kilocode.js.map +1 -1
- package/dist/core/configurators/slash/opencode.d.ts +2 -5
- package/dist/core/configurators/slash/opencode.d.ts.map +1 -1
- package/dist/core/configurators/slash/opencode.js +2 -57
- package/dist/core/configurators/slash/opencode.js.map +1 -1
- package/dist/core/configurators/slash/registry.d.ts +4 -4
- package/dist/core/configurators/slash/registry.d.ts.map +1 -1
- package/dist/core/configurators/slash/registry.js.map +1 -1
- package/dist/core/registry.d.ts +18 -0
- package/dist/core/registry.d.ts.map +1 -0
- package/dist/core/registry.js +94 -0
- package/dist/core/registry.js.map +1 -0
- package/dist/core/templates/index.d.ts +0 -1
- package/dist/core/templates/index.d.ts.map +1 -1
- package/dist/core/templates/index.js +0 -1
- package/dist/core/templates/index.js.map +1 -1
- package/package.json +7 -1
- package/AGENTS.md +0 -123
- package/CLAUDE.md +0 -17
- package/build.js +0 -20
- package/convex-setup.md +0 -403
- package/dist/core/templates/slash-command-templates.d.ts +0 -7
- package/dist/core/templates/slash-command-templates.d.ts.map +0 -1
- package/dist/core/templates/slash-command-templates.js +0 -1041
- package/dist/core/templates/slash-command-templates.js.map +0 -1
- package/prompt/ai-humanizer.md +0 -45
- package/prompt/api-contract-generator.md +0 -234
- package/prompt/apply.md +0 -17
- package/prompt/archive.md +0 -21
- package/prompt/design-system.md +0 -210
- package/prompt/document-explainer.md +0 -149
- package/prompt/epic-generator.md +0 -198
- package/prompt/epic-single.md +0 -47
- package/prompt/erd-generator.md +0 -130
- package/prompt/fsd-generator.md +0 -157
- package/prompt/prd-agent-generator.md +0 -147
- package/prompt/prd-generator.md +0 -195
- package/prompt/product-brief.md +0 -289
- package/prompt/proposal.md +0 -22
- package/prompt/qa-test-scenario.md +0 -133
- package/prompt/skill-creator.md +0 -350
- package/prompt/story-generator.md +0 -278
- package/prompt/story-single.md +0 -70
- package/prompt/tdd-generator.md +0 -294
- package/prompt/tdd-lite-generator.md +0 -224
- package/prompt/wireframe-generator.md +0 -219
- package/skills/ai-context-generator/SKILL.md +0 -54
- package/skills/ai-context-generator/references/AGENTS.template.md +0 -83
- package/skills/ai-context-generator/references/CLAUDE.template.md +0 -39
- package/skills/ai-context-generator/references/behavioral-guidelines.md +0 -71
- package/skills/ai-context-generator/references/discovery-checklist.md +0 -40
- package/skills/ai-context-generator/references/examples/AGENTS.good.md +0 -103
- package/skills/ai-context-generator/references/extraction-checklist.md +0 -23
- package/skills/ai-context-generator/references/overlays/laravel.md +0 -44
- package/skills/cerebro/SKILL.md +0 -187
- package/skills/cerebro/references/agents.md +0 -213
- package/skills/code-review/SKILL.md +0 -373
- package/skills/code-review/assets/report-template-agent.md +0 -212
- package/skills/code-review/assets/report-template-compact.md +0 -81
- package/skills/code-review/assets/report-template-full.md +0 -264
- package/skills/code-review/assets/report-template-human.md +0 -168
- package/skills/code-review/references/universal-patterns.md +0 -495
- package/skills/design-md/README.md +0 -34
- package/skills/design-md/SKILL.md +0 -172
- package/skills/design-md/examples/DESIGN.md +0 -154
- package/skills/design-system-generator/SKILL.md +0 -324
- package/skills/design-system-generator/assets/design-system-template.md +0 -348
- package/skills/design-system-generator/references/extraction-patterns.md +0 -321
- package/skills/doc-builder/SKILL.md +0 -115
- package/skills/doc-builder/references/ui-patterns.md +0 -394
- package/skills/document-translator/SKILL.md +0 -58
- package/skills/enhance-prompt/README.md +0 -34
- package/skills/enhance-prompt/SKILL.md +0 -204
- package/skills/enhance-prompt/references/KEYWORDS.md +0 -114
- package/skills/feature-planner/SKILL.md +0 -305
- package/skills/feature-planner/assets/implementation-plan-template.md +0 -85
- package/skills/frontend-design/LICENSE.txt +0 -177
- package/skills/frontend-design/SKILL.md +0 -42
- package/skills/gamma-builder/SKILL.md +0 -134
- package/skills/laravel-code-review/SKILL.md +0 -383
- package/skills/laravel-code-review/assets/report-template-agent.md +0 -195
- package/skills/laravel-code-review/assets/report-template-compact.md +0 -79
- package/skills/laravel-code-review/assets/report-template-full.md +0 -253
- package/skills/laravel-code-review/assets/report-template-human.md +0 -159
- package/skills/laravel-code-review/references/laravel-patterns.md +0 -571
- package/skills/laravel-code-review/references/php84-features.md +0 -442
- package/skills/mcp-builder/LICENSE.txt +0 -202
- package/skills/mcp-builder/SKILL.md +0 -236
- package/skills/mcp-builder/reference/evaluation.md +0 -602
- package/skills/mcp-builder/reference/mcp_best_practices.md +0 -249
- package/skills/mcp-builder/reference/node_mcp_server.md +0 -970
- package/skills/mcp-builder/reference/python_mcp_server.md +0 -719
- package/skills/mcp-builder/scripts/connections.py +0 -151
- package/skills/mcp-builder/scripts/evaluation.py +0 -373
- package/skills/mcp-builder/scripts/example_evaluation.xml +0 -22
- package/skills/mcp-builder/scripts/requirements.txt +0 -2
- package/skills/meeting-notes/SKILL.md +0 -159
- package/skills/meeting-notes/evals/evals.json +0 -23
- package/skills/project-orchestrator/SKILL.md +0 -487
- package/skills/project-orchestrator/assets/caddy-vps-setup.md +0 -180
- package/skills/project-orchestrator/assets/plan-summary-template.md +0 -159
- package/skills/prompter-specs/SKILL.md +0 -115
- package/skills/prompter-workflow/SKILL.md +0 -166
- package/skills/prompter-workflow/evals/evals.json +0 -89
- package/skills/sph-generator/SKILL.md +0 -488
- package/skills/ui-ux-pro/SKILL.md +0 -199
- package/skills/ui-ux-pro/assets/design-spec-template.md +0 -173
- package/skills/ui-ux-pro/references/component-patterns.md +0 -255
- package/skills/ui-ux-pro/references/design-principles.md +0 -167
- package/src/cli/index.ts +0 -223
- package/src/commands/archive.ts +0 -302
- package/src/commands/change.ts +0 -292
- package/src/commands/config.ts +0 -233
- package/src/commands/guide.ts +0 -50
- package/src/commands/init.ts +0 -899
- package/src/commands/list.ts +0 -194
- package/src/commands/show.ts +0 -138
- package/src/commands/spec.ts +0 -251
- package/src/commands/update.ts +0 -156
- package/src/commands/upgrade.ts +0 -30
- package/src/commands/validate.ts +0 -326
- package/src/core/artifact-graph/graph.ts +0 -167
- package/src/core/artifact-graph/index.ts +0 -44
- package/src/core/artifact-graph/instruction-loader.ts +0 -302
- package/src/core/artifact-graph/resolver.ts +0 -226
- package/src/core/artifact-graph/schema.ts +0 -124
- package/src/core/artifact-graph/state.ts +0 -64
- package/src/core/artifact-graph/types.ts +0 -65
- package/src/core/completions/command-registry.ts +0 -382
- package/src/core/completions/completion-provider.ts +0 -128
- package/src/core/completions/generators/bash-generator.ts +0 -191
- package/src/core/completions/generators/fish-generator.ts +0 -188
- package/src/core/completions/generators/powershell-generator.ts +0 -223
- package/src/core/completions/generators/zsh-generator.ts +0 -281
- package/src/core/completions/templates/bash-templates.ts +0 -24
- package/src/core/completions/templates/fish-templates.ts +0 -40
- package/src/core/completions/templates/powershell-templates.ts +0 -25
- package/src/core/completions/templates/zsh-templates.ts +0 -36
- package/src/core/completions/types.ts +0 -90
- package/src/core/config-schema.ts +0 -230
- package/src/core/config.ts +0 -181
- package/src/core/configurators/slash/antigravity.ts +0 -70
- package/src/core/configurators/slash/base.ts +0 -203
- package/src/core/configurators/slash/claude.ts +0 -70
- package/src/core/configurators/slash/codex.ts +0 -70
- package/src/core/configurators/slash/droid.ts +0 -44
- package/src/core/configurators/slash/forge.ts +0 -44
- package/src/core/configurators/slash/github-copilot.ts +0 -114
- package/src/core/configurators/slash/index.ts +0 -10
- package/src/core/configurators/slash/kilocode.ts +0 -70
- package/src/core/configurators/slash/opencode.ts +0 -70
- package/src/core/configurators/slash/registry.ts +0 -51
- package/src/core/converters/json-converter.ts +0 -62
- package/src/core/global-config.ts +0 -136
- package/src/core/parsers/change-parser.ts +0 -234
- package/src/core/parsers/markdown-parser.ts +0 -237
- package/src/core/parsers/requirement-blocks.ts +0 -234
- package/src/core/prompt-templates.ts +0 -3504
- package/src/core/schemas/base.schema.ts +0 -20
- package/src/core/schemas/change.schema.ts +0 -42
- package/src/core/schemas/index.ts +0 -20
- package/src/core/schemas/spec.schema.ts +0 -17
- package/src/core/skill-discovery.ts +0 -68
- package/src/core/specs-apply.ts +0 -483
- package/src/core/styles/palette.ts +0 -8
- package/src/core/templates/agents-template.ts +0 -459
- package/src/core/templates/claude-template.ts +0 -2
- package/src/core/templates/index.ts +0 -4
- package/src/core/templates/project-template.ts +0 -32
- package/src/core/templates/slash-command-templates.ts +0 -1068
- package/src/core/validation/constants.ts +0 -48
- package/src/core/validation/types.ts +0 -19
- package/src/core/validation/validator.ts +0 -449
- package/src/core/view.ts +0 -219
- package/src/index.ts +0 -1
- package/src/utils/change-metadata.ts +0 -171
- package/src/utils/change-utils.ts +0 -131
- package/src/utils/file-system.ts +0 -252
- package/src/utils/index.ts +0 -12
- package/src/utils/interactive.ts +0 -29
- package/src/utils/item-discovery.ts +0 -66
- package/src/utils/match.ts +0 -26
- package/src/utils/shell-detection.ts +0 -62
- package/src/utils/task-progress.ts +0 -43
- package/tsconfig.json +0 -28
package/convex-setup.md
DELETED
|
@@ -1,403 +0,0 @@
|
|
|
1
|
-
# Convex Self-Hosted Setup Guide
|
|
2
|
-
|
|
3
|
-
This document explains how to set up a self-hosted Convex deployment for this project using the official Convex self-hosted flow.
|
|
4
|
-
|
|
5
|
-
It covers:
|
|
6
|
-
|
|
7
|
-
- the Convex backend container
|
|
8
|
-
- the Convex dashboard container
|
|
9
|
-
- the frontend app connected through `VITE_CONVEX_URL`
|
|
10
|
-
- the Convex CLI workflow for deploying schema and functions to a self-hosted instance
|
|
11
|
-
|
|
12
|
-
## Official self-hosted flow
|
|
13
|
-
|
|
14
|
-
The official Convex self-hosted documentation uses this sequence:
|
|
15
|
-
|
|
16
|
-
1. start the backend and dashboard
|
|
17
|
-
2. generate the admin key from the running backend container
|
|
18
|
-
3. save `CONVEX_SELF_HOSTED_URL` and `CONVEX_SELF_HOSTED_ADMIN_KEY` in `.env.local`
|
|
19
|
-
4. use the Convex CLI to deploy schema and functions
|
|
20
|
-
5. run queries, mutations, imports, or seeds against the self-hosted backend
|
|
21
|
-
|
|
22
|
-
Important:
|
|
23
|
-
|
|
24
|
-
- The CLI admin key is generated from the running backend.
|
|
25
|
-
- Do not assume the Docker env value `CONVEX_ADMIN_KEY` is the same value the CLI expects.
|
|
26
|
-
- Do not use a random `openssl rand -hex 32` string as `CONVEX_SELF_HOSTED_ADMIN_KEY` unless Convex explicitly tells you to do so for your setup.
|
|
27
|
-
|
|
28
|
-
## How this project is wired
|
|
29
|
-
|
|
30
|
-
### Frontend
|
|
31
|
-
|
|
32
|
-
The frontend creates the Convex React client from `VITE_CONVEX_URL`:
|
|
33
|
-
|
|
34
|
-
```ts
|
|
35
|
-
const convex = new ConvexReactClient(import.meta.env.VITE_CONVEX_URL as string);
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
That means:
|
|
39
|
-
|
|
40
|
-
- `VITE_CONVEX_URL` must be reachable by the browser
|
|
41
|
-
- the frontend needs this value during local development
|
|
42
|
-
- when building the Docker image, the same value must be passed as a build argument
|
|
43
|
-
|
|
44
|
-
### Deploy script
|
|
45
|
-
|
|
46
|
-
This project exposes a self-hosted deploy script in `package.json`:
|
|
47
|
-
|
|
48
|
-
```json
|
|
49
|
-
{
|
|
50
|
-
"scripts": {
|
|
51
|
-
"deploy:selfhosted": "convex deploy --url $CONVEX_SELF_HOSTED_URL --admin-key $CONVEX_SELF_HOSTED_ADMIN_KEY"
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
## Prerequisites
|
|
57
|
-
|
|
58
|
-
Install these first:
|
|
59
|
-
|
|
60
|
-
- Node.js 22+
|
|
61
|
-
- npm
|
|
62
|
-
- Docker Desktop or Docker Engine with Compose
|
|
63
|
-
- project dependencies installed with `npm install`
|
|
64
|
-
|
|
65
|
-
If `node` or `npm` are missing from your `PATH`, use the Node 22 install configured for this project:
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
export PATH="$HOME/.nvm/versions/node/v22.17.1/bin:$PATH"
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
## Environment variables used by this project
|
|
72
|
-
|
|
73
|
-
This project uses two different configuration contexts.
|
|
74
|
-
|
|
75
|
-
### 1. Docker Compose environment
|
|
76
|
-
|
|
77
|
-
The compose stack reads values such as:
|
|
78
|
-
|
|
79
|
-
```env
|
|
80
|
-
APP_ENV=dev
|
|
81
|
-
WEB_PORT=8080
|
|
82
|
-
CONVEX_PORT=3220
|
|
83
|
-
CONVEX_DASHBOARD_PORT=3221
|
|
84
|
-
CONVEX_DASHBOARD_UI_PORT=6792
|
|
85
|
-
VITE_CONVEX_URL=http://localhost:3220
|
|
86
|
-
CONVEX_ADMIN_KEY=replace-with-placeholder-if-needed
|
|
87
|
-
CONVEX_CLOUD_ORIGIN=http://localhost:3220
|
|
88
|
-
CONVEX_SITE_ORIGIN=http://localhost:6792
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
Notes:
|
|
92
|
-
|
|
93
|
-
- `CONVEX_ADMIN_KEY` is passed into the backend container.
|
|
94
|
-
- In practice, the Convex CLI should use the admin key generated from the running backend container.
|
|
95
|
-
- `CONVEX_CLOUD_ORIGIN` should point to the backend API origin.
|
|
96
|
-
- `CONVEX_SITE_ORIGIN` should point to the dashboard UI origin.
|
|
97
|
-
|
|
98
|
-
### 2. Local CLI and frontend environment
|
|
99
|
-
|
|
100
|
-
For local development, `.env.local` should contain:
|
|
101
|
-
|
|
102
|
-
```env
|
|
103
|
-
VITE_CONVEX_URL=http://localhost:3220
|
|
104
|
-
CONVEX_SELF_HOSTED_URL=http://localhost:3220
|
|
105
|
-
CONVEX_SELF_HOSTED_ADMIN_KEY=convex-self-hosted|generated-from-container
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
Notes:
|
|
109
|
-
|
|
110
|
-
- `VITE_CONVEX_URL` is used by the frontend.
|
|
111
|
-
- `CONVEX_SELF_HOSTED_URL` and `CONVEX_SELF_HOSTED_ADMIN_KEY` are used by the Convex CLI.
|
|
112
|
-
- `.env.local` should not be committed.
|
|
113
|
-
|
|
114
|
-
## Reference Docker Compose pattern
|
|
115
|
-
|
|
116
|
-
This project uses the same high-level pattern as the official self-hosted documentation: one backend service and one dashboard service.
|
|
117
|
-
|
|
118
|
-
```yaml
|
|
119
|
-
services:
|
|
120
|
-
convex:
|
|
121
|
-
image: ghcr.io/get-convex/convex-backend:latest
|
|
122
|
-
ports:
|
|
123
|
-
- "${CONVEX_PORT:-3210}:3210"
|
|
124
|
-
- "${CONVEX_DASHBOARD_PORT:-3211}:3211"
|
|
125
|
-
volumes:
|
|
126
|
-
- convex-data:/convex/data
|
|
127
|
-
environment:
|
|
128
|
-
CONVEX_ADMIN_KEY: ${CONVEX_ADMIN_KEY}
|
|
129
|
-
CONVEX_CLOUD_ORIGIN: ${CONVEX_CLOUD_ORIGIN}
|
|
130
|
-
CONVEX_SITE_ORIGIN: ${CONVEX_SITE_ORIGIN}
|
|
131
|
-
|
|
132
|
-
convex-dashboard:
|
|
133
|
-
image: ghcr.io/get-convex/convex-dashboard:latest
|
|
134
|
-
depends_on:
|
|
135
|
-
convex:
|
|
136
|
-
condition: service_started
|
|
137
|
-
ports:
|
|
138
|
-
- "${CONVEX_DASHBOARD_UI_PORT:-6791}:6791"
|
|
139
|
-
environment:
|
|
140
|
-
NEXT_PUBLIC_DEPLOYMENT_URL: ${CONVEX_CLOUD_ORIGIN}
|
|
141
|
-
NEXT_PUBLIC_LOAD_MONACO_INTERNALLY: "true"
|
|
142
|
-
|
|
143
|
-
volumes:
|
|
144
|
-
convex-data:
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
In this repository, the actual compose file also includes a `web` service for the frontend.
|
|
148
|
-
|
|
149
|
-
## Step-by-step setup for this project
|
|
150
|
-
|
|
151
|
-
### 1. Install dependencies
|
|
152
|
-
|
|
153
|
-
From the repository root:
|
|
154
|
-
|
|
155
|
-
```bash
|
|
156
|
-
npm install
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
### 2. Create `.env.dev`
|
|
160
|
-
|
|
161
|
-
Copy the development template:
|
|
162
|
-
|
|
163
|
-
```bash
|
|
164
|
-
cp env.dev.example .env.dev
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
Recommended local values:
|
|
168
|
-
|
|
169
|
-
```env
|
|
170
|
-
APP_ENV=dev
|
|
171
|
-
WEB_PORT=8080
|
|
172
|
-
CONVEX_PORT=3220
|
|
173
|
-
CONVEX_DASHBOARD_PORT=3221
|
|
174
|
-
CONVEX_DASHBOARD_UI_PORT=6792
|
|
175
|
-
VITE_CONVEX_URL=http://localhost:3220
|
|
176
|
-
CONVEX_ADMIN_KEY=replace-with-placeholder-if-needed
|
|
177
|
-
CONVEX_CLOUD_ORIGIN=http://localhost:3220
|
|
178
|
-
CONVEX_SITE_ORIGIN=http://localhost:6792
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
Important:
|
|
182
|
-
|
|
183
|
-
- Treat `CONVEX_ADMIN_KEY` here as backend container configuration.
|
|
184
|
-
- Do not copy this value into `CONVEX_SELF_HOSTED_ADMIN_KEY` for CLI usage unless you have confirmed it is the generated self-hosted admin key for your instance.
|
|
185
|
-
|
|
186
|
-
### 3. Create `.env.local`
|
|
187
|
-
|
|
188
|
-
Create the local file with the frontend URL first:
|
|
189
|
-
|
|
190
|
-
```bash
|
|
191
|
-
cat > .env.local <<'EOF'
|
|
192
|
-
VITE_CONVEX_URL=http://localhost:3220
|
|
193
|
-
EOF
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
You will append the self-hosted CLI settings after the backend starts and after you generate the real admin key.
|
|
197
|
-
|
|
198
|
-
### 4. Start the Convex backend and dashboard
|
|
199
|
-
|
|
200
|
-
Run:
|
|
201
|
-
|
|
202
|
-
```bash
|
|
203
|
-
docker compose --env-file .env.dev up -d convex convex-dashboard
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
Check status:
|
|
207
|
-
|
|
208
|
-
```bash
|
|
209
|
-
docker compose --env-file .env.dev ps
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
Expected result:
|
|
213
|
-
|
|
214
|
-
- `convex` is running
|
|
215
|
-
- `convex-dashboard` is running
|
|
216
|
-
|
|
217
|
-
By default for local development in this project:
|
|
218
|
-
|
|
219
|
-
- backend API is available at `http://localhost:3220`
|
|
220
|
-
- backend dashboard/API port is mapped at `http://localhost:3221`
|
|
221
|
-
- dashboard UI is available at `http://localhost:6792`
|
|
222
|
-
|
|
223
|
-
## 5. Generate the real self-hosted admin key
|
|
224
|
-
|
|
225
|
-
After the backend is running, generate the admin key from the live Convex container.
|
|
226
|
-
|
|
227
|
-
Run:
|
|
228
|
-
|
|
229
|
-
```bash
|
|
230
|
-
docker compose --env-file .env.dev exec convex ./generate_admin_key.sh
|
|
231
|
-
```
|
|
232
|
-
|
|
233
|
-
Expected output format:
|
|
234
|
-
|
|
235
|
-
```text
|
|
236
|
-
convex-self-hosted|...
|
|
237
|
-
```
|
|
238
|
-
|
|
239
|
-
Copy that exact value.
|
|
240
|
-
|
|
241
|
-
Now append the self-hosted CLI settings to `.env.local`:
|
|
242
|
-
|
|
243
|
-
```bash
|
|
244
|
-
cat >> .env.local <<'EOF'
|
|
245
|
-
CONVEX_SELF_HOSTED_URL=http://localhost:3220
|
|
246
|
-
CONVEX_SELF_HOSTED_ADMIN_KEY=paste-the-generated-key-here
|
|
247
|
-
EOF
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
Important:
|
|
251
|
-
|
|
252
|
-
- Use the generated key exactly as printed.
|
|
253
|
-
- If you later recreate the backend state, generate the key again.
|
|
254
|
-
- If the backend uses a persistent Docker volume, the instance credentials can persist across restarts.
|
|
255
|
-
|
|
256
|
-
## 6. Deploy schema and functions
|
|
257
|
-
|
|
258
|
-
With `.env.local` configured, deploy the Convex schema and functions:
|
|
259
|
-
|
|
260
|
-
```bash
|
|
261
|
-
npm run deploy:selfhosted
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
Equivalent raw command:
|
|
265
|
-
|
|
266
|
-
```bash
|
|
267
|
-
convex deploy --url "$CONVEX_SELF_HOSTED_URL" --admin-key "$CONVEX_SELF_HOSTED_ADMIN_KEY"
|
|
268
|
-
```
|
|
269
|
-
|
|
270
|
-
If deployment succeeds, the self-hosted backend now has the current Convex schema and functions.
|
|
271
|
-
|
|
272
|
-
### Project-specific warning
|
|
273
|
-
|
|
274
|
-
This repository currently has a known self-hosted compatibility issue in `convex/schema.ts`: reserved index names such as `by_id` can cause deploy to fail on self-hosted Convex.
|
|
275
|
-
|
|
276
|
-
If you see an error like:
|
|
277
|
-
|
|
278
|
-
```text
|
|
279
|
-
IndexNameReserved: In table "agents" cannot name an index "by_id"
|
|
280
|
-
```
|
|
281
|
-
|
|
282
|
-
rename the reserved index names to something non-reserved such as `by_external_id`, then deploy again.
|
|
283
|
-
|
|
284
|
-
## 7. Seed or run commands against the backend
|
|
285
|
-
|
|
286
|
-
Once deploy succeeds, you can run Convex commands against the self-hosted instance.
|
|
287
|
-
|
|
288
|
-
For this project's seed function:
|
|
289
|
-
|
|
290
|
-
```bash
|
|
291
|
-
npx convex run seed:run '{}' \
|
|
292
|
-
--url http://localhost:3220 \
|
|
293
|
-
--admin-key "$CONVEX_SELF_HOSTED_ADMIN_KEY"
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
You can also use other CLI commands after configuration, for example:
|
|
297
|
-
|
|
298
|
-
```bash
|
|
299
|
-
npx convex --help
|
|
300
|
-
```
|
|
301
|
-
|
|
302
|
-
## 8. Run the frontend locally
|
|
303
|
-
|
|
304
|
-
Start the frontend development server:
|
|
305
|
-
|
|
306
|
-
```bash
|
|
307
|
-
npm run dev
|
|
308
|
-
```
|
|
309
|
-
|
|
310
|
-
Open the local Vite URL shown in the terminal, typically:
|
|
311
|
-
|
|
312
|
-
```text
|
|
313
|
-
http://localhost:5173
|
|
314
|
-
```
|
|
315
|
-
|
|
316
|
-
## 9. Optional Dockerized frontend
|
|
317
|
-
|
|
318
|
-
If you want to run the frontend through Docker Compose too:
|
|
319
|
-
|
|
320
|
-
```bash
|
|
321
|
-
docker compose --env-file .env.dev up -d --build
|
|
322
|
-
```
|
|
323
|
-
|
|
324
|
-
This project passes `VITE_CONVEX_URL` as a Docker build argument so the Vite app can be built with the correct public backend URL.
|
|
325
|
-
|
|
326
|
-
## Verification checklist
|
|
327
|
-
|
|
328
|
-
- `npm install` completes successfully
|
|
329
|
-
- `docker compose --env-file .env.dev up -d convex convex-dashboard` succeeds
|
|
330
|
-
- `docker compose --env-file .env.dev exec convex ./generate_admin_key.sh` returns a `convex-self-hosted|...` key
|
|
331
|
-
- `.env.local` contains `VITE_CONVEX_URL`, `CONVEX_SELF_HOSTED_URL`, and the generated `CONVEX_SELF_HOSTED_ADMIN_KEY`
|
|
332
|
-
- `npm run deploy:selfhosted` succeeds
|
|
333
|
-
- any seed or query command against the backend succeeds
|
|
334
|
-
- `npm run dev` starts the frontend successfully
|
|
335
|
-
- the frontend can load data from Convex
|
|
336
|
-
|
|
337
|
-
## Common mistakes
|
|
338
|
-
|
|
339
|
-
- using `.env.dev`'s `CONVEX_ADMIN_KEY` as the CLI admin key without generating the real self-hosted key from the container
|
|
340
|
-
- using a random string as `CONVEX_SELF_HOSTED_ADMIN_KEY`
|
|
341
|
-
- forgetting to deploy schema and functions before running seed commands
|
|
342
|
-
- using a `VITE_CONVEX_URL` that the browser cannot reach
|
|
343
|
-
- assuming changing `.env.dev` automatically updates credentials already persisted in a Docker volume
|
|
344
|
-
- overlooking self-hosted restrictions such as reserved index names during deploy
|
|
345
|
-
|
|
346
|
-
## Troubleshooting
|
|
347
|
-
|
|
348
|
-
### `401 Unauthorized: BadAdminKey`
|
|
349
|
-
|
|
350
|
-
Cause:
|
|
351
|
-
|
|
352
|
-
- the CLI is using the wrong admin key
|
|
353
|
-
|
|
354
|
-
Fix:
|
|
355
|
-
|
|
356
|
-
1. make sure the backend is running
|
|
357
|
-
2. run `docker compose --env-file .env.dev exec convex ./generate_admin_key.sh`
|
|
358
|
-
3. copy the printed `convex-self-hosted|...` value into `.env.local` as `CONVEX_SELF_HOSTED_ADMIN_KEY`
|
|
359
|
-
4. retry deploy or seed
|
|
360
|
-
|
|
361
|
-
### `Could not find function for 'seed:run'`
|
|
362
|
-
|
|
363
|
-
Cause:
|
|
364
|
-
|
|
365
|
-
- deploy has not succeeded yet, so the function is not available on the backend
|
|
366
|
-
|
|
367
|
-
Fix:
|
|
368
|
-
|
|
369
|
-
1. resolve the deploy error first
|
|
370
|
-
2. rerun `npm run deploy:selfhosted`
|
|
371
|
-
3. rerun the seed command
|
|
372
|
-
|
|
373
|
-
### `IndexNameReserved`
|
|
374
|
-
|
|
375
|
-
Cause:
|
|
376
|
-
|
|
377
|
-
- the schema defines a reserved index name such as `by_id`
|
|
378
|
-
|
|
379
|
-
Fix:
|
|
380
|
-
|
|
381
|
-
- rename the reserved index to a non-reserved name such as `by_external_id`
|
|
382
|
-
- redeploy
|
|
383
|
-
|
|
384
|
-
### Frontend fails because `VITE_CONVEX_URL` is missing
|
|
385
|
-
|
|
386
|
-
Cause:
|
|
387
|
-
|
|
388
|
-
- `.env.local` is missing or incomplete
|
|
389
|
-
|
|
390
|
-
Fix:
|
|
391
|
-
|
|
392
|
-
- recreate `.env.local`
|
|
393
|
-
- restart the frontend dev server
|
|
394
|
-
|
|
395
|
-
## Files in this project you can reuse as references
|
|
396
|
-
|
|
397
|
-
- `package.json`
|
|
398
|
-
- `docker-compose.yml`
|
|
399
|
-
- `Dockerfile`
|
|
400
|
-
- `env.dev.example`
|
|
401
|
-
- `env.prod.example`
|
|
402
|
-
- `src/providers/ConvexClientProvider.tsx`
|
|
403
|
-
- `prompter/changes/add-convex-backend/guide.md`
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export type SlashCommandId = 'enhance' | 'prd-generator' | 'prd-agent-generator' | 'product-brief' | 'epic-single' | 'epic-generator' | 'story-single' | 'story-generator' | 'qa-test-scenario' | 'skill-creator' | 'ai-humanizer' | 'api-contract-generator' | 'apply' | 'archive' | 'design-system' | 'erd-generator' | 'fsd-generator' | 'proposal' | 'tdd-generator' | 'tdd-lite-generator' | 'wireframe-generator' | 'document-explainer';
|
|
2
|
-
export declare const slashCommandBodies: Record<SlashCommandId, string>;
|
|
3
|
-
export declare function getSlashCommandBody(id: SlashCommandId): string;
|
|
4
|
-
export declare class TemplateManager {
|
|
5
|
-
static getSlashCommandBody(id: SlashCommandId): string;
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=slash-command-templates.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"slash-command-templates.d.ts","sourceRoot":"","sources":["../../../src/core/templates/slash-command-templates.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,eAAe,GAAG,qBAAqB,GAAG,eAAe,GAAG,aAAa,GAAG,gBAAgB,GAAG,cAAc,GAAG,iBAAiB,GAAG,kBAAkB,GAAG,eAAe,GAAG,cAAc,GAAG,wBAAwB,GAAG,OAAO,GAAG,SAAS,GAAG,eAAe,GAAG,eAAe,GAAG,eAAe,GAAG,UAAU,GAAG,eAAe,GAAG,oBAAoB,GAAG,qBAAqB,GAAG,oBAAoB,CAAC;AA0/B/a,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAuB7D,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,cAAc,GAAG,MAAM,CAE9D;AAED,qBAAa,eAAe;IACxB,MAAM,CAAC,mBAAmB,CAAC,EAAE,EAAE,cAAc,GAAG,MAAM;CAGzD"}
|