@chidchanun/bcp 0.1.29 → 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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "framework": "bcp",
4
- "versionTarget": "0.1.29",
4
+ "versionTarget": "0.2.0",
5
5
  "releaseState": "unreleased",
6
6
  "sections": [
7
7
  {
@@ -75,10 +75,19 @@
75
75
  { "route": "/docs/generators", "source": "generators.md", "title": "Project Generators" },
76
76
  { "route": "/docs/developer-tools", "source": "developer-tools.md", "title": "Doctor & Inspect" }
77
77
  ]
78
+ },
79
+ {
80
+ "id": "platform-compatibility",
81
+ "title": "Platform & Compatibility",
82
+ "pages": [
83
+ { "route": "/docs/platform-contract", "source": "platform-contract.md", "title": "Framework Platform Contract" },
84
+ { "route": "/docs/migration-0.2", "source": "migration-0.2.md", "title": "Migrating to 0.2.0" }
85
+ ]
78
86
  }
79
87
  ],
80
88
  "releases": [
81
- { "route": "/releases/0.1.29", "source": "releases/0.1.29.md", "version": "0.1.29", "state": "unreleased" },
89
+ { "route": "/releases/0.2.0", "source": "releases/0.2.0.md", "version": "0.2.0", "state": "unreleased" },
90
+ { "route": "/releases/0.1.29", "source": "releases/0.1.29.md", "version": "0.1.29" },
82
91
  { "route": "/releases/0.1.28", "source": "releases/0.1.28.md", "version": "0.1.28" },
83
92
  { "route": "/releases/0.1.27", "source": "releases/0.1.27.md", "version": "0.1.27" },
84
93
  { "route": "/releases/0.1.26", "source": "releases/0.1.26.md", "version": "0.1.26" },
@@ -0,0 +1,173 @@
1
+ # Migrating to BCP Framework 0.2.0
2
+
3
+ BCP Framework `0.2.0` establishes the Framework Platform baseline while preserving the public application model from `0.1.29`.
4
+
5
+ > **Release state:** unreleased development target until RC validation and npm publication complete.
6
+
7
+ ## Compatibility goal
8
+
9
+ There are no intentional public-entrypoint removals from the `0.1.29` baseline in this milestone.
10
+
11
+ Applications already running on `0.1.29` should normally be able to move to `0.2.0` without rewriting routing, loaders, guards, actions, middleware, storage or authentication code.
12
+
13
+ BCP remains pre-1.0, so every application should still validate the upgrade before production deployment.
14
+
15
+ ## 1. Check the current project
16
+
17
+ From the application root:
18
+
19
+ ```powershell
20
+ npm exec -- bcp-framework doctor
21
+ npm exec -- bcp-framework inspect --json
22
+ ```
23
+
24
+ Resolve blocking `FAIL` results before upgrading, especially duplicate framework dependency declarations or invalid production-hardening settings.
25
+
26
+ ## 2. Check the available framework update
27
+
28
+ ```powershell
29
+ npm exec -- bcp-framework update --check
30
+ ```
31
+
32
+ After `0.2.0` is published, update with:
33
+
34
+ ```powershell
35
+ npm exec -- bcp-framework update 0.2.0
36
+ ```
37
+
38
+ Generated projects can also use:
39
+
40
+ ```powershell
41
+ npm run update -- 0.2.0
42
+ ```
43
+
44
+ ## 3. Keep one framework dependency
45
+
46
+ The recommended project dependency remains:
47
+
48
+ ```json
49
+ {
50
+ "dependencies": {
51
+ "bcp": "npm:@chidchanun/bcp@0.2.0"
52
+ }
53
+ }
54
+ ```
55
+
56
+ Do not keep both `bcp` and a second direct `@chidchanun/bcp` dependency in the same application. Two installed framework copies can produce separate React/framework contexts.
57
+
58
+ ## 4. Preserve server-only boundaries
59
+
60
+ Continue importing public APIs through supported entrypoints such as:
61
+
62
+ ```ts
63
+ import {
64
+ Form,
65
+ } from "bcp";
66
+
67
+ import {
68
+ auth,
69
+ } from "bcp/auth";
70
+
71
+ import {
72
+ db,
73
+ } from "bcp/database";
74
+
75
+ import {
76
+ cookies,
77
+ } from "bcp/server";
78
+ ```
79
+
80
+ Do not migrate application imports to framework-internal `packages/...` paths.
81
+
82
+ The current public entrypoint baseline is listed in `platform-manifest.json` and [Framework Platform Contract](platform-contract.md).
83
+
84
+ ## 5. Validate generated-project metadata
85
+
86
+ Projects created by `create-bcp-app` `0.1.29` or newer may contain:
87
+
88
+ ```text
89
+ bcp.project.json
90
+ ```
91
+
92
+ This file is optional runtime metadata. Older applications do not need to create it manually to run on `0.2.0`.
93
+
94
+ If you choose to add it to an older application, keep it non-secret. Credentials, passwords, access keys, session secrets and tokens do not belong in this file.
95
+
96
+ ## 6. Validate production settings
97
+
98
+ For standalone production, review:
99
+
100
+ ```dotenv
101
+ BCP_REQUEST_TIMEOUT_MS=120000
102
+ BCP_HEADERS_TIMEOUT_MS=66000
103
+ BCP_KEEP_ALIVE_TIMEOUT_MS=65000
104
+ BCP_SHUTDOWN_TIMEOUT_MS=10000
105
+ BCP_TRUST_PROXY=false
106
+ ```
107
+
108
+ Only enable:
109
+
110
+ ```dotenv
111
+ BCP_TRUST_PROXY=true
112
+ ```
113
+
114
+ when the BCP process is reachable only through a trusted reverse proxy/load balancer.
115
+
116
+ ## 7. Rebuild the standalone artifact
117
+
118
+ Do not reuse `.bcp-framework/build` from the previous framework version.
119
+
120
+ Run:
121
+
122
+ ```powershell
123
+ npm run build
124
+ ```
125
+
126
+ Then test:
127
+
128
+ ```powershell
129
+ npm start
130
+ ```
131
+
132
+ The supported `0.2.0` production target remains the standalone Node.js artifact under `.bcp-framework/build/`.
133
+
134
+ ## 8. Application validation checklist
135
+
136
+ Recommended minimum after upgrading:
137
+
138
+ ```powershell
139
+ npm run typecheck
140
+ npm run build
141
+ npm exec -- bcp-framework routes
142
+ npm exec -- bcp-framework doctor
143
+ ```
144
+
145
+ For applications using authentication, storage or database features, also exercise representative login/session, upload/download and database paths before production deployment.
146
+
147
+ ## Local storage projects
148
+
149
+ Projects using the Local Server storage preset should keep the scaffold:
150
+
151
+ ```text
152
+ storage/
153
+ ├─ .gitkeep
154
+ └─ README.md
155
+ ```
156
+
157
+ Runtime storage objects remain ignored by Git.
158
+
159
+ ## Amazon S3 / Cloudflare R2 projects
160
+
161
+ No provider migration is required for the `0.2.0` platform baseline. Existing `createS3Storage()` configurations continue using server-only credentials/environment settings.
162
+
163
+ ## What is not part of this migration
164
+
165
+ `0.2.0` does not introduce native executable compilation, desktop packaging, Android APK output or iOS application output.
166
+
167
+ The supported build model remains:
168
+
169
+ ```text
170
+ BCP application -> bcp build -> standalone Node.js web application
171
+ ```
172
+
173
+ Future build targets can be added after the platform baseline without redefining the existing standalone contract.
@@ -0,0 +1,159 @@
1
+ # Framework Platform Contract
2
+
3
+ BCP Framework `0.2.0` establishes the first explicit framework-platform baseline. The goal is to make public entrypoints, supported runtime targets, CLI capabilities and documentation metadata visible and testable instead of relying on implicit package structure.
4
+
5
+ > **Release state:** unreleased development target until local RC validation, tagging and npm publication complete.
6
+
7
+ ## What the platform contract covers
8
+
9
+ The platform contract is represented by `docs/platform-manifest.json` and release/package smoke tests.
10
+
11
+ It records:
12
+
13
+ - the framework version and release state,
14
+ - the minimum supported Node.js runtime,
15
+ - the supported production build target,
16
+ - public package entrypoints,
17
+ - documented CLI command families,
18
+ - framework capability groups,
19
+ - built-in/scaffolded storage-provider families,
20
+ - compatibility expectations for the previous baseline,
21
+ - documentation files used by `bcp-docs-web`.
22
+
23
+ The manifest is metadata. Framework source, package exports and tests remain authoritative for actual runtime behavior.
24
+
25
+ ## Public entrypoints
26
+
27
+ The `0.2.0` platform baseline recognizes these public application imports:
28
+
29
+ ```text
30
+ bcp
31
+ bcp/island
32
+ bcp/cache
33
+ bcp/config
34
+ bcp/validation
35
+ bcp/error
36
+ bcp/database
37
+ bcp/auth
38
+ bcp/server
39
+ bcp/server-only
40
+ bcp/middleware
41
+ ```
42
+
43
+ Application code should prefer these entrypoints instead of importing internal files under `packages/`.
44
+
45
+ The release package contract smoke test verifies that the prepared npm artifact still exposes these entrypoints. Accidentally removing one from the publish manifest should fail package validation before release.
46
+
47
+ ## CLI baseline
48
+
49
+ The framework-platform CLI baseline includes:
50
+
51
+ ```text
52
+ bcp dev
53
+ bcp build
54
+ bcp start
55
+ bcp routes
56
+ bcp update
57
+ bcp db ...
58
+ bcp generate ...
59
+ bcp doctor
60
+ bcp inspect
61
+ bcp help
62
+ bcp version
63
+ ```
64
+
65
+ The Windows-safe `bcp-framework` executable remains an alias for the same CLI.
66
+
67
+ ## Runtime baseline
68
+
69
+ BCP `0.2.0` continues to target a standalone Node.js web application:
70
+
71
+ ```text
72
+ BCP source application
73
+
74
+ bcp build
75
+
76
+ .bcp-framework/build/
77
+ ├─ client/
78
+ ├─ public/
79
+ └─ server/
80
+ └─ server.mjs
81
+ ```
82
+
83
+ Minimum runtime:
84
+
85
+ ```text
86
+ Node.js >= 24.11.0
87
+ React 19
88
+ ```
89
+
90
+ The platform baseline does not yet promise native `.exe`, mobile or desktop application compilation. Those remain future build-target work rather than part of `0.2.0`.
91
+
92
+ ## Compatibility policy for 0.2.0
93
+
94
+ `0.2.0` is intended to preserve applications that already work on `0.1.29`. This milestone does not intentionally remove public entrypoints or change the current standalone runtime model.
95
+
96
+ Because BCP remains pre-1.0, applications should still validate upgrades through:
97
+
98
+ ```bash
99
+ bcp update --check
100
+ bcp doctor
101
+ npm run typecheck
102
+ npm run build
103
+ ```
104
+
105
+ See [Migrating to 0.2.0](migration-0.2.md).
106
+
107
+ ## Package consistency validation
108
+
109
+ The `0.2.0` release process adds a platform-contract package smoke check. It verifies the staged npm artifact rather than only source files.
110
+
111
+ The check covers:
112
+
113
+ 1. framework version consistency,
114
+ 2. required public package exports,
115
+ 3. both BCP CLI executable aliases,
116
+ 4. minimum Node.js engine declaration,
117
+ 5. inclusion of platform/docs metadata in the packed framework,
118
+ 6. docs-web target/version consistency,
119
+ 7. create-bcp-app version parity with the framework release.
120
+
121
+ This is additive to existing unit, integration, E2E, storage, production-hardening and Developer Experience package smoke checks.
122
+
123
+ ## Docs-web contract
124
+
125
+ `bcp-docs-web` should use two machine-readable files for different purposes:
126
+
127
+ ```text
128
+ docs/docs-web-manifest.json
129
+ -> website sections, routes, source Markdown and release navigation
130
+
131
+ docs/platform-manifest.json
132
+ -> framework version, public entrypoints, runtime target and capability metadata
133
+ ```
134
+
135
+ Do not duplicate the platform entrypoint list in application code when it can be sourced from `platform-manifest.json`.
136
+
137
+ ## Stability labels
138
+
139
+ Documentation should distinguish:
140
+
141
+ - **platform baseline** — public surface covered by the `0.2.0` contract,
142
+ - **supported** — behavior covered by current tests/docs,
143
+ - **experimental/roadmap** — not guaranteed by the current platform manifest,
144
+ - **internal** — not a public application import contract.
145
+
146
+ ## Release validation
147
+
148
+ Before `0.2.0` is tagged or published:
149
+
150
+ ```bash
151
+ npm run typecheck
152
+ npm run test:unit
153
+ npm run test:integration
154
+ npm run test:package
155
+ npm run test:e2e
156
+ npm run rc:check
157
+ ```
158
+
159
+ The release is not considered published until both `@chidchanun/bcp@0.2.0` and `create-bcp-app@0.2.0` are visible from npm.
@@ -0,0 +1,75 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "framework": "bcp",
4
+ "version": "0.2.0",
5
+ "releaseState": "unreleased",
6
+ "baseline": "framework-platform",
7
+ "runtime": {
8
+ "node": ">=24.11.0",
9
+ "react": "19",
10
+ "buildTarget": "standalone-node"
11
+ },
12
+ "publicEntrypoints": [
13
+ "bcp",
14
+ "bcp/island",
15
+ "bcp/cache",
16
+ "bcp/config",
17
+ "bcp/validation",
18
+ "bcp/error",
19
+ "bcp/database",
20
+ "bcp/auth",
21
+ "bcp/server",
22
+ "bcp/server-only",
23
+ "bcp/middleware"
24
+ ],
25
+ "cliCommands": [
26
+ "dev",
27
+ "build",
28
+ "start",
29
+ "routes",
30
+ "update",
31
+ "db",
32
+ "generate",
33
+ "doctor",
34
+ "inspect",
35
+ "help",
36
+ "version"
37
+ ],
38
+ "capabilities": {
39
+ "routing": true,
40
+ "ssr": true,
41
+ "spaNavigation": true,
42
+ "loaders": true,
43
+ "routeGuards": true,
44
+ "formActions": true,
45
+ "middlewareV2": true,
46
+ "jwtCookieSessions": true,
47
+ "databaseMigrations": true,
48
+ "validation": true,
49
+ "structuredErrors": true,
50
+ "logging": true,
51
+ "responseCaching": true,
52
+ "streamingUploads": true,
53
+ "storageEcosystem": true,
54
+ "productionHardening": true,
55
+ "projectGenerators": true,
56
+ "projectDiagnostics": true
57
+ },
58
+ "storageProviders": [
59
+ "local",
60
+ "amazon-s3",
61
+ "cloudflare-r2",
62
+ "s3-compatible"
63
+ ],
64
+ "compatibility": {
65
+ "previousBaseline": "0.1.29",
66
+ "intentionalBreakingChangesFromPreviousBaseline": false,
67
+ "migrationGuide": "migration-0.2.md"
68
+ },
69
+ "documentation": {
70
+ "navigationManifest": "docs-web-manifest.json",
71
+ "platformContract": "platform-contract.md",
72
+ "migrationGuide": "migration-0.2.md",
73
+ "releaseNotes": "releases/0.2.0.md"
74
+ }
75
+ }
@@ -0,0 +1,146 @@
1
+ # BCP Framework 0.2.0
2
+
3
+ > **Milestone:** Framework Platform
4
+ >
5
+ > **Release state:** unreleased development target. Do not mark this version as published until local validation, RC checks, tagging and npm publication complete.
6
+
7
+ BCP Framework `0.2.0` establishes an explicit platform baseline for the public package surface, runtime target, CLI families and documentation metadata built across the `0.1.x` releases.
8
+
9
+ ## Highlights
10
+
11
+ ### Framework platform manifest
12
+
13
+ New machine-readable source:
14
+
15
+ ```text
16
+ docs/platform-manifest.json
17
+ ```
18
+
19
+ It records:
20
+
21
+ - framework version/release state,
22
+ - minimum Node.js and React baseline,
23
+ - standalone production build target,
24
+ - public application entrypoints,
25
+ - CLI command families,
26
+ - capability groups,
27
+ - storage-provider families,
28
+ - previous-baseline compatibility intent,
29
+ - documentation contract files.
30
+
31
+ The manifest is intended for tooling and `bcp-docs-web`; framework source and tests remain authoritative for runtime behavior.
32
+
33
+ ### Public entrypoint contract
34
+
35
+ The platform baseline explicitly recognizes:
36
+
37
+ ```text
38
+ bcp
39
+ bcp/island
40
+ bcp/cache
41
+ bcp/config
42
+ bcp/validation
43
+ bcp/error
44
+ bcp/database
45
+ bcp/auth
46
+ bcp/server
47
+ bcp/server-only
48
+ bcp/middleware
49
+ ```
50
+
51
+ A new package-stage smoke check validates that prepared npm artifacts preserve the required exports before release.
52
+
53
+ ### Package/release consistency
54
+
55
+ The `0.2.0` package validation adds checks for:
56
+
57
+ - framework/create-app version parity,
58
+ - required public exports,
59
+ - `bcp` and `bcp-framework` executable aliases,
60
+ - minimum Node.js engine declaration,
61
+ - inclusion of the platform manifest/contract/migration guide/release notes,
62
+ - docs-web version target consistency.
63
+
64
+ This validation runs in addition to existing runtime, storage, hardening and Developer Experience smoke tests.
65
+
66
+ ### Migration guide
67
+
68
+ New guide:
69
+
70
+ ```text
71
+ docs/migration-0.2.md
72
+ ```
73
+
74
+ The `0.2.0` milestone does not intentionally remove public entrypoints from the `0.1.29` baseline. Existing applications should still run normal upgrade validation because BCP remains pre-1.0.
75
+
76
+ ### Docs-web platform source
77
+
78
+ `bcp-docs-web` now has two explicit machine-readable framework sources:
79
+
80
+ ```text
81
+ docs/docs-web-manifest.json
82
+ -> navigation/routes/Markdown sources
83
+
84
+ docs/platform-manifest.json
85
+ -> version/runtime/public-entrypoint/capability contract
86
+ ```
87
+
88
+ The docs-web navigation includes the platform contract and `0.2.0` migration guide.
89
+
90
+ ## Runtime/build target
91
+
92
+ The supported production output remains:
93
+
94
+ ```text
95
+ .bcp-framework/build/
96
+ ├─ client/
97
+ ├─ public/
98
+ └─ server/
99
+ └─ server.mjs
100
+ ```
101
+
102
+ `0.2.0` does not yet add native `.exe`, desktop or mobile build targets.
103
+
104
+ ## Compatibility
105
+
106
+ Compatibility goal from `0.1.29`:
107
+
108
+ ```text
109
+ intentional public-entrypoint removals: none
110
+ standalone runtime model change: none
111
+ create-bcp-app project model change: none required
112
+ ```
113
+
114
+ Projects should still run:
115
+
116
+ ```bash
117
+ bcp doctor
118
+ npm run typecheck
119
+ npm run build
120
+ ```
121
+
122
+ before production deployment after the upgrade.
123
+
124
+ ## Documentation
125
+
126
+ New/updated platform documents:
127
+
128
+ - `docs/platform-manifest.json`
129
+ - `docs/platform-contract.md`
130
+ - `docs/migration-0.2.md`
131
+ - `docs/docs-web-manifest.json`
132
+ - `docs/README.md`
133
+ - root `README.md`
134
+
135
+ ## Validation required before release
136
+
137
+ ```bash
138
+ npm run typecheck
139
+ npm run test:unit
140
+ npm run test:integration
141
+ npm run test:package
142
+ npm run test:e2e
143
+ npm run rc:check
144
+ ```
145
+
146
+ Do not tag or publish `v0.2.0` until these pass against the final release commit.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chidchanun/bcp",
3
- "version": "0.1.29",
3
+ "version": "0.2.0",
4
4
  "description": "BCP Framework - a React full-stack framework with file-based routing, SSR, APIs, middleware, islands, caching and standalone production builds.",
5
5
  "type": "module",
6
6
  "license": "MIT",