spin icon indicating copy to clipboard operation
spin copied to clipboard

Add support for a decentralized templating system with `spin new`

Open jaydrogers opened this issue 2 years ago • 0 comments

Discussed in https://github.com/serversideup/spin/discussions/57

Originally posted by jaydrogers January 8, 2024

👉 Describe the problem

  • All templates for Spin must be committed to the repository, meaning it's difficult to scale from a community perspective
  • People want to contribute templates, but they don't know how

👥 Problem evidence & reach

YouTube comment (https://www.youtube.com/watch?v=I_dq-kRDztI):

image

🥰 Describe the "impact" on users?

This would make the community be more self-sustained and improve compatibility for other people to start using Spin.

🏆 How to solve this problem

Build a template system based off of NPM

We can use the existing package delivery system of NPM to distribute Docker compose templates. Yeah, I know -- I can't believe I just said that.

Hear me out...

  • NPM is a package system that people already use and most are familiar with
  • Users can easily create their own templates if needed
  • Users can publish their own templates and share it with the world `spin new @myorg/my-awesome-template

Have support for "official templates"

We will continue to support official templates where users can run spin new laravel which would just shortcut to a Server Side Up package.

Guides & Documentation

  • [ ] Create a developer guide on how to build and test their own templates

jaydrogers avatar Apr 05 '24 12:04 jaydrogers