spinframework / spinframework/spin
Templates and getting started experience
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 6.5k
- Forks
- 310
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 24
Description
I've been thinking a lot lately about using our templates to guide the user a bit more through the experience of 1) bootstrapping their application and 2) using Spin features.
More specifically, for 1):
-
when I create an application based on a known, maintained template, I set the name, description, and path for my initial component, but then I have to look up what commands I need to build and run. We try to make that experience consistent across templates, so
spin buildandspin upshould be enough, but a) that assumes the user knows those commands, and b) there are templates that require a one-off command be executed before you can evenspin build(looking at you,npm install...). -
so to address this, I'm thinking we could extend the interactive
spin newprocess with per-template prompts that could execute commands (if enabled) — like install dependencies, build, then immediately run the application for the first time.
For 2):
- once I have a starter app and I validated it runs (ideally helped by 1), immediately I need to open the docs to learn what I can do in my app. More than once I've wished for commented blocks in either
spin.tomlor the actual source code that gets generated for me.
The gist of this issue is: we have an idea what people tend to want to do once they generate an application -- first build and run it; then, they ask how to use certain features.
Can we streamline this experience more through our templates?
Happy to kickstart a SIP if this is a direction people would be interested in.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the interactive spin new flow and the maintained templates, then trace how spin build and spin up are currently used. Compare the generated spin.toml and source files with the proposed first-run and feature-guidance experience. Done should include an agreed scope and validation plan for streamlining both workflows.
Written by the indexing model from the issue text.
Assessment
- Domain
- cli, developer-experience
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100