Ideas and Validation October 14, 2020

👋 Web devs: Would you use this?

Brayden 👋 @BraydenTW

I've been wanting to make my own open-source tool for a while now and recently came across an idea I think it pretty cool.

However I'm not sure if developers would find this useful and am not sure if something like this is already out there.

The Problem

Web developers always have to setup a directory structure that fits standard practices and it can take a few minutes to create completely. This includes the SASS/CSS folder, assets folder, and other imports.

The Solution ... I hope 😅

What if there was a simple CLI tool that with one short command, you could create the whole folder structure with boilerplate content inside each file.

Now I know this would definitely save time. Instead of several minutes of setting the directory up, you can make it in just seconds.

However, what I would like to know is the following:

  • Would web developers bother using this? (If so, then why?)
  • Is there already something like this out there?
  • Would this be a great project to open source?

Thanks again!

    1. 1

      Great source! Thanks for showing me this. I would’ve wasted a lot more unnecessary time 😅

  1. 3

    Here you have the ultimate boilerplate cli of boilerplates: https://www.npmjs.com/package/boilerplate-cli

    1. 1

      Thanks for the great resource! I’ll be sure to give it a look :)

  2. 2

    I’m not sure if this only applies for HTMLs and CSS. When building a project, you always wanted to use a framework and most of the time they have a built in cli.

    Even for static site generators they covered the devs already.

    1. 1

      Very true. I'm getting the same vibe from many others devs here. Thanks for setting me on the right path 👍

  3. 2

    In the past I also used Yeoman for this (pre-built or my own custom recipes). It helped solve a problem of onboarding junior devs that didn't know how to structure code in a supportable/scalable manner in AngularJs or React at the time.

    My own use case (different but related) now that most frameworks either include scaffolding and CLIs (Angular) or have community tools to do it (Next, Nuxt, Sapper) I haven't used anything else in 5 or 7+ years. The next level of the problem I moved on to is code and dependency management across client apps, libraries, and services in monorepos. Using a monorepo or a "workspace" tool helps me a ton. The Angular CLI has this built in, but I use Nrwl's Nx CLI since it supports multiple front-end frameworks and Nodejs backends (also it predates the Angular one which copied it I think). Nx tracks updates to dependencies in separate libraries (UI component, DAOs, etc) and runs only the impacted tests and builds. As a small team, I love not having to waste our time on setting this up.

    1. 1

      Good for you :D

      Thanks for the good resources and your thoughts.

  4. 2

    I wouldn't. I use Phoenix framework and it generates all of that when make a new app. Rails, Laravel and most other web frameworks do, too.

    1. 2

      Thanks. It’s good to know what developers think. I know what to set my mind on now.

      Thanks again!

  5. 2

    Have a look at Yeoman: https://yeoman.io/ a scaffolding tool for the web

    1. 1

      Thanks, I’ll take a look.

  6. 2

    I like where you're heading with this! I'm a node.js dev, and if I were to use something like this, it would probably be in the form of a yeoman template. Say I'm starting a new Express app, I could probably see myself going through some kind of "setup" wizard, asking me what things I want set up.

    But then again, I already have my own boilerplate for the way I like to do things, so in all honesty I personally probably wouldn't use something like this.

    Perhaps it would be more beneficial for beginners though?

    1. 1

      Agreed. I understand how customization and ease-of-use is important to many developers. I might be focusing this for beginner developers or think of a whole new idea.

      Thanks again!

  7. 2

    For some prior art, see https://github.com/jondot/hygen.

    I probably wouldn’t use something like this that isn’t framework specific (eg a rails or laravel CLI). It needs to be something that adds a lot of value by saving me (or my team) time—if I spend more time configuring/maintaining the tool than using using it, then it’s adding negative value. And I just don’t find that many repetitive tasks where code generators are used over and over outside of the framework-specific case.

    1. 1

      Totally understand. Thanks for your input Spencer!

  8. 1

    As others mentioned, it would be quite hard to offer a meta project covering all frameworks and compete with their existing CLI options.

    Think about it differently. What do you personally use? Can the existing solution cover your use-case? No? What's missing?

    Perhaps you can just upstream the missing pieces.

    1. 1

      Good idea. Thanks for being supportive :D

  9. 1

    I personally dislike template/boilerplate generators, because they add a lot of bloat/unnecessary shit and the dependencies aren't updated as often as I'd like them to. There's also the potential for the repo to be abandoned.

    1. 1

      Sooo true. Thanks @Symasia for telling me this. I was honestly unsure what people would think of this idea and you really nailed it ;)

      Thanks again for your help!

  10. 1

    Well, not really.

    If I have to do serious frontend work I just use a framework and most of them come with their own scaffolding tool or at least have a pretty good intellisense for vs code.

    But it's really rare for me to actually write raw html, css, and javascript so I might not be your target audience.

    1. 1

      No worries. I am getting that same type of opinion from many devs here and that has helped me open up on what I should keep in mind.

      Thanks!

  11. 1

    I'm not certain you have a market for this. Maybe something very niche.

    You mention web devs; pretty much every framework today comes with their own CLI tool that not only sets up initial structure, it usually serves to generate stubs for new features as well.

    There are times when I do want a boilerplate generator, but quite specific. Ie I want Angular or Vue with Material and the initial route already set and the OpenID Connect already built in. Or alternatively, a tailwindcss-based website with home, blog and about pages already configured.

    That sounds very involved creating a tool for, considering I don't start a new project that often, and by the time I need it again, I might have forgotten what boilerplate I used so I will just search again.

    1. 1

      Ok, that makes sense. Thanks for your input. I know what not to work on now ;D

  12. 1

    I definitely wouldn't use this. I have my own boilerplates for every kind of project I regularly create. If I'm starting something with a slightly different stack than I'm used to, I also wouldn't use it. Instead, I'd do research about best practices and build my folder structure manually so I could understand each part of the setup and how everything fits together.

    1. 2

      Good to know! Thanks for sharing your opinion!

  13. 1

    I don't think I would use this - almost all of my projects in React already come with a boilerplate directory set up (via create-react-app or whatever else, Next.js etc.) so I wouldn't seek a third-party version of it.

    1. 1

      Thanks for your opinion. I’m finding this to be a common trend with the others in the comments and that has been helpful for me to know.

      Thanks again! :D

  14. 1

    Directory structure for what exactly? Most frameworks come with boilerplate CLI utilities (eg. create-react-app).

    1. 1

      Yes, my point exactly. This is creating a simple folder structure for a plain HTML, CSS, JS, Sass project. Directed towards beginner/lazy developers.

  15. 1

    I definitely would not. I'd not let somebody else pick my folder structure for my projects except if it's framework convention.

    1. 2

      Totally understand. Thanks for your input and I think this will help put me on a better track 👍

  16. 1

    Probably not. Because in the time that it would take to install the CLI tool, I would've already figured out my directory structure. And it's not something that would save me a ton of time. Because it's not like I'm always creating projects.

    Plus, I don't need boilerplate code. And i don't even know what you'd include as boiler plate?

    1. 1

      Great insights. Thanks for helping!

  17. 1

    Software framewoks do that and more.. you usually get a new keyword with a tool like
    rails new x
    there are many of them... for each tech it's own.
    Would this be exactly what you mean? just your thinking of a very generic front end one 'without' a framwork?..

    Otherwise there are just git template that are like 'clone this' and than you work off of it

    What's your sepcific case that you can't find one for?

    1. 2

      I understand what you mean. This is for vanilla projects with no framework. (Maybe the weak point?)

      I was saying that I couldn’t find a CLI. Not a Git template. Would that be faster?

      1. 1

        A framework is a concept
        Once you decide there is a standard directory structure, it is a framework
        As your creating a standard by which a project should be built and stractured
        Call it the frameworkless framework, but it still is
        It is a collection of standards that you think everyone who builds X should do/would benefit from

        1. 1

          Ok, this makes sense now. This is why I wanted to ask the community about this. Now I know what not to focus on :P

          Thanks for helping! 😄

  18. 1

    Nope, I wouldn't.
    Why?
    Because I already created an open-source boilerplate (for SaaS, but it can be used for almost any type of project) with all the infrastructure settled:
    https://github.com/saasforge/open-source-saas-boilerpate

    And I feel anyone coding a lot already some kind of boilerplates :)

    1. 1

      True, however your tool is for a different use. Mine is plainly for HTML/CSS/JS projects. Websites for web developers. Sass, not SaaS.

      Does this make sense?

      1. 1

        Can you imagine, my boilerplate use SaSS (Less) too :)))) and it's very convenient to have the whole structure, not only sass files but everything else.

        The only difference between your project is mine is that mine is for apps (no matter which ones actually), yours is for plain static websites but I don't think it's the matter. The idea is the same.

        1. 1

          Thanks for the clarification. You and a few other devs on this post have helped me a lot with focusing my mind on something more worth-while.

          Thanks again and good luck on your project!

          1. 1

            Yeah, no problem. But I don't think your idea is dead. The point is there are soooo many lazy people, including developers, that maybe it would worth it. You need to ask them (lazy people).

            1. 1

              Thanks. I’m assuming your not one of them ;)

              1. 1

                Well, it depends. As for web apps, yes, I'm not lazy and I prefer to control everything because I know, how (upd: I meant web apps written in languages I know).

                But if someday I start a... say... PHP project (no way, actually :) I would probably use some kind of boilerplate, just to speed up my launch!

                1. 1

                  Thanks for your feedback. Super helpful for setting me in the right direction :D

Recommended Posts