@chidchanun/bcp 0.2.0 → 0.2.1
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 +84 -103
- package/docs/README.md +130 -256
- package/docs/api-manifest.json +129 -0
- package/docs/api-reference.md +214 -0
- package/docs/docs-web-manifest.json +21 -3
- package/docs/documentation-platform.md +136 -0
- package/docs/platform-manifest.json +10 -4
- package/docs/releases/0.2.1.md +132 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,37 +2,35 @@
|
|
|
2
2
|
|
|
3
3
|
BCP Framework is a React full-stack framework for file-based routing, SSR, SPA navigation, server data loading, guarded application flows, API routes, authentication, database access, validation, uploads, storage and standalone Node.js production deployment.
|
|
4
4
|
|
|
5
|
-
> **Development target:** `0.2.
|
|
5
|
+
> **Development target:** `0.2.1 — Documentation Platform`
|
|
6
6
|
>
|
|
7
|
-
> `0.2.
|
|
7
|
+
> `0.2.1` is an unreleased development target until local validation, RC checks, tagging and npm publication complete.
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## 0.2 platform
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
`0.2.0` established the Framework Platform baseline. `0.2.1` builds a machine-readable Documentation Platform on top of that baseline without intentionally removing application runtime public entrypoints.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
The authoritative platform/documentation contracts are:
|
|
14
14
|
|
|
15
15
|
```text
|
|
16
16
|
docs/platform-manifest.json
|
|
17
|
-
->
|
|
17
|
+
-> runtime target, public entrypoints, capabilities and compatibility
|
|
18
18
|
|
|
19
19
|
docs/docs-web-manifest.json
|
|
20
|
-
-> docs
|
|
20
|
+
-> docs sections, routes, Markdown sources and releases
|
|
21
21
|
|
|
22
|
-
docs/
|
|
23
|
-
-> public
|
|
24
|
-
|
|
25
|
-
docs/migration-0.2.md
|
|
26
|
-
-> application upgrade guide
|
|
22
|
+
docs/api-manifest.json
|
|
23
|
+
-> public package entrypoints, source ownership and guide routes
|
|
27
24
|
```
|
|
28
25
|
|
|
29
|
-
|
|
26
|
+
Authored documentation remains under `docs/*.md`.
|
|
30
27
|
|
|
31
28
|
Read more:
|
|
32
29
|
|
|
33
30
|
- [Framework Platform Contract](docs/platform-contract.md)
|
|
34
|
-
- [
|
|
35
|
-
- [
|
|
31
|
+
- [Documentation Platform](docs/documentation-platform.md)
|
|
32
|
+
- [API Reference](docs/api-reference.md)
|
|
33
|
+
- [Migrating to 0.2.x](docs/migration-0.2.md)
|
|
36
34
|
|
|
37
35
|
## Current capabilities
|
|
38
36
|
|
|
@@ -45,7 +43,7 @@ Read more:
|
|
|
45
43
|
| Authorization | `guard.ts`, `requireAuth()`, `requireRole()` |
|
|
46
44
|
| Authentication | JWT cookie sessions and auth helpers |
|
|
47
45
|
| Middleware | Middleware System v2 with onion execution |
|
|
48
|
-
| Validation | Typed
|
|
46
|
+
| Validation | Typed validators and structured validation errors |
|
|
49
47
|
| Error handling | HTTP error helpers and consistent error responses |
|
|
50
48
|
| Database | MySQL helpers, transactions and migrations |
|
|
51
49
|
| Logging | Structured logger, request logger and request IDs |
|
|
@@ -54,7 +52,7 @@ Read more:
|
|
|
54
52
|
| Caching | Response cache and revalidation primitives |
|
|
55
53
|
| Developer tools | Generators, Doctor/Inspect v2, updater, route inspection and project metadata |
|
|
56
54
|
| Production | Standalone Node.js build, hardening gateway, graceful shutdown, trusted proxy controls and HTTP timeouts |
|
|
57
|
-
| Documentation |
|
|
55
|
+
| Documentation | Manifest-driven docs navigation, platform metadata and public API entrypoint reference |
|
|
58
56
|
|
|
59
57
|
## Requirements
|
|
60
58
|
|
|
@@ -120,7 +118,7 @@ app/
|
|
|
120
118
|
|
|
121
119
|
## Public entrypoints
|
|
122
120
|
|
|
123
|
-
The `0.2.
|
|
121
|
+
The `0.2.x` platform contract recognizes:
|
|
124
122
|
|
|
125
123
|
```text
|
|
126
124
|
bcp
|
|
@@ -136,9 +134,14 @@ bcp/server-only
|
|
|
136
134
|
bcp/middleware
|
|
137
135
|
```
|
|
138
136
|
|
|
139
|
-
Application code should use public entrypoints rather than importing internal framework files under `packages/`.
|
|
137
|
+
Application code should use these public package entrypoints rather than importing internal framework files under `packages/`.
|
|
140
138
|
|
|
141
|
-
The
|
|
139
|
+
The public list is validated in both:
|
|
140
|
+
|
|
141
|
+
- [Platform Manifest](docs/platform-manifest.json)
|
|
142
|
+
- [API Manifest](docs/api-manifest.json)
|
|
143
|
+
|
|
144
|
+
See [API Reference](docs/api-reference.md) for ownership and related guides.
|
|
142
145
|
|
|
143
146
|
## CLI
|
|
144
147
|
|
|
@@ -175,7 +178,7 @@ bcp generate migration create_users
|
|
|
175
178
|
|
|
176
179
|
Page/API/middleware generators require `--force` before replacing an existing scaffold target.
|
|
177
180
|
|
|
178
|
-
On Windows, Microsoft SQL Server may provide another `bcp.exe`. For direct PowerShell usage prefer the collision-free
|
|
181
|
+
On Windows, Microsoft SQL Server may provide another `bcp.exe`. For direct PowerShell usage prefer the project-local collision-free alias:
|
|
179
182
|
|
|
180
183
|
```powershell
|
|
181
184
|
npm exec -- bcp-framework doctor
|
|
@@ -184,8 +187,6 @@ npm exec -- bcp-framework routes
|
|
|
184
187
|
npm exec -- bcp-framework generate page dashboard/users
|
|
185
188
|
```
|
|
186
189
|
|
|
187
|
-
Inside npm scripts, `bcp` remains safe because npm prepends the project `node_modules/.bin` directory to `PATH`.
|
|
188
|
-
|
|
189
190
|
## Routing, loaders, guards and actions
|
|
190
191
|
|
|
191
192
|
BCP discovers pages from `app/**/page.tsx` and API handlers from `app/**/route.ts`.
|
|
@@ -265,17 +266,7 @@ Amazon S3
|
|
|
265
266
|
Cloudflare R2
|
|
266
267
|
```
|
|
267
268
|
|
|
268
|
-
BCP
|
|
269
|
-
|
|
270
|
-
Local Server projects keep a visible scaffold:
|
|
271
|
-
|
|
272
|
-
```text
|
|
273
|
-
storage/
|
|
274
|
-
├─ .gitkeep
|
|
275
|
-
└─ README.md
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
Runtime objects remain ignored by Git.
|
|
269
|
+
BCP storage supports local and S3-compatible adapters, streaming reads/writes, ranges, object listing, copy/move, portable metadata, bulk deletion and S3 signed URLs.
|
|
279
270
|
|
|
280
271
|
Guides:
|
|
281
272
|
|
|
@@ -308,93 +299,75 @@ Run:
|
|
|
308
299
|
npm run start
|
|
309
300
|
```
|
|
310
301
|
|
|
311
|
-
The `0.2.
|
|
302
|
+
The `0.2.x` production target remains:
|
|
312
303
|
|
|
313
304
|
```text
|
|
314
305
|
standalone-node
|
|
315
306
|
```
|
|
316
307
|
|
|
317
|
-
Native `.exe`, desktop and mobile compilation are not part of the
|
|
318
|
-
|
|
319
|
-
Production hardening supports:
|
|
308
|
+
Native `.exe`, desktop and mobile compilation are future roadmap work and are not part of the current platform contract.
|
|
320
309
|
|
|
321
|
-
|
|
322
|
-
BCP_REQUEST_TIMEOUT_MS=120000
|
|
323
|
-
BCP_HEADERS_TIMEOUT_MS=66000
|
|
324
|
-
BCP_KEEP_ALIVE_TIMEOUT_MS=65000
|
|
325
|
-
BCP_SHUTDOWN_TIMEOUT_MS=10000
|
|
326
|
-
BCP_TRUST_PROXY=false
|
|
327
|
-
```
|
|
328
|
-
|
|
329
|
-
Enable trusted proxy mode only when untrusted clients cannot bypass the trusted reverse proxy/load balancer.
|
|
310
|
+
Production hardening supports configurable request/header/keep-alive/shutdown timeouts, trusted-proxy handling and `SIGTERM` / `SIGINT` graceful shutdown.
|
|
330
311
|
|
|
331
312
|
Read more: [Production Hardening](docs/production-hardening.md)
|
|
332
313
|
|
|
333
|
-
##
|
|
334
|
-
|
|
335
|
-
Project diagnostics:
|
|
336
|
-
|
|
337
|
-
```powershell
|
|
338
|
-
npm exec -- bcp-framework doctor
|
|
339
|
-
npm exec -- bcp-framework inspect --json
|
|
340
|
-
```
|
|
314
|
+
## Documentation Platform — 0.2.1
|
|
341
315
|
|
|
342
|
-
|
|
316
|
+
`0.2.1` makes the framework repository directly consumable by `bcp-docs-web`.
|
|
343
317
|
|
|
344
|
-
|
|
318
|
+
Recommended website flow:
|
|
345
319
|
|
|
346
320
|
```text
|
|
347
|
-
|
|
321
|
+
selected framework ref
|
|
322
|
+
↓
|
|
323
|
+
docs/docs-web-manifest.json
|
|
324
|
+
docs/platform-manifest.json
|
|
325
|
+
docs/api-manifest.json
|
|
326
|
+
↓
|
|
327
|
+
validate version + release state + public entrypoints
|
|
328
|
+
↓
|
|
329
|
+
load referenced Markdown
|
|
330
|
+
↓
|
|
331
|
+
sync CMS/search/navigation
|
|
332
|
+
↓
|
|
333
|
+
render bcp-docs-web
|
|
348
334
|
```
|
|
349
335
|
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
Guides:
|
|
353
|
-
|
|
354
|
-
- [Developer Tools](docs/developer-tools.md)
|
|
355
|
-
- [Project Metadata](docs/project-metadata.md)
|
|
336
|
+
`bcp-docs-web` should not maintain a second hard-coded framework page list.
|
|
356
337
|
|
|
357
|
-
|
|
338
|
+
The manifests provide:
|
|
358
339
|
|
|
359
|
-
|
|
340
|
+
```text
|
|
341
|
+
sidebar/category order
|
|
342
|
+
website routes
|
|
343
|
+
Markdown sources
|
|
344
|
+
version + release state
|
|
345
|
+
release routes
|
|
346
|
+
public package entrypoints
|
|
347
|
+
API guide ownership
|
|
348
|
+
```
|
|
360
349
|
|
|
361
|
-
|
|
350
|
+
The docs sync may target a release ref for historical content:
|
|
362
351
|
|
|
363
352
|
```powershell
|
|
364
|
-
npm
|
|
365
|
-
npm exec -- bcp-framework update --check
|
|
366
|
-
npm exec -- bcp-framework update 0.2.0
|
|
367
|
-
npm run typecheck
|
|
368
|
-
npm run build
|
|
353
|
+
npm run docs:sync -- --ref=v0.2.0
|
|
369
354
|
```
|
|
370
355
|
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
Read more: [Migrating to 0.2.0](docs/migration-0.2.md)
|
|
374
|
-
|
|
375
|
-
## Documentation source and bcp-docs-web
|
|
376
|
-
|
|
377
|
-
The framework repository is the documentation source of truth.
|
|
378
|
-
|
|
379
|
-
`bcp-docs-web` should consume:
|
|
356
|
+
Read more:
|
|
380
357
|
|
|
381
|
-
|
|
382
|
-
docs/
|
|
383
|
-
|
|
358
|
+
- [Documentation Platform](docs/documentation-platform.md)
|
|
359
|
+
- [Documentation Source Map](docs/README.md)
|
|
360
|
+
- [Docs-Web Manifest](docs/docs-web-manifest.json)
|
|
361
|
+
- [Platform Manifest](docs/platform-manifest.json)
|
|
362
|
+
- [API Manifest](docs/api-manifest.json)
|
|
384
363
|
|
|
385
|
-
|
|
386
|
-
-> version, runtime target, public entrypoints and capabilities
|
|
387
|
-
```
|
|
364
|
+
## Updating from 0.1.x / 0.2.x
|
|
388
365
|
|
|
389
|
-
|
|
366
|
+
`0.2.1` does not intentionally remove application public entrypoints from the `0.2.0` baseline.
|
|
390
367
|
|
|
391
|
-
|
|
368
|
+
After upgrading, always rebuild the standalone artifact instead of reusing `.bcp-framework/build` from another framework version.
|
|
392
369
|
|
|
393
|
-
|
|
394
|
-
- [Docs-Web Manifest](docs/docs-web-manifest.json)
|
|
395
|
-
- [Platform Manifest](docs/platform-manifest.json)
|
|
396
|
-
- [Framework Platform Contract](docs/platform-contract.md)
|
|
397
|
-
- [Migration Guide](docs/migration-0.2.md)
|
|
370
|
+
Read more: [Migrating to 0.2.x](docs/migration-0.2.md)
|
|
398
371
|
|
|
399
372
|
## Release validation
|
|
400
373
|
|
|
@@ -410,7 +383,7 @@ npm run test:e2e
|
|
|
410
383
|
npm run rc:check
|
|
411
384
|
```
|
|
412
385
|
|
|
413
|
-
`0.2.
|
|
386
|
+
`0.2.1` adds Documentation Platform unit/package checks that validate manifest version parity, docs source existence, API/public-entrypoint parity and prepared npm documentation artifacts.
|
|
414
387
|
|
|
415
388
|
Do not tag or publish a release until the final release commit passes the complete RC sequence.
|
|
416
389
|
|
|
@@ -418,23 +391,31 @@ Do not tag or publish a release until the final release commit passes the comple
|
|
|
418
391
|
|
|
419
392
|
| Version | Milestone |
|
|
420
393
|
| --- | --- |
|
|
421
|
-
| `0.1.20` | Hydration line-ending stabilization |
|
|
422
|
-
| `0.1.21` | Hydration semantic parity |
|
|
423
|
-
| `0.1.22` | Developer tools and diagnostics |
|
|
424
|
-
| `0.1.23` | Logging and observability |
|
|
425
394
|
| `0.1.24` | File Upload Foundation |
|
|
426
395
|
| `0.1.25` | Storage Adapters and File Delivery |
|
|
427
396
|
| `0.1.26` | S3-Compatible Storage and Production Streaming |
|
|
428
397
|
| `0.1.27` | Storage Ecosystem |
|
|
429
398
|
| `0.1.28` | Production Hardening |
|
|
430
399
|
| `0.1.29` | Developer Experience |
|
|
431
|
-
| `0.2.0` | Framework Platform
|
|
400
|
+
| `0.2.0` | Framework Platform |
|
|
401
|
+
| `0.2.1` | Documentation Platform |
|
|
402
|
+
|
|
403
|
+
## Roadmap
|
|
404
|
+
|
|
405
|
+
Next planned milestone:
|
|
406
|
+
|
|
407
|
+
```text
|
|
408
|
+
0.2.2 — Configuration & Environment v2
|
|
409
|
+
```
|
|
432
410
|
|
|
433
|
-
|
|
411
|
+
Focus:
|
|
434
412
|
|
|
435
|
-
|
|
413
|
+
- typed production configuration improvements,
|
|
414
|
+
- environment validation,
|
|
415
|
+
- startup configuration diagnostics,
|
|
416
|
+
- configuration schema/inspection tooling.
|
|
436
417
|
|
|
437
|
-
|
|
418
|
+
Application packaging (`bcp package`, native executable experiments) remains later `0.2.x` roadmap work.
|
|
438
419
|
|
|
439
420
|
## License
|
|
440
421
|
|