create-restforge-skills 0.2.0 → 0.4.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/README.md +148 -150
- package/package.json +33 -30
- package/skills/restforge/SKILL.md +832 -559
- package/skills/restforge/references/auth.md +2 -2
- package/skills/restforge/references/config-schema.md +238 -173
- package/skills/restforge/references/dbschema-catalog.md +245 -238
- package/skills/restforge/references/design-to-sdf.md +621 -618
- package/skills/restforge/references/field-validation.md +247 -173
- package/skills/restforge/references/rdf-advanced.md +695 -488
- package/skills/restforge/references/udf-catalog.md +623 -496
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **Offline mirror.** This file mirrors the auth commands of the installed
|
|
4
4
|
> RESTForge platform and Designer (`restforge project auth`, `npx
|
|
5
|
-
> restforge-designer auth`). The live tools/CLI are authoritative — when this file and them disagree,
|
|
5
|
+
> npx restforge-designer auth`). The live tools/CLI are authoritative — when this file and them disagree,
|
|
6
6
|
> trust the tools, then update this file.
|
|
7
7
|
|
|
8
8
|
**This file documents the auth EXTENSION — auth WITHOUT RBAC.** It is one of two
|
|
@@ -116,7 +116,7 @@ injected automatically when `designer_generate` creates pages later.
|
|
|
116
116
|
**Prerequisites:** the Designer is invoked via `npx restforge-designer` and is
|
|
117
117
|
bundled inside the `@restforgejs/platform` package; the prerequisite is that
|
|
118
118
|
`@restforgejs/platform` is installed in the project (e.g. a project created with
|
|
119
|
-
`npx create-restforge-app`)
|
|
119
|
+
`npx create-restforge-app`).
|
|
120
120
|
|
|
121
121
|
Both are idempotent. **`--remove` is destructive** — confirm project name and
|
|
122
122
|
intent with the user before running (MCP always passes `--force`).
|
|
@@ -1,173 +1,238 @@
|
|
|
1
|
-
# Reference: Config Schema (db-connection.env)
|
|
2
|
-
|
|
3
|
-
> **Offline mirror.** This file mirrors `setup_get_config_schema` from the
|
|
4
|
-
> installed RESTForge platform. The live tool is authoritative — when this file
|
|
5
|
-
> and the tool disagree, trust the tool, then update this file. Parameter set and
|
|
6
|
-
> defaults can change between platform versions.
|
|
7
|
-
|
|
8
|
-
Source: `setup_get_config_schema` — installed platform version.
|
|
9
|
-
Total:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
| `
|
|
28
|
-
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
## Section:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
|
65
|
-
|
|
66
|
-
| `
|
|
67
|
-
| `
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
|
74
|
-
|
|
75
|
-
| `
|
|
76
|
-
| `
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
`
|
|
85
|
-
`
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
|
92
|
-
|
|
93
|
-
| `
|
|
94
|
-
| `
|
|
95
|
-
| `
|
|
96
|
-
| `
|
|
97
|
-
| `
|
|
98
|
-
| `
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
|
156
|
-
|
|
157
|
-
| `
|
|
158
|
-
|
|
159
|
-
---
|
|
160
|
-
|
|
161
|
-
## Section:
|
|
162
|
-
|
|
163
|
-
| Parameter | Type | Default |
|
|
164
|
-
|---|---|---|
|
|
165
|
-
| `
|
|
166
|
-
| `
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
|
173
|
-
|
|
1
|
+
# Reference: Config Schema (db-connection.env)
|
|
2
|
+
|
|
3
|
+
> **Offline mirror.** This file mirrors `setup_get_config_schema` from the
|
|
4
|
+
> installed RESTForge platform. The live tool is authoritative — when this file
|
|
5
|
+
> and the tool disagree, trust the tool, then update this file. Parameter set and
|
|
6
|
+
> defaults can change between platform versions.
|
|
7
|
+
|
|
8
|
+
Source: `setup_get_config_schema` — installed platform version.
|
|
9
|
+
Total: 75 active parameters plus 4 commented-out optional ones (`KAFKA_CLIENT_ID`
|
|
10
|
+
and the three SASL keys). Required parameters marked **\***.
|
|
11
|
+
Schema version: 1.0.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Section: Environment
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Default | Notes |
|
|
18
|
+
|---|---|---|---|
|
|
19
|
+
| `NODE_ENV` | string | `production` | `production` or `development`. `development` exposes extra error detail (valid field lists, stack traces); keep `production` on deployed servers |
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Section: License
|
|
24
|
+
|
|
25
|
+
| Parameter | Type | Default | Required |
|
|
26
|
+
|---|---|---|---|
|
|
27
|
+
| `LICENSE` | string | `XXXX-XXXX-XXXX-XXXX` | **\*** |
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Section: Server
|
|
32
|
+
|
|
33
|
+
| Parameter | Type | Default | Required |
|
|
34
|
+
|---|---|---|---|
|
|
35
|
+
| `SERVER_ADDRESS` | string | `127.0.0.1` | **\*** |
|
|
36
|
+
| `SERVER_PORT` | integer | `3000` | **\*** |
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Section: CORS
|
|
41
|
+
|
|
42
|
+
| Parameter | Type | Default | Notes |
|
|
43
|
+
|---|---|---|---|
|
|
44
|
+
| `CORS_ENABLED` | boolean | `true` | Enables the CORS middleware |
|
|
45
|
+
| `CORS_ORIGINS` | string | `*` | Comma-separated allowed origins; `*` allows every origin (development only) |
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Section: Live Sync (WebSocket)
|
|
50
|
+
|
|
51
|
+
LIVE_SYNC_ENABLED=true requires an API Key (`KEY=...`) for WebSocket client authentication.
|
|
52
|
+
|
|
53
|
+
| Parameter | Type | Default |
|
|
54
|
+
|---|---|---|
|
|
55
|
+
| `LIVE_SYNC_ENABLED` | boolean | `false` |
|
|
56
|
+
| `LIVE_SYNC_PORT` | integer | `3033` |
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Section: Redis
|
|
61
|
+
|
|
62
|
+
| Parameter | Type | Default |
|
|
63
|
+
|---|---|---|
|
|
64
|
+
| `REDIS_HOST` | string | `localhost` |
|
|
65
|
+
| `REDIS_PORT` | integer | `6380` |
|
|
66
|
+
| `REDIS_PASSWORD` | string | `` |
|
|
67
|
+
| `REDIS_DB` | integer | `0` |
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Section: Export
|
|
72
|
+
|
|
73
|
+
| Parameter | Type | Default |
|
|
74
|
+
|---|---|---|
|
|
75
|
+
| `EXPORT_FILE_EXPIRY` | integer | `3600000` |
|
|
76
|
+
| `EXPORT_CHUNK_SIZE` | integer | `1000` |
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Section: Kafka
|
|
81
|
+
|
|
82
|
+
| Parameter | Type | Default | Notes |
|
|
83
|
+
|---|---|---|---|
|
|
84
|
+
| `KAFKA_ENABLED` | boolean | `false` | |
|
|
85
|
+
| `KAFKA_BROKERS` | string | `localhost:9092` | Comma-separated for multiple brokers |
|
|
86
|
+
| `KAFKA_CLIENT_ID` | string | commented out | Optional; default `restforge-{project}-producer` / `-consumer` |
|
|
87
|
+
| `KAFKA_CONNECTION_TIMEOUT` | integer | `3000` | |
|
|
88
|
+
| `KAFKA_REQUEST_TIMEOUT` | integer | `25000` | |
|
|
89
|
+
| `KAFKA_TOPIC_PATTERN` | string | `{module}.{endpoint}.events` | |
|
|
90
|
+
| `KAFKA_TENANT_ID` | string | `default` | |
|
|
91
|
+
| `KAFKA_SESSION_TIMEOUT` | integer | `30000` | |
|
|
92
|
+
| `KAFKA_HEARTBEAT_INTERVAL` | integer | `3000` | |
|
|
93
|
+
| `KAFKA_MAX_BYTES_PER_PARTITION` | integer | `1048576` | |
|
|
94
|
+
| `KAFKA_AUTO_COMMIT` | boolean | `false` | |
|
|
95
|
+
| `KAFKA_AUTO_COMMIT_INTERVAL` | integer | `5000` | |
|
|
96
|
+
| `KAFKA_RETRY_ATTEMPTS` | integer | `3` | |
|
|
97
|
+
| `KAFKA_RETRY_DELAY` | integer | `1000` | |
|
|
98
|
+
| `KAFKA_RETRY_MAX_DELAY` | integer | `30000` | |
|
|
99
|
+
| `KAFKA_SSL` | boolean | `false` | |
|
|
100
|
+
| `KAFKA_LOG_LEVEL` | string | `info` | |
|
|
101
|
+
|
|
102
|
+
SASL Authentication (optional, uncomment when broker requires authentication):
|
|
103
|
+
`KAFKA_SASL_MECHANISM` (plain/scram-sha-256/scram-sha-512), `KAFKA_SASL_USERNAME`,
|
|
104
|
+
`KAFKA_SASL_PASSWORD`.
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Section: Database
|
|
109
|
+
|
|
110
|
+
| Parameter | Type | Default | Required |
|
|
111
|
+
|---|---|---|---|
|
|
112
|
+
| `DB_TYPE` | string | `postgresql` | **\*** — postgresql, mysql, oracle, sqlite |
|
|
113
|
+
| `DB_HOST` | string | `127.0.0.1` | **\*** |
|
|
114
|
+
| `DB_PORT` | integer | `5432` | **\*** |
|
|
115
|
+
| `DB_USER` | string | `postgres` | **\*** |
|
|
116
|
+
| `DB_PASSWORD` | string | `your_password_here` | **\*** |
|
|
117
|
+
| `DB_NAME` | string | `your_database_name` | **\*** |
|
|
118
|
+
|
|
119
|
+
For SQLite: set `DB_TYPE=sqlite` and `DB_NAME=./data/myapp.db`.
|
|
120
|
+
`DB_HOST`, `DB_PORT`, `DB_USER`, `DB_PASSWORD` are ignored for SQLite.
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Section: Date/Time
|
|
125
|
+
|
|
126
|
+
The single date/time standard of the application: it applies to every field and
|
|
127
|
+
every endpoint, and each response repeats it in the `X-Timezone`, `X-Date-Format`,
|
|
128
|
+
and `X-DateTime-Format` headers. There is no per-field pattern for `date` and
|
|
129
|
+
`timestamp`. Invalid values stop the server at startup with a clear error.
|
|
130
|
+
|
|
131
|
+
| Parameter | Type | Template value | Runtime default when absent | Notes |
|
|
132
|
+
|---|---|---|---|---|
|
|
133
|
+
| `TIMEZONE` | string | `Asia/Jakarta` | `UTC` | IANA zone name used for zone-less input and audit columns |
|
|
134
|
+
| `DATEFORMAT` | string | `yyyy-MM-dd` | `yyyy-MM-dd` | `yyyy-MM-dd`, `dd/MM/yyyy`, `dd-MM-yyyy`, `MM/dd/yyyy`, `yyyy/MM/dd` |
|
|
135
|
+
| `DATETIMEFORMAT` | string | `yyyy-MM-dd HH:mm` | `yyyy-MM-dd HH:mm:ss.SSS` | `<date pattern> <time pattern>`; time pattern `HH:mm`, `HH:mm:ss`, or `HH:mm:ss.SSS`. Input form only for `timestamptz`, whose output is always ISO UTC |
|
|
136
|
+
|
|
137
|
+
After changing `DATEFORMAT` or `DATETIMEFORMAT`, re-run `codegen_migrate_payload`
|
|
138
|
+
and `designer_generate`: the frontend copies both values into `appConfig` and
|
|
139
|
+
cannot detect a mismatch by itself.
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Section: Tenancy
|
|
144
|
+
|
|
145
|
+
| Parameter | Type | Default | Notes |
|
|
146
|
+
|---|---|---|---|
|
|
147
|
+
| `TENANT_MODE` | string | `single` | `single` (no tenant filtering) or `multi` (data partitioned by tenant) |
|
|
148
|
+
| `TENANT_COLUMN` | string | `tenant_id` | Tenant identifier column in every table; `multi` only |
|
|
149
|
+
| `TENANT_BYPASS_ROLES` | string | empty | Comma-separated roles that bypass the tenant filter; empty = strict isolation. Platform operators only |
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
## Section: Code Generation
|
|
154
|
+
|
|
155
|
+
| Parameter | Type | Default | Notes |
|
|
156
|
+
|---|---|---|---|
|
|
157
|
+
| `FK_AUTO_JOIN` | string | `left` | JOIN type written by `codegen_sync_payload` FK expansion: `left` keeps rows with a NULL FK, `inner` keeps only rows with a valid reference |
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## Section: Logging
|
|
162
|
+
|
|
163
|
+
| Parameter | Type | Default |
|
|
164
|
+
|---|---|---|
|
|
165
|
+
| `LOG_LEVEL` | string | `debug` |
|
|
166
|
+
| `LOG_TO_FILE` | boolean | `true` |
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## Section: SQL Logging
|
|
171
|
+
|
|
172
|
+
| Parameter | Type | Default |
|
|
173
|
+
|---|---|---|
|
|
174
|
+
| `SQL_LOG_ENABLED` | boolean | `false` |
|
|
175
|
+
| `SQL_LOG_LEVEL` | string | `debug` |
|
|
176
|
+
| `SQL_LOG_PARAMS` | boolean | `false` |
|
|
177
|
+
| `SQL_LOG_SLOW_THRESHOLD` | integer | `1000` |
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## Section: Query Limits
|
|
182
|
+
|
|
183
|
+
| Parameter | Type | Default | Notes |
|
|
184
|
+
|---|---|---|---|
|
|
185
|
+
| `READ_MAX_LIMIT` | integer or `unlimited` | `5000` | Maximum rows returned by `/read` without `page`. Larger requests are cut and flagged `truncated: true`. `unlimited` lets clients send `limit: "all"`, holding the whole result in server memory |
|
|
186
|
+
| `DATATABLES_MAX_LENGTH` | integer | `1000` | Maximum `length` accepted by `/datatables`. Larger requests are cut and flagged `truncated: true` |
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## Section: Cache
|
|
191
|
+
|
|
192
|
+
| Parameter | Type | Default |
|
|
193
|
+
|---|---|---|
|
|
194
|
+
| `CACHE_ENABLED` | boolean | `false` |
|
|
195
|
+
| `CACHE_TTL` | integer | `300` |
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## Section: Job Scheduler
|
|
200
|
+
|
|
201
|
+
| Parameter | Type | Default |
|
|
202
|
+
|---|---|---|
|
|
203
|
+
| `JOB_ENABLED` | boolean | `false` |
|
|
204
|
+
| `JOB_CONCURRENCY` | integer | `5` |
|
|
205
|
+
| `JOB_RETENTION_HOURS` | integer | `72` |
|
|
206
|
+
| `JOB_FAILED_RETENTION_HOURS` | integer | `168` |
|
|
207
|
+
| `JOB_SHUTDOWN_TIMEOUT` | integer | `10000` |
|
|
208
|
+
| `JOB_STALLED_INTERVAL` | integer | `30000` |
|
|
209
|
+
| `JOB_MAX_STALLED_COUNT` | integer | `2` |
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## Section: Distributed Lock
|
|
214
|
+
|
|
215
|
+
| Parameter | Type | Default |
|
|
216
|
+
|---|---|---|
|
|
217
|
+
| `LOCK_DISTRIBUTED_ENABLED` | boolean | `false` |
|
|
218
|
+
| `LOCK_DISTRIBUTED_TTL` | integer | `10` |
|
|
219
|
+
| `LOCK_RESOURCE_MAX_TTL` | integer | `600` |
|
|
220
|
+
| `LOCK_DISTRIBUTED_RETRY` | integer | `3` |
|
|
221
|
+
| `LOCK_DISTRIBUTED_RETRY_DELAY` | integer | `100` |
|
|
222
|
+
| `LOCK_DISTRIBUTED_STRATEGY` | string | `reject` |
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## Section: ID Generator
|
|
227
|
+
|
|
228
|
+
| Parameter | Type | Default |
|
|
229
|
+
|---|---|---|
|
|
230
|
+
| `IDGEN_ENABLED` | boolean | `false` |
|
|
231
|
+
| `IDGEN_IDEM_TTL` | integer | `600` |
|
|
232
|
+
| `IDGEN_COUNTER_TTL_MONTHLY` | integer | `2764800` |
|
|
233
|
+
| `IDGEN_COUNTER_TTL_DAILY` | integer | `172800` |
|
|
234
|
+
| `IDGEN_DEFAULT_MAX_RETRY` | integer | `10` |
|
|
235
|
+
| `IDGEN_DEFAULT_PIN_DIGITS` | integer | `6` |
|
|
236
|
+
| `IDGEN_DEFAULT_SERIAL_PATTERN` | string | `XXXX-XXXX-XXXX-XXXX` |
|
|
237
|
+
| `IDGEN_DEFAULT_CODE_PATTERN` | string | `9999-9999` |
|
|
238
|
+
| `IDGEN_ALLOW_RESET` | boolean | `false` |
|