fastscript 1.0.0 → 3.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.
Files changed (119) hide show
  1. package/CHANGELOG.md +38 -7
  2. package/LICENSE +33 -21
  3. package/README.md +605 -73
  4. package/node_modules/@fastscript/core-private/BOUNDARY.json +15 -0
  5. package/node_modules/@fastscript/core-private/README.md +5 -0
  6. package/node_modules/@fastscript/core-private/package.json +34 -0
  7. package/node_modules/@fastscript/core-private/src/asset-optimizer.mjs +67 -0
  8. package/node_modules/@fastscript/core-private/src/audit-log.mjs +50 -0
  9. package/node_modules/@fastscript/core-private/src/auth-flows.mjs +29 -0
  10. package/node_modules/@fastscript/core-private/src/auth.mjs +115 -0
  11. package/node_modules/@fastscript/core-private/src/bench.mjs +45 -0
  12. package/node_modules/@fastscript/core-private/src/build.mjs +670 -0
  13. package/node_modules/@fastscript/core-private/src/cache.mjs +248 -0
  14. package/node_modules/@fastscript/core-private/src/check.mjs +22 -0
  15. package/node_modules/@fastscript/core-private/src/cli.mjs +95 -0
  16. package/node_modules/@fastscript/core-private/src/compat.mjs +128 -0
  17. package/node_modules/@fastscript/core-private/src/create.mjs +278 -0
  18. package/node_modules/@fastscript/core-private/src/csp.mjs +26 -0
  19. package/node_modules/@fastscript/core-private/src/db-cli.mjs +185 -0
  20. package/node_modules/@fastscript/core-private/src/db-postgres-collection.mjs +110 -0
  21. package/node_modules/@fastscript/core-private/src/db-postgres.mjs +40 -0
  22. package/node_modules/@fastscript/core-private/src/db.mjs +103 -0
  23. package/node_modules/@fastscript/core-private/src/deploy.mjs +662 -0
  24. package/node_modules/@fastscript/core-private/src/dev.mjs +5 -0
  25. package/node_modules/@fastscript/core-private/src/docs-search.mjs +35 -0
  26. package/node_modules/@fastscript/core-private/src/env.mjs +118 -0
  27. package/node_modules/@fastscript/core-private/src/export.mjs +83 -0
  28. package/node_modules/@fastscript/core-private/src/fs-diagnostics.mjs +70 -0
  29. package/node_modules/@fastscript/core-private/src/fs-error-codes.mjs +141 -0
  30. package/node_modules/@fastscript/core-private/src/fs-formatter.mjs +66 -0
  31. package/node_modules/@fastscript/core-private/src/fs-linter.mjs +274 -0
  32. package/node_modules/@fastscript/core-private/src/fs-normalize.mjs +121 -0
  33. package/node_modules/@fastscript/core-private/src/fs-parser.mjs +1120 -0
  34. package/node_modules/@fastscript/core-private/src/generated/docs-search-index.mjs +3182 -0
  35. package/node_modules/@fastscript/core-private/src/i18n.mjs +25 -0
  36. package/node_modules/@fastscript/core-private/src/interop.mjs +16 -0
  37. package/node_modules/@fastscript/core-private/src/jobs.mjs +378 -0
  38. package/node_modules/@fastscript/core-private/src/logger.mjs +27 -0
  39. package/node_modules/@fastscript/core-private/src/metrics.mjs +45 -0
  40. package/node_modules/@fastscript/core-private/src/middleware.mjs +14 -0
  41. package/node_modules/@fastscript/core-private/src/migrate.mjs +81 -0
  42. package/node_modules/@fastscript/core-private/src/migration-wizard.mjs +16 -0
  43. package/node_modules/@fastscript/core-private/src/module-loader.mjs +46 -0
  44. package/node_modules/@fastscript/core-private/src/oauth-providers.mjs +103 -0
  45. package/node_modules/@fastscript/core-private/src/observability.mjs +21 -0
  46. package/node_modules/@fastscript/core-private/src/plugins.mjs +194 -0
  47. package/node_modules/@fastscript/core-private/src/retention.mjs +57 -0
  48. package/node_modules/@fastscript/core-private/src/routes.mjs +178 -0
  49. package/node_modules/@fastscript/core-private/src/scheduler.mjs +104 -0
  50. package/node_modules/@fastscript/core-private/src/security.mjs +233 -0
  51. package/node_modules/@fastscript/core-private/src/server-runtime.mjs +849 -0
  52. package/node_modules/@fastscript/core-private/src/serverless-handler.mjs +20 -0
  53. package/node_modules/@fastscript/core-private/src/session-policy.mjs +38 -0
  54. package/node_modules/@fastscript/core-private/src/start.mjs +10 -0
  55. package/node_modules/@fastscript/core-private/src/storage.mjs +155 -0
  56. package/node_modules/@fastscript/core-private/src/style-primitives.mjs +538 -0
  57. package/node_modules/@fastscript/core-private/src/style-system.mjs +461 -0
  58. package/node_modules/@fastscript/core-private/src/tenant.mjs +55 -0
  59. package/node_modules/@fastscript/core-private/src/typecheck.mjs +1466 -0
  60. package/node_modules/@fastscript/core-private/src/validate.mjs +22 -0
  61. package/node_modules/@fastscript/core-private/src/validation.mjs +88 -0
  62. package/node_modules/@fastscript/core-private/src/webhook.mjs +81 -0
  63. package/node_modules/@fastscript/core-private/src/worker.mjs +24 -0
  64. package/package.json +108 -14
  65. package/src/asset-optimizer.mjs +67 -0
  66. package/src/audit-log.mjs +50 -0
  67. package/src/auth.mjs +1 -115
  68. package/src/bench.mjs +20 -7
  69. package/src/benchmark-discipline.mjs +39 -0
  70. package/src/build.mjs +1 -234
  71. package/src/cache.mjs +210 -20
  72. package/src/cli.mjs +65 -6
  73. package/src/compat.mjs +8 -10
  74. package/src/conversion-manifest.mjs +101 -0
  75. package/src/create.mjs +71 -17
  76. package/src/csp.mjs +26 -0
  77. package/src/db-cli.mjs +152 -8
  78. package/src/db-postgres-collection.mjs +110 -0
  79. package/src/deploy.mjs +1 -65
  80. package/src/diagnostics.mjs +100 -0
  81. package/src/docs-search.mjs +35 -0
  82. package/src/env.mjs +34 -5
  83. package/src/fs-diagnostics.mjs +70 -0
  84. package/src/fs-error-codes.mjs +126 -0
  85. package/src/fs-formatter.mjs +66 -0
  86. package/src/fs-linter.mjs +274 -0
  87. package/src/fs-normalize.mjs +52 -239
  88. package/src/fs-parser.mjs +1 -0
  89. package/src/generated/docs-search-index.mjs +3591 -0
  90. package/src/i18n.mjs +25 -0
  91. package/src/jobs.mjs +283 -32
  92. package/src/metrics.mjs +45 -0
  93. package/src/migrate-rollback.mjs +144 -0
  94. package/src/migrate.mjs +1275 -47
  95. package/src/migration-wizard.mjs +42 -0
  96. package/src/module-loader.mjs +22 -11
  97. package/src/oauth-providers.mjs +103 -0
  98. package/src/permissions-cli.mjs +112 -0
  99. package/src/plugins.mjs +194 -0
  100. package/src/profile.mjs +95 -0
  101. package/src/regression-guard.mjs +245 -0
  102. package/src/retention.mjs +57 -0
  103. package/src/routes.mjs +178 -0
  104. package/src/runtime-permissions.mjs +299 -0
  105. package/src/scheduler.mjs +104 -0
  106. package/src/security.mjs +197 -19
  107. package/src/server-runtime.mjs +1 -339
  108. package/src/serverless-handler.mjs +20 -0
  109. package/src/session-policy.mjs +38 -0
  110. package/src/storage.mjs +1 -56
  111. package/src/style-system.mjs +461 -0
  112. package/src/tenant.mjs +55 -0
  113. package/src/trace.mjs +95 -0
  114. package/src/typecheck.mjs +1 -0
  115. package/src/validate.mjs +13 -1
  116. package/src/validation.mjs +14 -5
  117. package/src/webhook.mjs +1 -71
  118. package/src/worker.mjs +23 -4
  119. package/src/language-spec.mjs +0 -58
package/README.md CHANGED
@@ -1,117 +1,649 @@
1
1
  # FastScript
2
2
 
3
- FastScript is a JavaScript-first full-stack framework focused on three things:
3
+ FastScript is a proprietary, source-available JavaScript-first full-stack runtime built around a first-class `.fs` file format.
4
4
 
5
- - Simpler than heavy framework stacks
6
- - Faster build and runtime pipeline
7
- - Compatible with existing JavaScript ecosystem
8
- - `.fs` first, `.js` always supported
5
+ It is designed to feel easier to read than heavyweight stack combinations while staying compatible with the JavaScript ecosystem developers already use.
9
6
 
10
- ## Commands
7
+ - Write normal JavaScript or TypeScript in `.fs`
8
+ - Write pages, APIs, middleware, jobs, and database workflows in `.fs`
9
+ - Keep compatibility with normal `.js` packages and modules
10
+ - Treat FastScript-specific syntax as optional sugar, not a requirement
11
+ - Compile to optimized JavaScript for production deployment
12
+ - Deploy the same app to Node, Vercel, or Cloudflare
13
+ - Run one quality gate for formatting, linting, typecheck, tests, smoke checks, benchmarks, and interop
14
+ - Build on the same language/runtime foundation that powers the future FastScript AI coding products
15
+
16
+ FastScript v3 is built for product teams that want a simpler, faster full-stack pipeline without surrendering compatibility with the ground-level JavaScript platform.
17
+
18
+ The v3 product contract is simple:
19
+
20
+ - `.fs` is a universal JS/TS container for the FastScript runtime
21
+ - FastScript-specific syntax is optional sugar
22
+ - valid JS/TS failures in `.fs` are FastScript compatibility bugs
23
+ - the speed story is earned by the runtime/compiler/toolchain and backed by release proof artifacts
24
+
25
+ ## What FastScript Is
26
+
27
+ FastScript combines:
28
+
29
+ 1. A JS/TS-compatible source container: `.fs`
30
+ 2. A compiler and CLI
31
+ 3. A full-stack app runtime
32
+ 4. A deployment pipeline for multiple targets
33
+ 5. A bridge back to standard JavaScript and TypeScript export paths
34
+
35
+ That means a single project can contain:
36
+
37
+ - UI pages
38
+ - API handlers
39
+ - middleware
40
+ - database migrations
41
+ - seed scripts
42
+ - jobs and workers
43
+ - deploy adapters
44
+
45
+ ## Core Positioning
46
+
47
+ FastScript is built to be:
48
+
49
+ - Simpler than stacking TypeScript + framework + glue code everywhere
50
+ - Faster to build and ship than heavier pipeline combinations
51
+ - Compatible with existing JavaScript libraries
52
+ - Friendly to AI-assisted generation because the language surface is smaller and more regular
53
+ - Easy to migrate into and easy to export back out
54
+
55
+ ## Current Measured Numbers
56
+
57
+ These are the real measured numbers from the current repo benchmark report:
58
+
59
+ - Build time: `702.98ms`
60
+ - JS first-load gzip: `2.71KB`
61
+ - Routes in benchmark app: `16`
62
+ - API routes in benchmark app: `5`
63
+ - Interop matrix: `13/13` passing
64
+ - Current website deploy target: Node, Vercel, and Cloudflare adapters supported
65
+
66
+ See:
67
+
68
+ - `benchmarks/latest-report.md`
69
+ - `benchmarks/suite-latest.json`
70
+ - `benchmarks/interop-latest.json`
71
+ - `docs/PROOF_PACK.md`
72
+
73
+ ## Why Teams Pick FastScript
74
+
75
+ - Smaller client payloads than heavier framework baselines
76
+ - Faster build loops and stricter release gates in one toolchain
77
+ - One runtime-native source container for pages, APIs, jobs, and middleware
78
+ - Package compatibility without giving up a proprietary language/runtime moat
79
+ - A direct path into the next FastScript AI assistant stack
80
+
81
+ ## Install
82
+
83
+ ### Option 1: npm install
84
+
85
+ ```bash
86
+ npm install -g fastscript
87
+ fastscript --help
88
+ ```
89
+
90
+ The published npm package is generated as a self-contained release bundle, so the CLI works without a second private npm package.
91
+
92
+ ### Option 2: local repo workflow
93
+
94
+ ```bash
95
+ git clone https://github.com/lordolami/fastscript.git
96
+ cd fastscript
97
+ npm install
98
+ ```
99
+
100
+ ### Option 3: global CLI link for daily use
11
101
 
12
102
  ```bash
103
+ git clone https://github.com/lordolami/fastscript.git
104
+ cd fastscript
13
105
  npm install
106
+ npm link
107
+ fastscript --help
108
+ ```
109
+
110
+ This gives you a global `fastscript` command backed by your local clone.
111
+
112
+ The source repos remain split for development, but npm users get a clean self-contained public package.
113
+
114
+ To use the CLI directly during development:
115
+
116
+ ```bash
117
+ node ./src/cli.mjs --help
118
+ ```
119
+
120
+ If you publish or link the package locally, the command is:
121
+
122
+ ```bash
123
+ fastscript
124
+ ```
125
+
126
+ ## Quick Start
127
+
128
+ ### Create a project
129
+
130
+ ```bash
14
131
  npm run create
132
+ ```
133
+
134
+ Or use one of the included templates:
135
+
136
+ ```bash
137
+ npm run create:fullstack
138
+ npm run create:startup-mvp
139
+ ```
140
+
141
+ ### Run locally
142
+
143
+ ```bash
144
+ npm run dev
145
+ ```
146
+
147
+ ### Link the CLI globally from your clone
148
+
149
+ ```bash
150
+ npm link
151
+ fastscript create my-app
152
+ ```
153
+
154
+ ### Build for production
155
+
156
+ ```bash
157
+ npm run build
158
+ ```
159
+
160
+ ### Start the production build
161
+
162
+ ```bash
163
+ npm run start
164
+ ```
165
+
166
+ ### Run the full quality gate
167
+
168
+ ```bash
169
+ npm run qa:all
170
+ ```
171
+
172
+ ## The `.fs` Language At A Glance
173
+
174
+ FastScript keeps normal JavaScript module structure and adds a few core forms:
175
+
176
+ - `fn` for functions
177
+ - `state` for named stateful declarations
178
+ - `~name = ...` for lightweight reactive-style declarations
179
+ - type syntax that can be stripped at compile time
180
+ - file conventions for pages, APIs, and runtime hooks
181
+
182
+ ### Example: basic page
183
+
184
+ ```fs
185
+ export default fn Page() {
186
+ state title = "FastScript"
187
+ ~subtitle = "Write once. Ship anywhere."
188
+
189
+ return `
190
+ <section>
191
+ <h1>${title}</h1>
192
+ <p>${subtitle}</p>
193
+ </section>
194
+ `
195
+ }
196
+ ```
197
+
198
+ ### Example: load data for a page
199
+
200
+ ```fs
201
+ export async fn load(ctx) {
202
+ const user = await ctx.db.get("users", ctx.params.id)
203
+ if (!user) return { notFound: true }
204
+ return { user }
205
+ }
206
+
207
+ export default fn Page({ user }) {
208
+ return `<h1>${user.name}</h1>`
209
+ }
210
+ ```
211
+
212
+ ### Example: API route
213
+
214
+ ```fs
215
+ export const schemas = {
216
+ POST: { sku: "string", qty: "int" }
217
+ }
218
+
219
+ export async fn POST(ctx) {
220
+ const body = await ctx.input.validateBody(schemas.POST)
221
+ const order = { id: Date.now().toString(36), ...body }
222
+ ctx.db.collection("orders").set(order.id, order)
223
+ ctx.queue.enqueue("send-order-email", { orderId: order.id })
224
+ return ctx.helpers.json({ ok: true, order })
225
+ }
226
+ ```
227
+
228
+ ### Example: middleware
229
+
230
+ ```fs
231
+ export async fn middleware(ctx, next) {
232
+ ctx.state.requestStartedAt = Date.now()
233
+
234
+ if (ctx.url.pathname.startsWith("/private") && !ctx.session?.user) {
235
+ return ctx.helpers.redirect("/")
236
+ }
237
+
238
+ return next()
239
+ }
240
+ ```
241
+
242
+ ### Example: hydration hook for client behavior
243
+
244
+ ```fs
245
+ export function hydrate({ root }) {
246
+ const button = root.querySelector("[data-action]")
247
+ if (!button) return
248
+
249
+ button.addEventListener("click", () => {
250
+ console.log("hydrated")
251
+ })
252
+ }
253
+ ```
254
+
255
+ ## Page Contract
256
+
257
+ A FastScript page can export any of the following:
258
+
259
+ - `export default fn Page(...)` or `export default function Page(...)`
260
+ - `export async fn load(ctx)` for server-side data loading
261
+ - `export function hydrate({ root, ...ctx })` for client behavior
262
+ - HTTP method handlers like `POST`, `PUT`, `PATCH`, `DELETE`
263
+
264
+ ### Minimal page
265
+
266
+ ```fs
267
+ export default fn Page() {
268
+ return `<h1>Hello</h1>`
269
+ }
270
+ ```
271
+
272
+ ### Page with loader
273
+
274
+ ```fs
275
+ export async fn load(ctx) {
276
+ return { now: new Date().toISOString() }
277
+ }
278
+
279
+ export default fn Page({ now }) {
280
+ return `<p>${now}</p>`
281
+ }
282
+ ```
283
+
284
+ ## Routing
285
+
286
+ FastScript uses file-based routing under `app/pages`.
287
+
288
+ ### Route examples
289
+
290
+ - `app/pages/index.fs` -> `/`
291
+ - `app/pages/blog/index.fs` -> `/blog`
292
+ - `app/pages/blog/[slug].fs` -> `/blog/:slug`
293
+ - `app/pages/docs/[...slug].fs` -> `/docs/:slug*`
294
+ - `app/pages/[[...slug]].fs` -> optional catch-all
295
+ - `app/pages/blog/[id:int].fs` -> typed param route
296
+ - `app/pages/404.fs` -> not-found page
297
+ - `app/pages/_layout.fs` -> global layout wrapper
298
+
299
+ ## Full-Stack Surface Area
300
+
301
+ FastScript currently includes first-party support for:
302
+
303
+ - pages
304
+ - layouts
305
+ - API routes
306
+ - middleware
307
+ - auth/session flows
308
+ - database migrations
309
+ - database seed scripts
310
+ - storage and upload handlers
311
+ - jobs and worker runtime
312
+ - deploy targets
313
+ - benchmark and interop reporting
314
+ - docs indexing and API reference generation
315
+
316
+ ## Interop Story
317
+
318
+ FastScript is designed to sit on top of the JavaScript ecosystem, not replace it with an isolated wall.
319
+
320
+ ### What works
321
+
322
+ - normal `.js` dependencies
323
+ - ESM/CJS compatibility checks
324
+ - export from `.fs` to `.js`
325
+ - export from `.fs` to `.ts`
326
+ - migration tooling from page-based JS/TS apps into `.fs`
327
+
328
+ ### Why that matters
329
+
330
+ Developers should be able to:
331
+
332
+ 1. migrate into FastScript without rewriting the whole world
333
+ 2. use existing libraries
334
+ 3. export back out when needed
335
+ 4. keep real production optionality
336
+
337
+ ## Commands
338
+
339
+ ### Main app lifecycle
340
+
341
+ ```bash
15
342
  npm run dev
16
343
  npm run start
17
344
  npm run build
345
+ npm run build:ssg
346
+ npm run create
18
347
  npm run check
348
+ npm run validate
349
+ ```
350
+
351
+ ### Language and migration
352
+
353
+ ```bash
19
354
  npm run migrate
20
- npm run bench
355
+ npm run convert
356
+ npm run migrate:rollback
357
+ npm run manifest
358
+ npm run wizard:migrate
21
359
  npm run export:js
22
360
  npm run export:ts
23
361
  npm run compat
24
- npm run validate
362
+ npm run typecheck
363
+ npm run typecheck:pass
364
+ npm run lint:fs
365
+ npm run lint:fs:pass
366
+ npm run diagnostics
367
+ npm run permissions
368
+ npm run format
369
+ npm run format:check
370
+ ```
371
+
372
+ `migrate` now runs strict compatibility-first conversion (rename-only + import extension rewrites + manifest/validation/fidelity reports).
373
+ Example: `npm run migrate -- app --dry-run`
374
+ Full proof mode: `npm run migrate -- app --fidelity-level full --fail-on-unproven-fidelity`
375
+
376
+ Latest trust artifacts are written to `.fastscript/conversion/latest`:
377
+ `conversion-manifest.json`, `diff-preview.json`, `validation-report.json`, `fidelity-report.json`.
378
+
379
+ Authored `.fs` now accepts normal JS/TS/JSX/TSX-style code directly. Proof artifacts for the current parity contract are written to `.fastscript/proofs/js-ts-syntax-proof.json` and `.fastscript/proofs/fs-parity-matrix.json`.
380
+
381
+ ### Database and data
382
+
383
+ ```bash
25
384
  npm run db:migrate
26
385
  npm run db:seed
386
+ npm run db:rollback
387
+ ```
388
+
389
+ ### Deploy and runtime
390
+
391
+ ```bash
392
+ npm run deploy:node
393
+ npm run deploy:vercel
394
+ npm run deploy:cloudflare
395
+ npm run worker
396
+ npm run worker:replay-dead-letter
397
+ ```
398
+
399
+ ### Quality and testing
400
+
401
+ ```bash
27
402
  npm run smoke:dev
28
403
  npm run smoke:start
29
404
  npm run test:core
30
- npm run test:language-spec
31
- npm run test:parser-fuzz
32
- npm run test:normalizer-stress
33
- npm run test:determinism
34
- npm run test:runtime-contract
35
- npm run bench:language
36
- npm run bench:report
405
+ npm run test:conformance
406
+ npm run test:plugins
407
+ npm run test:routes
408
+ npm run test:interop-matrix
409
+ npm run test:vscode-language
37
410
  npm run qa:gate
38
411
  npm run qa:all
39
- npm run worker
40
- npm run deploy:node
41
- npm run deploy:vercel
42
- npm run deploy:cloudflare
412
+ ```
413
+
414
+ ### Benchmarks, reports, and ops
415
+
416
+ ```bash
417
+ npm run bench
418
+ npm run bench:discipline
419
+ npm run regression
420
+ npm run profile
421
+ npm run trace
422
+ npm run bench:report
423
+ npm run benchmark:suite
424
+ npm run interop:report
425
+ npm run sbom:generate
426
+ npm run proof:publish
427
+ npm run backup:create
428
+ npm run backup:restore
429
+ npm run backup:verify
430
+ npm run retention:sweep
431
+ npm run kpi:track
432
+ npm run deploy:zero-downtime
433
+ ```
434
+
435
+ ### Release and tooling
436
+
437
+ ```bash
43
438
  npm run release:patch
439
+ npm run release:minor
440
+ npm run release:major
44
441
  npm run pack:check
442
+ npm run hooks:install
443
+ npm run repo:lock
444
+ npm run plugins:marketplace-sync
445
+ npm run docs:index
446
+ npm run docs:api-ref
447
+ npm run style:generate
448
+ npm run style:check
45
449
  ```
46
450
 
47
- - `npm run migrate`: convert `app/pages` files (`.js/.jsx/.ts/.tsx`) to `.fs`
48
- - `npm run bench`: enforce 3G-oriented gzip budgets on built output
49
- - `npm run export:js`: export `.fs` app source to plain `.js` project
50
- - `npm run export:ts`: export `.fs` app source to `.ts` project
51
- - `npm run compat`: run ESM/CJS/FS interop smoke checks
52
- - `npm run db:migrate`: run database migrations from `app/db/migrations`
53
- - `npm run db:seed`: seed database from `app/db/seed.js`
54
- - `npm run validate`: run full quality gate (check/build/bench/compat/db/export)
55
- - `npm run smoke:dev`: automated SSR/API/auth/middleware smoke test
56
- - `npm run smoke:start`: production `fastscript start` smoke test
57
- - `npm run test:core`: middleware/auth/db/migration round-trip tests
58
- - `npm run test:language-spec`: validates language spec API and strict diagnostics
59
- - `npm run test:parser-fuzz`: randomized parser/normalizer robustness sweep
60
- - `npm run test:normalizer-stress`: load/stress test for lenient parser pipeline
61
- - `npm run test:determinism`: build determinism check
62
- - `npm run test:runtime-contract`: route/runtime manifest contract test
63
- - `npm run bench:language`: writes parser/normalizer benchmark baseline
64
- - `npm run bench:report`: writes benchmark report to `benchmarks/latest-report.md`
65
- - `npm run qa:gate`: validation + full test suite for merge gating
66
- - `npm run qa:all`: full quality sweep in one command
67
- - `npm run worker`: run queue worker runtime
68
- - `npm run deploy:*`: generate deploy adapters for node/vercel/cloudflare
69
- - `npm run release:*`: semver bump + changelog append
70
- - `npm run pack:check`: npm publish dry-run
71
-
72
- ## Additional Docs
451
+ ## Recommended Developer Flow
73
452
 
74
- - `docs/AI_CONTEXT_PACK_V1.md`
75
- - `docs/PLUGIN_API_CONTRACT.md`
76
- - `docs/INCIDENT_PLAYBOOK.md`
77
- - `docs/DEPLOY_GUIDE.md`
78
- - `docs/V1_TRANCHE_1_44.md`
453
+ For normal development:
454
+
455
+ ```bash
456
+ npm install
457
+ npm run dev
458
+ ```
459
+
460
+ Before shipping:
461
+
462
+ ```bash
463
+ npm run qa:all
464
+ ```
465
+
466
+ For deployment:
467
+
468
+ ```bash
469
+ npm run deploy:cloudflare
470
+ ```
471
+
472
+ Or:
473
+
474
+ ```bash
475
+ npm run deploy:node
476
+ npm run deploy:vercel
477
+ ```
79
478
 
80
- ## Project layout
479
+ ## Project Layout
81
480
 
82
481
  ```txt
83
482
  app/
84
- pages/
85
- _layout.fs
86
- index.fs
87
- 404.fs
88
483
  api/
89
- hello.js
90
- auth.js
484
+ auth.fs
485
+ docs-search.fs
486
+ hello.fs
487
+ upload.fs
488
+ webhook.fs
91
489
  db/
92
490
  migrations/
93
- 001_init.js
94
- seed.js
491
+ 001_init.fs
492
+ seed.fs
493
+ design/
494
+ class-allowlist.json
495
+ tokens.json
496
+ pages/
497
+ _layout.fs
498
+ index.fs
499
+ learn.fs
500
+ examples.fs
501
+ benchmarks.fs
502
+ roadmap.fs
503
+ docs/
504
+ index.fs
505
+ latest.fs
506
+ playground.fs
507
+ search.fs
508
+ v1/
509
+ index.fs
510
+ v1.1/
511
+ index.fs
512
+ blog/
513
+ index.fs
514
+ [slug].fs
515
+ env.schema.fs
95
516
  middleware.fs
96
517
  styles.css
518
+ styles.generated.css
519
+ src/
520
+ cli.mjs
521
+ build.mjs
522
+ server-runtime.mjs
523
+ examples/
524
+ fullstack/
525
+ startup-mvp/
526
+ spec/
527
+ LANGUAGE_V1_SPEC.md
528
+ MASTER_TODO.md
97
529
  ```
98
530
 
99
- ## Page contract
531
+ ## Example Projects Included
100
532
 
101
- - `export default function Page(ctx) { return htmlString }`
102
- - Optional `export async function load(ctx) { return data }`
103
- - Optional method actions in page files: `POST/PUT/PATCH/DELETE`
104
- - `.fs` supports lenient FastScript syntax such as `~state = value`
105
- - Optional `export function hydrate({ root, ...ctx })` for client hydration
533
+ ### `examples/fullstack`
534
+ A production-style full-stack starter with:
106
535
 
107
- ## Routing
536
+ - pages
537
+ - API route
538
+ - migration
539
+ - seed script
540
+ - job handler
541
+ - layout
542
+
543
+ ### `examples/startup-mvp`
544
+ A more startup-shaped example with:
545
+
546
+ - cart + checkout APIs
547
+ - dashboard page
548
+ - migrations
549
+ - email job flow
550
+
551
+ ## Deploy Targets
552
+
553
+ FastScript currently has deploy adapters for:
554
+
555
+ - Node
556
+ - Vercel
557
+ - Cloudflare
558
+
559
+ The long-term direction is one language, many targets:
560
+
561
+ - web
562
+ - server
563
+ - mobile
564
+ - desktop
565
+
566
+ That roadmap is tracked in:
567
+
568
+ - `spec/MULTI_TARGET_APP_PLAN.md`
569
+ - `app/pages/roadmap.fs`
570
+
571
+ ## Documentation Map
572
+
573
+ Key docs in this repo:
574
+
575
+ - `spec/LANGUAGE_V1_SPEC.md`
576
+ - `spec/STYLING_V1_SPEC.md`
577
+ - `docs/GOVERNANCE_VERSIONING_POLICY.md`
578
+ - `docs/LANGUAGE_V1_MIGRATION.md`
579
+ - `docs/COMPILER_ERROR_CODES.md`
580
+ - `docs/AI_CONTEXT_PACK_V1.md`
581
+ - `docs/PLUGIN_API_CONTRACT.md`
582
+ - `docs/INCIDENT_PLAYBOOK.md` (public stub; full version lives in private core)
583
+ - `docs/DEPLOY_GUIDE.md`
584
+ - `docs/SUPPORT_MATRIX.md`
585
+ - `docs/RELEASE_PROCESS.md`
586
+ - `docs/TROUBLESHOOTING.md`
587
+ - `docs/ARCHITECTURE_OVERVIEW.md`
588
+ - `docs/KNOWN_LIMITATIONS.md`
589
+ - `docs/CONTRIBUTING.md`
590
+ - `docs/OBSERVABILITY.md` (public stub; full version lives in private core)
591
+ - `docs/RUNTIME_PERMISSIONS.md`
592
+ - `docs/ROLLOUT_GUIDE.md` (public stub; full version lives in private core)
593
+ - `SECURITY.md`
594
+
595
+ ## Protection, Licensing, and Commercial Use
596
+
597
+ FastScript is being built as the core language layer for a larger AI product. Because of that, the repository is not licensed under a permissive open-source license.
598
+
599
+ What that means in practice:
600
+
601
+ - you can review the repository and evaluate it internally;
602
+ - you cannot commercially use, redistribute, relicense, or build competing products on top of this code without written permission;
603
+ - you cannot use this repository to train, fine-tune, improve, or evaluate a commercial AI product without written permission;
604
+ - trademark rights in the FastScript name, logo, and branding are reserved.
605
+
606
+ If you need commercial use, partnership, integration, or platform rights, contact:
607
+
608
+ - `legal@fastscript.dev`
609
+
610
+ ## Contributing
611
+
612
+ FastScript is evolving quickly. If you contribute:
613
+
614
+ 1. keep the canonical repo lock intact
615
+ 2. run `npm run qa:all`
616
+ 3. keep `.fs` and `.js` interop working
617
+ 4. avoid unnecessary ecosystem lock-in
618
+ 5. preserve the language goal: simpler, faster, still grounded in JavaScript
619
+
620
+ Contribution review does not grant any right to commercially reuse the platform outside the repository license.
621
+
622
+ ## Public/Private Boundary
623
+
624
+ This public repository is the developer-facing FastScript surface. Sensitive compiler/runtime/platform materials now live in the protected private repository `https://github.com/lordolami/fastscript-core-private`. The public repo consumes private-core modules through bridge files and tracks the boundary in `docs/PRIVATE_CORE_SPLIT.md`.
625
+
626
+ ## Canonical Repo
627
+
628
+ Canonical repo lock:
629
+
630
+ `github.com/lordolami/fastscript`
631
+
632
+ The repo lock script is:
633
+
634
+ ```bash
635
+ npm run repo:lock
636
+ ```
637
+
638
+ ## License
108
639
 
109
- - `app/pages/index.fs` or `index.js` -> `/`
110
- - `app/pages/blog/index.fs` or `index.js` -> `/blog`
111
- - `app/pages/blog/[slug].fs` or `[slug].js` -> `/blog/:slug`
112
- - `app/pages/404.fs` or `404.js` -> not found view
113
- - `app/pages/_layout.fs` or `_layout.js` -> global layout wrapper
640
+ This repository is licensed under the FastScript Source-Available License v1.
114
641
 
115
- ## Why this reset
642
+ See:
116
643
 
117
- This repo was reset intentionally to rebuild from ground up around a JavaScript-first model with minimal syntax friction.
644
+ - `LICENSE`
645
+ - `SECURITY.md`
646
+ - `app/pages/license.fs`
647
+
648
+
649
+