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

Create CLI npx create-mui-app #39588

Open
2 tasks
oliviertassinari opened this issue Oct 24, 2023 · 7 comments
Open
2 tasks

Create CLI npx create-mui-app #39588

oliviertassinari opened this issue Oct 24, 2023 · 7 comments
Labels
dx Related to developers' experience new feature New feature or request waiting for 👍 Waiting for upvotes

Comments

@oliviertassinari
Copy link
Member

oliviertassinari commented Oct 24, 2023

Summary 💡

Today, to create a new project, you have to go with one of those:

  1. start from our example folder in GitHub
  2. follow a step-by-step flow (well not just yet, but a WIP [material-ui][docs] Redo integration docs pages #40062)

There is a space to create a CLI specific to MUI (the whole suite of products) that

  • A. would allow developers to quickly pick the stack they want:

    • TypeScript vs. JavaScript
    • Next.js vs. Vite
    • which abstraction level do you want, Base UI (you own the styles) vs. Material UI (you don't own the styles).
    • which theme do you want, Material Design or Joy Design
    • do you want Tailwind CSS, or raw CSS or MUI System
    • do you want Toolpad?
  • B. would allow to easily import a template/block to an existing project.

Examples 🌈

  • Next.js npx create-next-app@latest
Screenshot 2023-10-24 at 12 51 11
  • Vite npm create vite@latest
Screenshot 2023-10-24 at 12 50 48

Motivation 🔦

Achieving this with examples would lead to an explosion of possible combinations, it would be a LOT more examples to maintain.

Related

#39587, #41173

@oliviertassinari oliviertassinari added new feature New feature or request waiting for 👍 Waiting for upvotes labels Oct 24, 2023
@DerTimonius
Copy link
Contributor

create-t3-app could also be an inspiration: instead of providing all possible combinations, they only write the necessary files.

If this is "greenlit" and if you don't mind that a non-member would work on this, I would most certainly want to try this! Sounds like a great learning experience!

@mbrookes
Copy link
Member

mbrookes commented Nov 8, 2023

@DerTimonius Sound's good. We'd love to see what you come up with!

@DerTimonius
Copy link
Contributor

I started with the project today and wanted to share the first version of the TUI. (the video cut off the left elements bit...)
create-mui-test

The command currently saves the input, I'm writing the installers for the different packages atm.

Just wanted to check in if this prototype is similar to what you had in mind @mbrookes @oliviertassinari

@oliviertassinari
Copy link
Member Author

oliviertassinari commented Nov 11, 2023

@DerTimonius It's getting closer, yes. Thanks for spending time on this.

Quick feedback:

  • I would place MUI System (name to change) as the same level as Tailwind CSS, I think it's about which styling solution do you want to use. I wouldn't expect developers to want to mix them.
  • "MUI Icons" in our case are "Material Design icons" (probably best since we plan to make them work with Joy UI as well) or "Material UI icons", but "MUI icons" for me doesn't mean anything.
  • TypeScript
  • Today, having Base UI in the list of options feels strange. We haven't built the product infra for developers to really use it as a starting point yet.

@DerTimonius
Copy link
Contributor

@oliviertassinari thanks for the feedback 🙌
as I said, this was the first draft so I was certain that things should change 😄

I opened a draft PR today with an updated video here: #39865
there are still things missing, especially the templates should be updated, but I'd be glad to hear more feedback 🙂

@DerTimonius
Copy link
Contributor

Just wanted to let you know that I'm kind of stuck with the templates. Any help would be much appreciated!

@oliviertassinari
Copy link
Member Author

oliviertassinari commented Sep 7, 2024

Shadcn UI effectively solved this issue last week https://x.com/shadcn/status/1829646528149143992. See @t3dotgg's wish in https://youtu.be/c5OPn_dyNcc?si=c5w4FPZkmN8_HwcP&t=616 for the overall ecosystem:

This isn't just like Shadcn UI being easier to adopt to do UI things.
This is a step forward in how these init things work the classic docs page everyone's had to write at some point. All the steps to add this thing to your project could be replaced with a single command and then you can just read the diff…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dx Related to developers' experience new feature New feature or request waiting for 👍 Waiting for upvotes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants