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.
@@ -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`), not a standalone binary on PATH.
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: 63 parameters. Required parameters marked **\***.
10
- Schema version: 1.0.
11
-
12
- ---
13
-
14
- ## Section: License
15
-
16
- | Parameter | Type | Default | Required |
17
- |---|---|---|---|
18
- | `LICENSE` | string | `XXXX-XXXX-XXXX-XXXX` | **\*** |
19
-
20
- ---
21
-
22
- ## Section: Server
23
-
24
- | Parameter | Type | Default | Required |
25
- |---|---|---|---|
26
- | `SERVER_ADDRESS` | string | `127.0.0.1` | **\*** |
27
- | `SERVER_PORT` | integer | `3000` | **\*** |
28
-
29
- ---
30
-
31
- ## Section: Live Sync (WebSocket)
32
-
33
- LIVE_SYNC_ENABLED=true requires an API Key (`KEY=...`) for WebSocket client authentication.
34
-
35
- | Parameter | Type | Default |
36
- |---|---|---|
37
- | `LIVE_SYNC_ENABLED` | boolean | `false` |
38
- | `LIVE_SYNC_PORT` | integer | `3033` |
39
-
40
- ---
41
-
42
- ## Section: Redis
43
-
44
- | Parameter | Type | Default |
45
- |---|---|---|
46
- | `REDIS_HOST` | string | `localhost` |
47
- | `REDIS_PORT` | integer | `6380` |
48
- | `REDIS_PASSWORD` | string | `` |
49
- | `REDIS_DB` | integer | `0` |
50
-
51
- ---
52
-
53
- ## Section: Export
54
-
55
- | Parameter | Type | Default |
56
- |---|---|---|
57
- | `EXPORT_FILE_EXPIRY` | integer | `3600000` |
58
- | `EXPORT_CHUNK_SIZE` | integer | `1000` |
59
-
60
- ---
61
-
62
- ## Section: Kafka
63
-
64
- | Parameter | Type | Default | Notes |
65
- |---|---|---|---|
66
- | `KAFKA_ENABLED` | boolean | `false` | |
67
- | `KAFKA_BROKERS` | string | `localhost:9092` | Comma-separated for multiple brokers |
68
- | `KAFKA_CONNECTION_TIMEOUT` | integer | `3000` | |
69
- | `KAFKA_REQUEST_TIMEOUT` | integer | `25000` | |
70
- | `KAFKA_TOPIC_PATTERN` | string | `{module}.{endpoint}.events` | |
71
- | `KAFKA_TENANT_ID` | string | `default` | |
72
- | `KAFKA_SESSION_TIMEOUT` | integer | `30000` | |
73
- | `KAFKA_HEARTBEAT_INTERVAL` | integer | `3000` | |
74
- | `KAFKA_MAX_BYTES_PER_PARTITION` | integer | `1048576` | |
75
- | `KAFKA_AUTO_COMMIT` | boolean | `false` | |
76
- | `KAFKA_AUTO_COMMIT_INTERVAL` | integer | `5000` | |
77
- | `KAFKA_RETRY_ATTEMPTS` | integer | `3` | |
78
- | `KAFKA_RETRY_DELAY` | integer | `1000` | |
79
- | `KAFKA_RETRY_MAX_DELAY` | integer | `30000` | |
80
- | `KAFKA_SSL` | boolean | `false` | |
81
- | `KAFKA_LOG_LEVEL` | string | `info` | |
82
-
83
- SASL Authentication (optional, uncomment when broker requires authentication):
84
- `KAFKA_SASL_MECHANISM` (plain/scram-sha-256/scram-sha-512), `KAFKA_SASL_USERNAME`,
85
- `KAFKA_SASL_PASSWORD`.
86
-
87
- ---
88
-
89
- ## Section: Database
90
-
91
- | Parameter | Type | Default | Required |
92
- |---|---|---|---|
93
- | `DB_TYPE` | string | `postgresql` | **\*** — postgresql, mysql, oracle, sqlite |
94
- | `DB_HOST` | string | `127.0.0.1` | **\*** |
95
- | `DB_PORT` | integer | `5432` | **\*** |
96
- | `DB_USER` | string | `postgres` | **\*** |
97
- | `DB_PASSWORD` | string | `your_password_here` | **\*** |
98
- | `DB_NAME` | string | `your_database_name` | **\*** |
99
-
100
- For SQLite: set `DB_TYPE=sqlite` and `DB_NAME=./data/myapp.db`.
101
- `DB_HOST`, `DB_PORT`, `DB_USER`, `DB_PASSWORD` are ignored for SQLite.
102
-
103
- ---
104
-
105
- ## Section: Logging
106
-
107
- | Parameter | Type | Default |
108
- |---|---|---|
109
- | `LOG_LEVEL` | string | `debug` |
110
- | `LOG_TO_FILE` | boolean | `true` |
111
-
112
- ---
113
-
114
- ## Section: SQL Logging
115
-
116
- | Parameter | Type | Default |
117
- |---|---|---|
118
- | `SQL_LOG_ENABLED` | boolean | `false` |
119
- | `SQL_LOG_LEVEL` | string | `debug` |
120
- | `SQL_LOG_PARAMS` | boolean | `false` |
121
- | `SQL_LOG_SLOW_THRESHOLD` | integer | `1000` |
122
-
123
- ---
124
-
125
- ## Section: Cache
126
-
127
- | Parameter | Type | Default |
128
- |---|---|---|
129
- | `CACHE_ENABLED` | boolean | `false` |
130
- | `CACHE_TTL` | integer | `300` |
131
-
132
- ---
133
-
134
- ## Section: Job Scheduler
135
-
136
- | Parameter | Type | Default |
137
- |---|---|---|
138
- | `JOB_ENABLED` | boolean | `false` |
139
- | `JOB_CONCURRENCY` | integer | `5` |
140
- | `JOB_RETENTION_HOURS` | integer | `72` |
141
- | `JOB_FAILED_RETENTION_HOURS` | integer | `168` |
142
- | `JOB_SHUTDOWN_TIMEOUT` | integer | `10000` |
143
- | `JOB_STALLED_INTERVAL` | integer | `30000` |
144
- | `JOB_MAX_STALLED_COUNT` | integer | `2` |
145
-
146
- ---
147
-
148
- ## Section: Distributed Lock
149
-
150
- | Parameter | Type | Default |
151
- |---|---|---|
152
- | `LOCK_DISTRIBUTED_ENABLED` | boolean | `false` |
153
- | `LOCK_DISTRIBUTED_TTL` | integer | `10` |
154
- | `LOCK_RESOURCE_MAX_TTL` | integer | `600` |
155
- | `LOCK_DISTRIBUTED_RETRY` | integer | `3` |
156
- | `LOCK_DISTRIBUTED_RETRY_DELAY` | integer | `100` |
157
- | `LOCK_DISTRIBUTED_STRATEGY` | string | `reject` |
158
-
159
- ---
160
-
161
- ## Section: ID Generator
162
-
163
- | Parameter | Type | Default |
164
- |---|---|---|
165
- | `IDGEN_ENABLED` | boolean | `false` |
166
- | `IDGEN_IDEM_TTL` | integer | `600` |
167
- | `IDGEN_COUNTER_TTL_MONTHLY` | integer | `2764800` |
168
- | `IDGEN_COUNTER_TTL_DAILY` | integer | `172800` |
169
- | `IDGEN_DEFAULT_MAX_RETRY` | integer | `10` |
170
- | `IDGEN_DEFAULT_PIN_DIGITS` | integer | `6` |
171
- | `IDGEN_DEFAULT_SERIAL_PATTERN` | string | `XXXX-XXXX-XXXX-XXXX` |
172
- | `IDGEN_DEFAULT_CODE_PATTERN` | string | `9999-9999` |
173
- | `IDGEN_ALLOW_RESET` | boolean | `false` |
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` |