Skip to content

Commit bf0dfa1

Browse files
authored
Merge pull request #233 from manoahLinks/feat/marketplace-quality-signals
Template marketplace: quality signals, new examples, better search, safe installs
2 parents 41d9bc9 + 9c7de77 commit bf0dfa1

23 files changed

Lines changed: 1755 additions & 285 deletions

File tree

Cargo.lock

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

Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,11 @@ stellar-xdr = { version = "22.0.0", features = ["serde"] }
3333
base64 = "0.21"
3434
urlencoding = "2.1"
3535
sha2 = "0.10"
36-
soroban-sdk = { version = "20.5.0" }
3736
indicatif = "0.17.7"
3837
libloading = "0.8.1"
3938
uuid = { version = "1.6.1", features = ["v4"] }
4039
hidapi = { version = "2.6.5", optional = true }
4140
zxcvbn = "=3.1.0"
42-
sha2 = "0.10"
4341
hex = "0.4"
4442
tracing = "0.1"
4543
tracing-subscriber = { version = "0.3", features = ["env-filter", "json", "fmt"] }

TEMPLATE_MARKETPLACE.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,36 @@ starforge template list
2323
starforge template show uniswap-v2
2424
```
2525

26+
#### Relevance ranking, filters and explanations
27+
28+
Search ranks results by **text relevance** first (name matches outweigh tag
29+
matches, which outweigh description matches), then by quality score, then by
30+
downloads. Each result explains *why* it matched so the list is easy to scan.
31+
32+
```bash
33+
# Rank by relevance to the query
34+
starforge template search token
35+
36+
# Require specific tags (a template must have all of them)
37+
starforge template search "" --tags defi,dex
38+
39+
# Only verified templates
40+
starforge template search wallet --verified
41+
42+
# Only high-quality templates (score 0-100)
43+
starforge template search defi --min-quality 70
44+
45+
# List everything ranked by quality (empty query)
46+
starforge template search
47+
```
48+
49+
Each result shows the matched fields and a relevance value, e.g.:
50+
51+
```
52+
1. uniswap-v2@1.0.0 [quality 92/100] ✓ Verified 📖 Documented ★ Popular (1240 downloads)
53+
Matched: name, tag: defi (relevance 70)
54+
```
55+
2656
### 2. Template Usage
2757
Scaffold new projects using marketplace templates:
2858

@@ -356,6 +386,80 @@ latest version.
356386
4. `template_source_content` reads `src/lib.rs` from the cached directory and
357387
returns it to the scaffolding step.
358388

389+
## Quality Signals & Trust Indicators
390+
391+
To help users identify dependable templates in a growing community catalog,
392+
each template carries lightweight quality metadata that is surfaced across the
393+
`list`, `search` and `show` commands.
394+
395+
### Metadata fields
396+
397+
| Field | Meaning |
398+
|---------------|----------------------------------------------------------------|
399+
| `verified` | Template has been vetted by maintainers |
400+
| `documented` | Template ships user-facing documentation (e.g. a README) |
401+
| `maintenance` | Maintenance state: `active`, `maintained`, `deprecated`, `unknown` |
402+
| `downloads` | Usage metadata used as a proxy for community confidence |
403+
404+
Example registry entry:
405+
406+
```json
407+
{
408+
"name": "uniswap-v2",
409+
"version": "1.0.0",
410+
"verified": true,
411+
"documented": true,
412+
"maintenance": "active",
413+
"downloads": 1240
414+
}
415+
```
416+
417+
### Quality score
418+
419+
Each template is assigned a `0-100` quality score blending the signals above:
420+
421+
- Verified: `+40`
422+
- Documented: `+20`
423+
- Usage: up to `+30` (scaled by downloads, capped)
424+
- Maintenance: `active +10`, `maintained +5`, `deprecated -25`
425+
426+
The score drives ranking in `starforge template search` (highest quality
427+
first, with raw downloads breaking ties) and is shown alongside trust badges
428+
such as `✓ Verified`, `📖 Documented`, `🟢 Actively maintained` and
429+
`★ Popular`. This makes trusted, well-documented and well-maintained templates
430+
easier to discover.
431+
432+
## Installation Progress & Recovery
433+
434+
Installing a marketplace template runs through three visible steps, each shown
435+
with a spinner that resolves to a check mark:
436+
437+
```
438+
✓ Fetched template 'uniswap-v2'
439+
✓ Template structure is valid
440+
✓ Installed into 'my-dex'
441+
```
442+
443+
### Safe rollback
444+
445+
Installation is **atomic from the user's point of view**: if any step fails the
446+
partially-written files are removed automatically, so you never end up with a
447+
half-installed project directory.
448+
449+
- The download is staged in a temporary directory that is always cleaned up.
450+
- The target project directory is only kept once every step succeeds; on
451+
failure it is rolled back.
452+
453+
### Actionable errors
454+
455+
When a step fails, the error explains what went wrong and how to recover, e.g.:
456+
457+
```
458+
Failed to fetch template 'uniswap-v2' from git:https://github.com/...
459+
• Check your network connection and that `git` is installed.
460+
• The partial download was rolled back automatically.
461+
```
462+
359463
## Support
360464

361465
For issues or questions:

src/commands/deploy.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
use crate::utils::{config, horizon, optimizer, print as p, info, soroban};
21
use crate::commands::info;
32
use crate::utils::{config, horizon, optimizer, print as p, soroban};
43
use anyhow::Result;

src/commands/network.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ pub fn handle(cmd: NetworkCommands) -> Result<()> {
3737
match cmd {
3838
NetworkCommands::Show => show(),
3939
NetworkCommands::Switch { network } => switch(network),
40-
NetworkCommands::Add { name, horizon_url, soroban_rpc_url, friendbot_url } =>
41-
add_network(name, horizon_url, soroban_rpc_url, friendbot_url),
4240
NetworkCommands::Add {
4341
name,
4442
horizon_url,

0 commit comments

Comments
 (0)