Saleor structure custom with just the API Graphql and the Admin. Without the front end.
Friends I would like you to read this idea:
Saleor should have a CLI to allow choosing options, such as Firebase CLI or Ruby on Rails.
This idea came to me because it would be a good idea if Saleor had an option with just the structure for the Graphql API, the Administrative Panel and Graphiql, Playground (or whatever it is used to debug the API) and without the front-end created of the ecomerce written in Django Template.
So this would be great if a CLI asked you something like this:
What structure do you need?
Hey, thanks for opening this issue! Actually, we were thinking about building a CLI for Saleor and one of its main features would be bootstrapping a new project.
One reason for that is that we already have a separate repository for Storefront 2.0 and once we close the features gap between Dashboard 1.0 and 2.0, we're going to move the latter to a separate repo as well. Then, a CLI would make it a lot easier to quickly setup everything without manually cloning each repo. So this is planned but I don't think we'll able to build it sooner than in Q2.
I think we could keep the issue open for discussion about Saleor CLI.
An easy fix would be adding env variable, for turning on&off the static django frontend
I think the option of a CLI is quite interesting. Because this could open an infinite number of new possibilities.
Like the installation of themes, plugins, and different initial folder structures of the project.
@CharlyJazz Did you find any good solution to using a custom frontend with the Saleor API?
@maarcingebala Is the Saleor CLI still in the works, or have you move on to another approach to achieve a _headless_ Saleor GraphQL API, using a fully custom frontend?
@OArnarsson If you don't want to use the default storefront, you could simply drop all templates files, views and any code related to that. Our new storefront is a totally separate project that entirely depends on the GraphQL API.
About the CLI, we haven't started working on that yet. I guess that when we reach feature parity in Dashboard 2.0 we will want to move it to separate repo as well. Then we would need some tool to make it easy to setup Saleor and maybe that will be the moment we'll start thinking seriously about the CLI.
Speaking of CLI, if you mean of being able to pass settings as program arguments as well, I would guess we could do something like Viper (a go configuration framework) does:
dict or a module's attributes, e.g., django's settings.py; it would be very easy to pass such objects containing key-value pairs with Python);settings.py's DATABASE_URL=... => --database-url=...;DATABASE_URL=...;-c PATH or --config PATH;~/.saleor.yaml or ./common.env.I'm guessing such thing probably does exist in Python (PyPI) as well.
Most helpful comment
Hey, thanks for opening this issue! Actually, we were thinking about building a CLI for Saleor and one of its main features would be bootstrapping a new project.
One reason for that is that we already have a separate repository for Storefront 2.0 and once we close the features gap between Dashboard 1.0 and 2.0, we're going to move the latter to a separate repo as well. Then, a CLI would make it a lot easier to quickly setup everything without manually cloning each repo. So this is planned but I don't think we'll able to build it sooner than in Q2.
I think we could keep the issue open for discussion about Saleor CLI.