Skip to content

Commit e5403ae

Browse files
committed
Replace dynamic template scaffolding with bundled template catalogs
1 parent 0bf8365 commit e5403ae

427 files changed

Lines changed: 7489 additions & 1744 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/release.yml

Lines changed: 127 additions & 74 deletions
Large diffs are not rendered by default.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ node_modules
33
.svelte-kit
44
.env
55
.agents/
6+
crates/forge/generated/
67
**/test-results/**

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
### Added
1313

14-
- Dioxus frontend support with scaffolding, codegen, and runtime client (`forge new --target dioxus`)
14+
- Dioxus frontend support with template-driven project creation, codegen, and runtime client (`forge new --template with-dioxus/demo`)
1515
- `forge test` command wrapping Playwright with prerequisite checks, `--ui` and `--headed` flags
1616
- `forge prepare` command for sqlx compile-time query checking with offline cache support
1717
- Published `@forge-rs/svelte` npm package and `forge-dioxus` crate as standalone runtime packages

Cargo.lock

Lines changed: 152 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@ members = [
66
"crates/forge-macros",
77
"crates/forge-runtime",
88
"crates/forge-codegen",
9-
"examples/todo",
10-
"examples/todo-dioxus",
11-
"examples/kanban-board",
12-
"examples/support-desk",
9+
"examples/with-svelte/minimal",
10+
"examples/with-svelte/demo",
11+
"examples/with-svelte/realtime-todo-list",
12+
"examples/with-dioxus/minimal",
13+
"examples/with-dioxus/demo",
14+
"examples/with-dioxus/realtime-todo-list",
15+
"examples/with-svelte/kanban-board",
16+
"examples/with-svelte/support-desk-with-mcp",
1317
]
1418
exclude = [
1519
"packages/forge-dioxus",
@@ -109,3 +113,10 @@ indexing_slicing = "deny"
109113
lto = true
110114
codegen-units = 1
111115
strip = true
116+
117+
[patch.crates-io]
118+
forgex = { path = "crates/forge" }
119+
forge-core = { path = "crates/forge-core" }
120+
forge-macros = { path = "crates/forge-macros" }
121+
forge-runtime = { path = "crates/forge-runtime" }
122+
forge-codegen = { path = "crates/forge-codegen" }

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ FORGE compiles your entire backend into **one binary**: API, jobs, crons, workfl
1010

1111
```bash
1212
curl -fsSL https://tryforge.dev/install.sh | sh
13-
forge new my-app --demo && cd my-app
13+
forge new my-app --template with-svelte/minimal && cd my-app
1414
forge dev
1515
```
1616

@@ -163,10 +163,10 @@ Current first-class targets:
163163
- `sveltekit` -> generated TypeScript bindings in `frontend/src/lib/forge` backed by `@forge-rs/svelte`
164164
- `dioxus` -> generated Rust bindings in `frontend/src/forge` backed by `forge-dioxus`
165165

166-
SvelteKit remains the default target for `forge new`, but Dioxus is supported end to end:
166+
Forge ships template ids for both SvelteKit and Dioxus examples:
167167

168168
```bash
169-
forge new my-app --demo --target dioxus
169+
forge new my-app --template with-dioxus/demo
170170
forge generate --target dioxus
171171
```
172172

@@ -317,7 +317,7 @@ forge → Public API, Forge::builder(), prelude, CLI
317317

318318
## CLI
319319

320-
`forge dev` starts PostgreSQL, a cargo-watch backend, and the selected frontend target. `--demo` scaffolds a working app with queries, mutations, jobs, crons, and workflows. `--minimal` gives you a clean slate. `forge new` defaults to SvelteKit, and `--target dioxus` switches the scaffold and binding generator to Dioxus.
320+
`forge dev` starts PostgreSQL, a cargo-watch backend, and the selected frontend target. `forge new` now requires a checked-in template id such as `with-svelte/minimal`, `with-svelte/demo`, or `with-dioxus/realtime-todo-list`. `forge generate --target dioxus` still forces Dioxus binding generation when detection is not enough.
321321

322322
```bash
323323
forge generate # generate frontend/runtime bindings from backend code

crates/forge/Cargo.toml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,17 @@ version.workspace = true
44
edition.workspace = true
55
license.workspace = true
66
repository.workspace = true
7-
readme = "../../README.md"
7+
readme = "README.md"
88
description = "CLI and runtime for the Forge full-stack framework"
99
keywords = ["framework", "postgresql", "full-stack", "cli"]
1010
categories = ["web-programming", "command-line-utilities"]
11+
include = [
12+
"Cargo.toml",
13+
"build.rs",
14+
"generated/examples.tar",
15+
"README.md",
16+
"src/**",
17+
]
1118

1219
[lints]
1320
workspace = true
@@ -48,6 +55,7 @@ reqwest = { version = "0.12", features = ["json"] }
4855
axum = { workspace = true }
4956
tower = { workspace = true }
5057
tower-http = { workspace = true }
58+
include_dir = "0.7"
5159

5260
[features]
5361
testcontainers = ["forge-core/testcontainers"]
@@ -57,3 +65,6 @@ nix = { version = "0.29", features = ["signal", "hostname"] }
5765

5866
[dev-dependencies]
5967
tempfile = "3"
68+
69+
[build-dependencies]
70+
tar = "0.4"

crates/forge/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../README.md

0 commit comments

Comments
 (0)