Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: It would be nice if there's a CLI to generate this layout #53

Open
cyantarek opened this issue Jan 6, 2020 · 9 comments
Open

Comments

@cyantarek
Copy link

No description provided.

@koddr
Copy link

koddr commented Jan 6, 2020

@cyantarek hi 🤝

I worked around this idea a few weeks (start at Nov 2019), because I need exact "lazy" solution for every new project at my current work 😉

Please note: It's non-profit "pet" project from me to myself.

So, my solution is more like create from scratch base full stack app. It means, you can create from one CLI command:

  1. REST API (or/and gRPC) with popular Go packages (included rules of project-layout);
  2. SPA with Preact/React/Vue/Svelte/etc;
  3. Embed all static files to binary ("one-file-solution");
  4. Configured (and production-ready) Docker container with this full stack app;

Yes, something like create-react-app, but for full stack apps.

At this moment, I have repository: https://github.com/create-go-app

Warning: current project status is WIP (work in progress).

Already done:

  • MVP for CLI;
  • net/http backend template;
  • Preact.js frontend template;
  • Configured Dockerfiles for templates;

Attention: docker-compose.yml is not complete, don't containerize it for production.

Huge list of features are already at my backlog (ASAP list).

If you want to help, give advice or/and review code — you're welcome! 👍

@cyantarek
Copy link
Author

@koddr hi, very cool project. I will try my best to contribute onto your project.

@dominikbraun
Copy link

It would be nice if there's a CLI to generate this layout

Note that the patterns and project layout from this repository are discouraged and deprecated. I would not recommend building a new project on top of this.

@cyantarek
Copy link
Author

@dominikbraun, deprecated? I wonder, Why? Then what project layout we will follow?

@dominikbraun
Copy link

Many things in this repository that are considered as "standard" are actually discouraged, especially the pkg-structure. See this: #10

Then what project layout we will follow?

It entirely depends on your project. For different projects there are different layout that match best. However, there are some basic principles you need to keep in mind: https://rakyll.org/style-packages/

You can build you own structure on top of that principles. Some concrete possible structures are shown here: https://medium.com/@benbjohnson/standard-package-layout-7cdbc8391fc1#.ds38va3pp

@kcq
Copy link
Member

kcq commented Mar 11, 2020

@dominikbraun thank you for actively participating in the discussion! It's great to have a wide community discussion with a diverse set of opinions. It's ok to have your own preferences, which might be different from the patterns captured in this repo, but you also need to be able to let others have their own too. Let the community members decide what works for them and what they like and what they want to use :-)

@kcq
Copy link
Member

kcq commented Mar 11, 2020

@cyantarek / @koddr This is a great idea! Thanks for kicking off the discussion around it! It's also good to leverage similar capabilities in other dev stacks to learn from them and to make it even better (e.g., Yeoman in the node.js ecosystem).

@0uep
Copy link

0uep commented Feb 18, 2021

Se also golang-standards/project-template#2 to add shell script to make standard layout.

@insidieux
Copy link

Hi there!
I'have written a simple project to generate go projects based on this layout. Of course, it does not implements all directories. But it supports overriding plus plugins, so you can add/modify everything you want.

I'have created an issue to add to description
#111

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants