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

[cli] Add framework selection to support Vite #4545

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

@bharatkashyap bharatkashyap added the create-toolpad-app Issues related to the `create-toolpad-app` CLI tool label Dec 18, 2024
Copy link
Member

@apedroferreira apedroferreira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just some general suggestions, nothing too specific to the implementation that I could notice!

@@ -176,30 +176,157 @@ For a full working example, see the [Toolpad Core Vite app with React Router exa

## (Optional) Set up authentication

You can use the `SignInPage` component to add authentication along with an external authentication provider of your choice. The following code demonstrates the code required to set up authentication with a mock provider.
You can use the `SignInPage` component to add authentication along with an external authentication provider of your choice. The following code demonstrates the code required to set up authentication with Firebase.

### Define a `SessionContext` to act as the mock authentication provider
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's no longer a mock, right?


This template provides a minimal setup to get React working in Vite with HMR.
This example provides a minimal setup to get Toolpad Core working in Vite with HMR, as well as routing with React Router and a mock authentication setup.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we don't need this example anymore now that we have the Firebase one?
Or we can keep it if this one is more extendable, not sure.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like it's okay to preserve the barebones example just to demonstrate the minimum requirements to get auth working


let routerOption: SupportedRouter | undefined;

if (frameworkOption === 'nextjs') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe the router and framework choice could be the same menu of choices? Unless we plan to have a lot of options for both in the future i guess...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My preference would be to keep the options list short, so Next.js or Vite? -> App Router or Pages Router?

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Dec 26, 2024
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Dec 30, 2024
@mui-bot
Copy link

mui-bot commented Dec 30, 2024

Netlify deploy preview

https://deploy-preview-4545--mui-toolpad-docs.netlify.app/

Generated by 🚫 dangerJS against a49a2ee

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
create-toolpad-app Issues related to the `create-toolpad-app` CLI tool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[cli] Support Vite starter in create-toolpad-app
3 participants