create-koppajs 1.0.1 → 1.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.
- package/CHANGELOG.md +127 -0
- package/README.md +166 -131
- package/bin/create-koppajs.js +346 -175
- package/package.json +55 -34
- package/template/AI_CONSTITUTION.md +50 -0
- package/template/ARCHITECTURE.md +86 -0
- package/template/CHANGELOG.md +34 -0
- package/template/CONTRIBUTING.md +92 -0
- package/template/DECISION_HIERARCHY.md +32 -0
- package/template/DEVELOPMENT_RULES.md +57 -0
- package/template/LICENSE +1 -1
- package/template/README.md +241 -49
- package/template/RELEASE.md +230 -0
- package/template/ROADMAP.md +34 -0
- package/template/TESTING_STRATEGY.md +93 -0
- package/template/_editorconfig +12 -0
- package/template/_gitattributes +1 -0
- package/template/_github/instructions/ai-workflow.md +33 -0
- package/template/_github/workflows/ci.yml +38 -0
- package/template/_github/workflows/release.yml +58 -0
- package/template/_gitignore +5 -0
- package/template/_husky/commit-msg +8 -0
- package/template/_husky/pre-commit +1 -0
- package/template/_npmrc +1 -0
- package/template/_prettierignore +7 -0
- package/template/commitlint.config.mjs +6 -0
- package/template/docs/adr/0001-keep-the-starter-minimal.md +32 -0
- package/template/docs/adr/0002-adopt-a-living-meta-layer.md +30 -0
- package/template/docs/adr/0003-normalize-kpa-plugin-output.md +24 -0
- package/template/docs/adr/0004-adopt-an-automated-quality-baseline.md +31 -0
- package/template/docs/adr/0005-adopt-a-tag-driven-release-baseline.md +45 -0
- package/template/docs/adr/0006-adopt-commit-message-conventions.md +39 -0
- package/template/docs/adr/README.md +37 -0
- package/template/docs/adr/TEMPLATE.md +18 -0
- package/template/docs/architecture/module-boundaries.md +48 -0
- package/template/docs/meta/maintenance.md +40 -0
- package/template/docs/quality/quality-gates.md +39 -0
- package/template/docs/specs/README.md +36 -0
- package/template/docs/specs/TEMPLATE.md +34 -0
- package/template/docs/specs/app-bootstrap.md +46 -0
- package/template/docs/specs/counter-component.md +48 -0
- package/template/docs/specs/quality-workflow.md +62 -0
- package/template/eslint.config.mjs +54 -0
- package/template/package.json +57 -6
- package/template/playwright.config.ts +31 -0
- package/template/pnpm-lock.yaml +3784 -0
- package/template/prettier.config.mjs +6 -0
- package/template/src/app-view.kpa +35 -36
- package/template/src/counter-component.kpa +87 -87
- package/template/src/style.css +5 -5
- package/template/tests/e2e/app.spec.ts +18 -0
- package/template/tests/integration/main-bootstrap.test.ts +33 -0
- package/template/tests/unit/normalize-kpa-module-export.test.ts +46 -0
- package/template/tsconfig.json +13 -2
- package/template/vite.config.d.mts +7 -0
- package/template/vite.config.mjs +39 -4
- package/template/vitest.config.mjs +19 -0
- package/template-overlays/router/ARCHITECTURE.md +86 -0
- package/template-overlays/router/CHANGELOG.md +44 -0
- package/template-overlays/router/DEVELOPMENT_RULES.md +57 -0
- package/template-overlays/router/README.md +243 -0
- package/template-overlays/router/ROADMAP.md +34 -0
- package/template-overlays/router/TESTING_STRATEGY.md +67 -0
- package/template-overlays/router/docs/adr/0001-keep-the-starter-minimal.md +32 -0
- package/template-overlays/router/docs/architecture/module-boundaries.md +39 -0
- package/template-overlays/router/docs/meta/maintenance.md +38 -0
- package/template-overlays/router/docs/specs/README.md +19 -0
- package/template-overlays/router/docs/specs/app-bootstrap.md +42 -0
- package/template-overlays/router/docs/specs/router-navigation.md +41 -0
- package/template-overlays/router/index.html +14 -0
- package/template-overlays/router/package.json +74 -0
- package/template-overlays/router/pnpm-lock.yaml +3793 -0
- package/template-overlays/router/src/app-view.kpa +128 -0
- package/template-overlays/router/src/home-page.kpa +100 -0
- package/template-overlays/router/src/main.ts +89 -0
- package/template-overlays/router/src/not-found-page.kpa +69 -0
- package/template-overlays/router/src/router-page.kpa +102 -0
- package/template-overlays/router/src/style.css +51 -0
- package/template-overlays/router/tests/e2e/app.spec.ts +38 -0
- package/template-overlays/router/tests/integration/main-bootstrap.test.ts +150 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to **create-koppajs** are documented in this file.
|
|
4
|
+
|
|
5
|
+
This project uses a **manual, tag-driven release process**.
|
|
6
|
+
Only tagged versions represent official releases.
|
|
7
|
+
|
|
8
|
+
This changelog documents **intentional milestones and guarantees**,
|
|
9
|
+
not every internal refactor.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## [Unreleased]
|
|
14
|
+
|
|
15
|
+
_No unreleased changes yet._
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## [1.2.0] — Starter Variants And Router Overlay
|
|
20
|
+
|
|
21
|
+
**2026-03-26**
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- added an opt-in `router` starter that layers `@koppajs/koppajs-router`, a
|
|
26
|
+
two-page navigation flow, and an explicit fallback route on top of the
|
|
27
|
+
minimal baseline
|
|
28
|
+
- added overlay-based starter support through `template-overlays/` so future
|
|
29
|
+
starter variants can replace only the files that actually differ
|
|
30
|
+
|
|
31
|
+
### Changed
|
|
32
|
+
|
|
33
|
+
- extended the CLI contract with `--template` and `--router`, plus interactive
|
|
34
|
+
starter selection in TTY runs when no template flag is provided
|
|
35
|
+
- expanded smoke, unit, and generated-template build coverage to validate both
|
|
36
|
+
the default minimal starter and the opt-in router starter
|
|
37
|
+
- updated architecture docs, specs, and ADRs to reflect multi-starter support
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## [1.1.0] — Starter & Release Baseline Upgrade
|
|
42
|
+
|
|
43
|
+
**2026-03-17**
|
|
44
|
+
|
|
45
|
+
### Added
|
|
46
|
+
|
|
47
|
+
- Added a repository meta layer covering architecture, decision hierarchy,
|
|
48
|
+
testing strategy, specs, ADRs, quality gates, and AI collaboration rules
|
|
49
|
+
- Added a repository-specific `RELEASE.md` aligned with the `koppajs-core`
|
|
50
|
+
release model and this package's npm publish path
|
|
51
|
+
- Added Conventional Commit enforcement with `commitlint`, Husky, and
|
|
52
|
+
`lint-staged`
|
|
53
|
+
- Added repository-level quality scripts for meta checks, syntax checks,
|
|
54
|
+
formatting hygiene, cleanup, and package dry-run validation
|
|
55
|
+
- Added generated-template build verification and wired it into CI and releases
|
|
56
|
+
|
|
57
|
+
### Changed
|
|
58
|
+
|
|
59
|
+
- Updated contributing guidance to match the actual scripts, workflows, and
|
|
60
|
+
repository responsibilities
|
|
61
|
+
- Expanded smoke coverage for README patching, invalid project names, and
|
|
62
|
+
scaffolding into an existing empty directory
|
|
63
|
+
- Documented the CI meta-layer presence guard in the quality and architecture
|
|
64
|
+
docs
|
|
65
|
+
- Added importable CLI helper coverage with the Node.js built-in test runner
|
|
66
|
+
- Synced the bundled starter template to the current `koppajs-example`
|
|
67
|
+
technical baseline, including quality tooling, meta docs, tests, and release
|
|
68
|
+
files
|
|
69
|
+
- Switched root CI and release workflows to pnpm-based dependency installation
|
|
70
|
+
so the new hook and commit tooling actually runs in automation
|
|
71
|
+
- Isolated the root pre-commit `lint-staged` config from the generated
|
|
72
|
+
starter's own hook tooling so root commits stay reliable
|
|
73
|
+
- Clarified the starter's supported Node.js lines and added an explicit
|
|
74
|
+
validation guard for unsupported runtimes such as Node 23
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## [1.0.1] — License & Metadata Fix
|
|
79
|
+
|
|
80
|
+
**2026-03-01**
|
|
81
|
+
|
|
82
|
+
Patch release to align license with the rest of the KoppaJS ecosystem.
|
|
83
|
+
No CLI or template changes.
|
|
84
|
+
|
|
85
|
+
### Changed
|
|
86
|
+
|
|
87
|
+
- License changed from MIT to Apache License 2.0 (consistent with all KoppaJS projects)
|
|
88
|
+
- Static license badge updated in README
|
|
89
|
+
- Copyright year updated to 2026
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## [1.0.0] — Initial Stable Release
|
|
94
|
+
|
|
95
|
+
**2026-03-01**
|
|
96
|
+
|
|
97
|
+
First stable release of the official KoppaJS project scaffolder.
|
|
98
|
+
|
|
99
|
+
### Features
|
|
100
|
+
|
|
101
|
+
- CLI scaffolder: `pnpm create koppajs my-app`
|
|
102
|
+
- Interactive project name prompt when omitted
|
|
103
|
+
- Complete starter template with Vite, TypeScript, and sample `.kpa` components
|
|
104
|
+
- Supports `pnpm`, `npm`, and `npx`
|
|
105
|
+
- Smoke test suite for generated project validation
|
|
106
|
+
|
|
107
|
+
### Tooling
|
|
108
|
+
|
|
109
|
+
- CI workflow for syntax check and smoke test
|
|
110
|
+
- Tag-driven release workflow for npm publication
|
|
111
|
+
- Code of Conduct and Contributing guidelines
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Versioning Policy
|
|
116
|
+
|
|
117
|
+
- Semantic Versioning (SemVer) is followed pragmatically
|
|
118
|
+
- **Breaking changes** include:
|
|
119
|
+
- CLI behavior changes
|
|
120
|
+
- template structure changes
|
|
121
|
+
- Internal refactors without observable behavior change
|
|
122
|
+
do **not** require a major version bump
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
_This changelog documents intent.
|
|
127
|
+
If something is not written here, it is not guaranteed._
|
package/README.md
CHANGED
|
@@ -1,131 +1,166 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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
|
-
|
|
1
|
+
# create-koppajs
|
|
2
|
+
|
|
3
|
+
`create-koppajs` is the official KoppaJS CLI scaffolder. It creates a new
|
|
4
|
+
project by copying the versioned base starter in `template/`, optionally
|
|
5
|
+
applying a supported starter overlay from `template-overlays/`, and patching a
|
|
6
|
+
small, explicit set of identity files.
|
|
7
|
+
|
|
8
|
+
## Purpose
|
|
9
|
+
|
|
10
|
+
This repository exists to do one job well:
|
|
11
|
+
|
|
12
|
+
- create a fresh project directory
|
|
13
|
+
- copy the current supported KoppaJS starter baseline
|
|
14
|
+
- optionally add a supported starter variant such as `router`
|
|
15
|
+
- preserve a stable, inspectable bootstrap path for new KoppaJS applications
|
|
16
|
+
|
|
17
|
+
It is not a runtime package and it does not own application behavior after
|
|
18
|
+
generation.
|
|
19
|
+
|
|
20
|
+
## Repository Classification
|
|
21
|
+
|
|
22
|
+
- Repo type: CLI scaffolding package with a bundled starter family
|
|
23
|
+
- Runtime responsibility: one-shot filesystem scaffolding through
|
|
24
|
+
`bin/create-koppajs.js`
|
|
25
|
+
- Build-time responsibility: publish the starter assets, protect the contract,
|
|
26
|
+
and validate tagged releases
|
|
27
|
+
- UI surface: none at the repository root; the generated starter owns the UI
|
|
28
|
+
- Maturity level: stable, contract-governed, maintenance-first
|
|
29
|
+
|
|
30
|
+
## Ownership Boundaries
|
|
31
|
+
|
|
32
|
+
- `bin/create-koppajs.js` owns argument parsing, prompting, validation, starter
|
|
33
|
+
selection, template copy, placeholder patching, and next-step output.
|
|
34
|
+
- `template/` owns the default `minimal` starter baseline.
|
|
35
|
+
- `template-overlays/` owns the files that differ for opt-in starter variants.
|
|
36
|
+
- `scripts/` and `.github/workflows/` own repository-quality and release
|
|
37
|
+
verification.
|
|
38
|
+
- Root governance files own the repository doctrine and must stay aligned with
|
|
39
|
+
code and workflows.
|
|
40
|
+
|
|
41
|
+
The root package must not take on runtime concerns that belong in generated
|
|
42
|
+
applications, and generated applications must not depend on unpublished root
|
|
43
|
+
files after scaffold completion.
|
|
44
|
+
|
|
45
|
+
## Public Contract
|
|
46
|
+
|
|
47
|
+
The stable public contract of this repository is:
|
|
48
|
+
|
|
49
|
+
- the `create-koppajs` command and its `--help` / `--version` flags
|
|
50
|
+
- the optional project-name argument and prompt fallback when omitted
|
|
51
|
+
- the optional `--template <name>` and `--router` starter-selection flags
|
|
52
|
+
- the interactive starter-template prompt when no template flag is provided in
|
|
53
|
+
an interactive terminal
|
|
54
|
+
- rejection of invalid project names, invalid template names, and non-empty
|
|
55
|
+
target directories
|
|
56
|
+
- recursive copying of the bundled `template/` directory plus any selected
|
|
57
|
+
overlay
|
|
58
|
+
- restoration of publish-safe dotfiles and dotdirectories during copy
|
|
59
|
+
- patching of generated `package.json`, `README.md`, `CHANGELOG.md`, and
|
|
60
|
+
`RELEASE.md`
|
|
61
|
+
- the generated starter baselines defined by `template/` and
|
|
62
|
+
`template-overlays/`
|
|
63
|
+
- the npm package payload: `bin/`, `template/`, `template-overlays/`,
|
|
64
|
+
`README.md`, `CHANGELOG.md`, and `LICENSE`
|
|
65
|
+
|
|
66
|
+
The governing specs for that contract are:
|
|
67
|
+
|
|
68
|
+
- [docs/specs/cli-scaffolding.md](./docs/specs/cli-scaffolding.md)
|
|
69
|
+
- [docs/specs/template-starter-contract.md](./docs/specs/template-starter-contract.md)
|
|
70
|
+
|
|
71
|
+
## Usage
|
|
72
|
+
|
|
73
|
+
Default starter:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
pnpm create koppajs my-app
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Router starter:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
pnpm create koppajs my-app --template router
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Alternative entrypoints:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
npm create koppajs my-app
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
npx create-koppajs my-app
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
If the target directory name is omitted, the CLI prompts for one. If no
|
|
96
|
+
template flag is provided in an interactive terminal, the CLI also prompts for
|
|
97
|
+
starter selection. Non-interactive runs default to `minimal`.
|
|
98
|
+
|
|
99
|
+
After generation:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
cd my-app
|
|
103
|
+
pnpm install
|
|
104
|
+
pnpm dev
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Requirements
|
|
108
|
+
|
|
109
|
+
- for `create-koppajs`: Node.js `>=20`
|
|
110
|
+
- for generated starter projects: pnpm `>=10` and a starter-supported Node.js
|
|
111
|
+
line, currently `20.19+`, `22.13+`, or `24+`
|
|
112
|
+
|
|
113
|
+
## Generated Starters
|
|
114
|
+
|
|
115
|
+
The generated project includes one of two supported starters:
|
|
116
|
+
|
|
117
|
+
- `minimal` by default: a small KoppaJS application built on Vite and
|
|
118
|
+
TypeScript
|
|
119
|
+
- `router` as opt-in: the same baseline plus `@koppajs/koppajs-router`, a
|
|
120
|
+
simple two-page navigation flow, and an explicit fallback route
|
|
121
|
+
|
|
122
|
+
Every starter also includes:
|
|
123
|
+
|
|
124
|
+
- quality tooling through ESLint, Prettier, Vitest, and Playwright
|
|
125
|
+
- local workflow guards through Husky, lint-staged, and commitlint
|
|
126
|
+
- starter governance files, ADR/spec structure, and release-process documents
|
|
127
|
+
- GitHub workflows for CI and tagged releases
|
|
128
|
+
|
|
129
|
+
The root repository treats those starters as versioned product surface, not
|
|
130
|
+
test data.
|
|
131
|
+
|
|
132
|
+
## Ecosystem Fit
|
|
133
|
+
|
|
134
|
+
`create-koppajs` is the canonical entry point for starting a new KoppaJS
|
|
135
|
+
application. It complements:
|
|
136
|
+
|
|
137
|
+
- `@koppajs/koppajs-core` for runtime behavior
|
|
138
|
+
- `@koppajs/koppajs-router` for optional route orchestration in scaffolded apps
|
|
139
|
+
- `@koppajs/koppajs-vite-plugin` for build integration
|
|
140
|
+
- the maintained KoppaJS starter conventions reflected in `template/` and
|
|
141
|
+
`template-overlays/`
|
|
142
|
+
|
|
143
|
+
The repository stays intentionally narrow so the CLI, starter contract, and
|
|
144
|
+
governance baseline can evolve together without hidden behavior.
|
|
145
|
+
|
|
146
|
+
## Governance
|
|
147
|
+
|
|
148
|
+
The root meta layer defines how this repository changes:
|
|
149
|
+
|
|
150
|
+
- [AI_CONSTITUTION.md](./AI_CONSTITUTION.md)
|
|
151
|
+
- [ARCHITECTURE.md](./ARCHITECTURE.md)
|
|
152
|
+
- [DECISION_HIERARCHY.md](./DECISION_HIERARCHY.md)
|
|
153
|
+
- [DEVELOPMENT_RULES.md](./DEVELOPMENT_RULES.md)
|
|
154
|
+
- [TESTING_STRATEGY.md](./TESTING_STRATEGY.md)
|
|
155
|
+
- [RELEASE.md](./RELEASE.md)
|
|
156
|
+
- [ROADMAP.md](./ROADMAP.md)
|
|
157
|
+
- [docs/meta/README.md](./docs/meta/README.md)
|
|
158
|
+
- [docs/architecture/README.md](./docs/architecture/README.md)
|
|
159
|
+
- [docs/quality/README.md](./docs/quality/README.md)
|
|
160
|
+
|
|
161
|
+
Tagged releases are documented in [CHANGELOG.md](./CHANGELOG.md). Contributor
|
|
162
|
+
workflow rules live in [CONTRIBUTING.md](./CONTRIBUTING.md).
|
|
163
|
+
|
|
164
|
+
## License
|
|
165
|
+
|
|
166
|
+
Apache License 2.0 — © 2026 KoppaJS, Bastian Bensch
|