Skip to content

Commit 543dcb8

Browse files
committed
Prepare v1 release candidate
1 parent 911cef1 commit 543dcb8

13 files changed

Lines changed: 849 additions & 5 deletions

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ jobs:
4444
- name: Test
4545
run: bun test
4646

47+
- name: Validate generated project render matrix
48+
run: bun run validate:render
49+
4750
- name: Build
4851
run: bun run build
4952

.github/workflows/publish.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,18 @@ jobs:
5151
- name: Test
5252
run: bun test
5353

54+
- name: Validate generated projects
55+
run: bun run validate
56+
5457
- name: Build
5558
run: bun run build
5659

5760
- name: Check package contents
5861
run: bun run pack:check
5962

63+
- name: Smoke test packed package
64+
run: bun run pack:smoke
65+
6066
- name: Publish to npm
6167
if: github.event_name == 'release' || inputs.dry_run == false
6268
env:

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Changelog
2+
3+
## 1.0.0-rc.1
4+
5+
### Added
6+
7+
- Added a V1 release plan covering public CLI contract, generated project validation, package smoke testing, release candidates, and final `1.0.0` gates.
8+
- Added generated-project validation scripts for the representative V1 option matrix.
9+
- Added a packed-package smoke test that packs the npm tarball, installs it into a temp consumer project, checks `--version`, runs `--dry-run`, and scaffolds a real app without dependency installation.
10+
- Added release workflow gates for generated-project validation and packed-package smoke testing.
11+
- Documented manifest compatibility policy and V1 support boundaries.
12+
13+
### Migration Notes
14+
15+
- `0.x` generated projects should keep their checked-in `ces.json` file. Future additive features should be applied with `create-electrobun-stack add` where possible.
16+
- `standard` and `full` remain accepted template profile names for compatibility, but they intentionally share the V1 `minimal` template source until they have distinct, tested behavior.
17+
- The V1 manifest contract is additive. Breaking manifest migrations require a documented migration path before release.

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ Some options add commands. For example, `--addons turborepo` adds `bun run check
141141
- [Add command](./docs/add-command.md): how to grow an existing generated app.
142142
- [Manifest reference](./docs/manifest.md): `ces.json` fields and schema.
143143
- [Templates](./docs/templates.md): how template overlays are organized.
144+
- [V1 release plan](./docs/v1-plan.md): release gates for moving from pre-release to `1.0.0`.
144145
- [LLM guide](./docs/llm.txt): compact agent-oriented reference.
145146

146147
## Development
@@ -151,9 +152,19 @@ bun run build
151152
bun test
152153
bun run typecheck
153154
bun run lint
155+
bun run validate:render
154156
npm pack --dry-run
155157
```
156158

157159
The CLI entrypoint is `src/index.ts`. Stack choices live in `src/options.ts`, manifest generation lives in `src/manifest.ts`, and template rendering lives in `src/scaffold.ts`.
158160

159161
The published npm package ships the built CLI from `dist/index.mjs` plus `templates/` and `docs/`. Run `bun run build` before local package checks; `npm pack --dry-run` also runs the build through `prepack`. The bin keeps a Node shebang for npm compatibility; `bunx --bun create-electrobun-stack@latest` forces Bun to run the same built CLI.
162+
163+
Release checks:
164+
165+
```bash
166+
bun run validate
167+
bun run pack:smoke
168+
```
169+
170+
`bun run validate:render` scaffolds the representative V1 matrix and runs Biome against the rendered output without installing generated dependencies. `bun run validate` performs the slower release gate: it installs each generated project and runs typecheck, lint, tests when present, and build. `bun run pack:smoke` proves the packed tarball can be installed and used through its published bin.

docs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ This folder is the durable reference for `create-electrobun-stack`. It is meant
1010
- [Add command](./add-command.md) explains how existing generated apps are expanded through `ces.json`.
1111
- [Manifest reference](./manifest.md) documents `ces.json` and links to the JSON schema.
1212
- [Templates](./templates.md) explains the template overlay structure used by the generator.
13+
- [V1 release plan](./v1-plan.md) tracks the work needed to move from pre-release to `1.0.0`.
1314
- [LLM guide](./llm.txt) is a compact plain-text summary for agents and retrieval systems.
1415

1516
## Recommended Reading Path

docs/generated-project.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,3 +155,11 @@ Before distributing an app generated by this stack:
155155
- Run `bun run typecheck`, `bun run lint`, and `bun test` when present.
156156
- Run `bun run build` on the platform you are packaging for.
157157
- Review local persistence paths and database behavior for your release model.
158+
159+
## Troubleshooting
160+
161+
- Bun version mismatch: install Bun `>=1.3.0` and rerun the generated install command.
162+
- Node engine mismatch: use Node.js `>=20.19.0` when running the published generator through npm or npx.
163+
- Electrobun platform support: run and package generated apps on a desktop OS supported by Electrobun.
164+
- Package manager install failures: rerun the generated install command shown in the README, then rerun typecheck and build.
165+
- Unsupported option combinations: rerun the generator or `add` command with a supported combination from [Stack Options](./options.md).

docs/manifest.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,22 @@ The manifest is used for:
1111

1212
The schema is published in this repository at [ces.schema.json](./ces.schema.json). Generated manifests point `$schema` at the package version on unpkg.
1313

14+
## Compatibility Policy
15+
16+
V1 manifests are additive. Existing generated projects should continue to work with future `create-electrobun-stack add` features as long as their `ces.json` stays in source control and keeps the required top-level stack fields.
17+
18+
The generator may add new optional fields or feature booleans. Tools should ignore unknown fields because the schema allows additional properties.
19+
20+
Breaking manifest migrations require a documented migration path before release. A future generator should not silently rewrite incompatible manifest shapes or drop existing stack state.
21+
1422
## Example
1523

1624
```json
1725
{
18-
"$schema": "https://unpkg.com/create-electrobun-stack@0.1.1/docs/ces.schema.json",
19-
"version": "0.1.1",
26+
"$schema": "https://unpkg.com/create-electrobun-stack@1.0.0-rc.1/docs/ces.schema.json",
27+
"version": "1.0.0-rc.1",
2028
"createdAt": "2026-05-10T00:00:00.000Z",
21-
"reproducibleCommand": "bunx create-electrobun-stack@0.1.1 my-app --template minimal ...",
29+
"reproducibleCommand": "bunx create-electrobun-stack@1.0.0-rc.1 my-app --template minimal ...",
2230
"projectName": "my-app",
2331
"packageName": "my-app",
2432
"appIdentifier": "dev.electrobun.myapp",

docs/options.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22

33
This page explains what each option scaffolds and where to look after the project is generated.
44

5+
## V1 Support Boundary
6+
7+
All options documented on this page are V1-supported. Supported means the option is part of the public CLI contract, is represented in `ces.json`, and is covered by unit tests, render validation, or the release validation matrix.
8+
9+
Some categories are intentionally narrow for V1:
10+
11+
- `--frontend react` is fixed because React is the only renderer maintained by the template.
12+
- `--runtime bun` is fixed because Electrobun apps run through Bun.
13+
- `--database sqlite` and `--orm drizzle` are the only persistence stack with generated files because they map cleanly to Bun SQLite and local desktop storage.
14+
- `--template standard` and `--template full` are accepted compatibility aliases for the same V1 template source as `minimal`; they are not advertised as distinct stacks until their generated output differs and has release-gate coverage.
15+
516
## Core App
617

718
### `--template minimal|standard|full`

docs/v1-plan.md

Lines changed: 243 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,243 @@
1+
# V1 Release Plan
2+
3+
This plan moves `create-electrobun-stack` from the current pre-1.0 package to a stable `1.0.0` release.
4+
5+
## Current Baseline
6+
7+
- Latest published npm version: `0.1.1`.
8+
- The package builds to `dist/index.mjs` with `tsdown`.
9+
- The CLI package includes `dist`, `docs`, and `templates`.
10+
- CI runs lint, typecheck, tests, build, and package dry-run.
11+
- Publishing is wired through the GitHub release workflow.
12+
- Local release gates now include `bun run validate`, `bun run validate:render`, and `bun run pack:smoke`.
13+
- The default stack is a Bun-powered Electrobun app with React, Vite, Tailwind CSS, TanStack Router, typed RPC, Biome, Bun tests, app menu, local navigation rules, and a `ces.json` manifest.
14+
15+
## V1 Definition
16+
17+
V1 means the CLI can be recommended for new projects without caveats around package install, generated app correctness, or manifest compatibility.
18+
19+
The release is ready when:
20+
21+
- The published CLI works through `npm create`, `npx`, and `bunx --bun`.
22+
- Existing option categories feel complete enough for V1 without adding new categories just to increase surface area.
23+
- Every documented stack option is covered by tests or a deliberate manual verification checklist.
24+
- Generated projects can install dependencies, run development commands, typecheck, lint, test, and build for the supported option matrix.
25+
- `ces.json` has a stable compatibility story for future `add` operations.
26+
- The docs match the shipped behavior and explain the supported boundaries clearly.
27+
- The release process can produce `1.0.0` from a GitHub release without manual package surgery.
28+
29+
## Phase 1: Stabilize The Public Contract
30+
31+
Goal: decide what V1 promises and avoid accidental breaking changes after release.
32+
33+
- Freeze the V1 CLI command shape:
34+
- `create-electrobun-stack <project>`
35+
- `create-electrobun-stack add`
36+
- `--dry-run`, `--yes`, `--cwd`, `--install`, `--git`, and stack flags.
37+
- Mark the V1-supported stack options in `docs/options.md`.
38+
- Decide whether `minimal`, `standard`, and `full` should remain aliases for V1 or whether only `minimal` should be advertised.
39+
- Document the compatibility rules for `ces.json`:
40+
- V1 manifests are additive.
41+
- Existing generated apps should keep working with future `add` features.
42+
- Breaking manifest migrations require a documented migration path.
43+
- Add a short compatibility policy to `docs/manifest.md`.
44+
45+
Exit criteria:
46+
47+
- Docs clearly say what is supported in V1.
48+
- Any accepted-but-equivalent template profiles are documented as aliases or hidden from the primary examples.
49+
- No user-facing flag is left ambiguous.
50+
51+
## Phase 2: Expand Existing Option Categories
52+
53+
Goal: make the stack chooser feel complete before V1 without adding new categories or padding the CLI with weak options.
54+
55+
Use these rules for the V1 option depth pass:
56+
57+
- Add options only inside existing categories.
58+
- Prefer options with clear generated-file differences over cosmetic aliases.
59+
- Do not add a choice unless it can install, typecheck, lint, test when applicable, and build.
60+
- Keep every new option additive through `create-electrobun-stack add` when that makes sense.
61+
- If a category remains single-choice, document why it is intentionally fixed for V1.
62+
63+
Candidate options to evaluate:
64+
65+
| Category | Current options | V1 candidates |
66+
| --- | --- | --- |
67+
| Template | `minimal`, `standard`, `full` aliases | Make `standard` and `full` distinct profiles, or remove them from primary docs until they differ. |
68+
| Frontend | `react` | Add `preact` or `vue` only if generated Electrobun/Vite projects stay low-maintenance. |
69+
| Router | `tanstack-router`, `react-router`, `none` | Add a lightweight router option only if it meaningfully differs from `none` and React Router. |
70+
| Query | `tanstack-query`, `none` | Consider `swr` for a smaller client-side data option. |
71+
| Styling | `tailwindcss`, `css` | Consider CSS Modules or UnoCSS if the generated app remains simple. |
72+
| UI | `shadcn`, `none` | Consider a lightweight accessible component starter, but avoid a large design-system commitment before V1. |
73+
| Auth | `app-lock`, `none` | Add a stronger local PIN/password lock flow if it fits desktop-only auth. |
74+
| Database | `sqlite`, `none` | Consider an embedded JSON/file-store option if it is meaningfully different from settings storage. |
75+
| ORM | `drizzle`, `none` | Consider keeping this as-is unless a second ORM has clear Electrobun value. |
76+
| DB setup | `seed`, `none` | Add migrations/bootstrap options if they work with SQLite and Drizzle. |
77+
| Settings | `json`, `database`, `none` | Consider encrypted local settings or typed preferences examples. |
78+
| Package manager | `bun`, `npm`, `pnpm`, `yarn` | Already full enough for V1. |
79+
| Testing | `bun`, `none` | Add Playwright only if the generated app can run it reliably in CI. |
80+
| Addons | `turborepo`, `none` | Add editor config, GitHub Actions, or Docker only if each produces concrete generated files. |
81+
| Examples | `rpc`, `none` | Add settings, database, file-dialog, or routing examples tied to selected options. |
82+
| API | `electrobun-rpc`, `none` | Consider a static preload/helper option only if it fits Electrobun's model. |
83+
| App menu | `edit`, `none` | Add app/about or file menu presets. |
84+
| Build env | `dev`, `canary`, `stable` | Already full enough for V1. |
85+
| Build targets | `current`, `all` | Consider explicit platform sets only if Electrobun packaging supports them cleanly. |
86+
| Navigation | `local-only`, `none` | Add external-link-open-in-browser behavior if it is safe by default. |
87+
| Native utils | `file-dialogs`, `none` | Add clipboard, shell-open, notifications, or path helpers as separate choices if Electrobun supports them cleanly. |
88+
| Window style | `native`, `hidden-inset` | Add frameless or custom titlebar only if keyboard/window controls remain correct on supported OSes. |
89+
| Runtime | `bun` | Keep fixed for V1 unless Electrobun supports another runtime; document it as an intentional constraint. |
90+
91+
Recommended V1 minimum:
92+
93+
- Make `standard` and `full` distinct or stop advertising them as real choices.
94+
- Add at least one substantial option to two sparse categories, with `native-utils`, `examples`, `app-menu`, `settings`, and `testing` as the best first candidates.
95+
- Document categories that should stay narrow for V1, especially `runtime`, `frontend`, `database`, and `orm` if they remain single-choice.
96+
97+
Exit criteria:
98+
99+
- Every existing category has either multiple useful choices or a documented reason it stays narrow for V1.
100+
- New option work is represented in `src/options.ts`, templates, manifest/schema docs, CLI docs, generated-project docs, and tests.
101+
- The full validation matrix includes every new option at least once.
102+
103+
## Phase 3: Prove Generated Projects Work
104+
105+
Goal: test real generated projects, not just renderer template output.
106+
107+
- Add integration tests that scaffold representative projects into temp directories.
108+
- For each representative project, run:
109+
- dependency installation with the selected package manager when practical,
110+
- `bun run typecheck`,
111+
- `bun run lint`,
112+
- `bun test` when test scaffolding is enabled,
113+
- `bun run build`.
114+
- Cover the default stack as the highest-priority path.
115+
- Cover at least these option combinations:
116+
- default stack,
117+
- `--router react-router --query tanstack-query`,
118+
- `--router none --styling css --examples none`,
119+
- `--database sqlite --orm drizzle --settings database`,
120+
- `--native-utils file-dialogs --window-style hidden-inset`,
121+
- `--addons turborepo`,
122+
- `--ui shadcn`.
123+
- Keep fast unit tests for parser, manifest, and template behavior.
124+
- Add slower generated-project validation behind a separate script, for example `bun run validate`.
125+
126+
Exit criteria:
127+
128+
- CI runs the fast suite on every PR.
129+
- A full generated-project validation command exists and passes before release.
130+
- Failures identify the selected stack combination, generated path, and command that failed.
131+
132+
## Phase 4: Harden Package Publishing
133+
134+
Goal: make npm release boring.
135+
136+
- Confirm `npm pack --dry-run` includes only intended files.
137+
- Add package smoke tests against the packed tarball:
138+
- install the tarball into a temp project,
139+
- run `create-electrobun-stack --version`,
140+
- scaffold with `--dry-run`,
141+
- scaffold a real app without dependency install.
142+
- Decide whether V1 publishes only from GitHub releases or also supports manual `workflow_dispatch`.
143+
- Ensure `NPM_TOKEN` and provenance settings are configured in GitHub.
144+
- Add release notes guidance for `0.x -> 1.0.0`.
145+
- Add a `CHANGELOG.md` before the first release candidate.
146+
147+
Exit criteria:
148+
149+
- A local or CI script proves the packed package works before publish.
150+
- The publish workflow has been tested with a dry run.
151+
- Release notes have a repeatable format.
152+
153+
## Phase 5: Documentation Pass
154+
155+
Goal: make the first-run path clear and keep generated project docs accurate.
156+
157+
- Verify root README commands against the packed package.
158+
- Keep `docs/cli.md` aligned with `parseArgs`.
159+
- Keep `docs/options.md` aligned with `src/options.ts`.
160+
- Keep `docs/manifest.md` and `docs/ces.schema.json` aligned with generated manifests.
161+
- Make `docs/generated-project.md` describe the actual default app lifecycle.
162+
- Update `docs/llm.txt` after any option or behavior change.
163+
- Add troubleshooting notes for:
164+
- Bun version mismatch,
165+
- Node engine mismatch,
166+
- Electrobun platform support,
167+
- package manager install failures,
168+
- unsupported option combinations.
169+
170+
Exit criteria:
171+
172+
- A new user can follow the README from install to generated app without needing source context.
173+
- Every public option has one canonical doc location.
174+
- Generated docs do not mention planned-but-unshipped features as current behavior.
175+
176+
## Phase 6: Release Candidate
177+
178+
Goal: publish a real prerelease and use it like a user.
179+
180+
- Bump to `1.0.0-rc.1`.
181+
- Publish under an npm prerelease tag, for example `next`.
182+
- Test the published prerelease with:
183+
- `npm create electrobun-stack@next my-app`,
184+
- `npx create-electrobun-stack@next my-app`,
185+
- `bunx --bun create-electrobun-stack@next my-app`.
186+
- Generate projects on at least macOS, Linux, and Windows if contributors have access.
187+
- Track any RC findings as GitHub issues.
188+
- Avoid new V1 scope unless it fixes correctness, docs, or release confidence.
189+
190+
Exit criteria:
191+
192+
- At least one RC has been published and tested from npm.
193+
- All release-blocking RC issues are closed.
194+
- The final V1 diff is limited to version, changelog, docs, or release fixes.
195+
196+
## Phase 7: V1 Release
197+
198+
Goal: ship `1.0.0` with a clear support boundary.
199+
200+
- Bump package version to `1.0.0`.
201+
- Update manifest examples and schema URLs that include the package version.
202+
- Update `CHANGELOG.md` with the V1 summary and migration notes.
203+
- Run the full release gate:
204+
- `bun install --frozen-lockfile`,
205+
- `bun run lint`,
206+
- `bun run typecheck`,
207+
- `bun test`,
208+
- `bun run build`,
209+
- `bun run pack:check`,
210+
- generated-project validation,
211+
- packed-package smoke test.
212+
- Create a GitHub release for `v1.0.0`.
213+
- Confirm npm shows `1.0.0` as latest.
214+
- Create a post-release issue list for `1.1.0` improvements.
215+
216+
Exit criteria:
217+
218+
- GitHub release exists for `v1.0.0`.
219+
- npm `latest` resolves to `1.0.0`.
220+
- README badges and install commands point at the stable package.
221+
- Main branch is clean after the release commit and tag.
222+
223+
## Release Blockers
224+
225+
These should block V1:
226+
227+
- Published CLI cannot run through npm, npx, or bunx.
228+
- Existing option categories still feel like placeholders without an explicit V1 decision.
229+
- Default generated app cannot install and run its documented commands.
230+
- `add` corrupts or loses existing `ces.json` state.
231+
- Documented stack options generate missing imports, missing dependencies, invalid config, or invalid manifests.
232+
- Package tarball omits required templates, docs, or built entry files.
233+
- CI or release workflow requires undocumented manual edits.
234+
235+
## Post-V1 Backlog
236+
237+
These are valuable but should not block V1 unless already nearly complete:
238+
239+
- Additional frontend runtimes.
240+
- Additional databases beyond SQLite.
241+
- More native Electrobun utilities.
242+
- End-to-end desktop launch tests.
243+
- Hosted documentation site.

0 commit comments

Comments
 (0)