spinframework / spinframework/spin

Templates and getting started experience

Open
#2,874 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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 build and spin up should 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 even spin build (looking at you, npm install...).

  • so to address this, I'm thinking we could extend the interactive spin new process 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.toml or 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.