Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ This renders an alert with the `error` string as the message.

#### Next.js App Directory and GitHub

The component is composable with any authentication library you might want to use. The following is a `SignInPage` with [Auth.js](https://authjs.dev/) using GitHub, Next.js App router and server actions.
The component is composable with any authentication library you might want to use. The following is a `SignInPage` with [Auth.js](https://authjs.dev/) using GitHub, Next.js App Router and server actions.

{{"component": "modules/components/DocsImage.tsx", "src": "/static/toolpad/docs/core/auth-next.png", "srcDark": "/static/toolpad/docs/core/auth-next-dark.png", "alt": "Auth.js & Next.js with Toolpad Core sign-in page", "caption": "Auth.js & Next.js app router with Toolpad Core Sign-in page", "zoom": true, "indent": 1, "aspectRatio": "1.428" }}

Expand Down Expand Up @@ -230,7 +230,7 @@ Through the `theme` prop in the [AppProvider](https://mui.com/toolpad/core/react
{{"demo": "ThemeSignInPage.js", "iframe": true, "height": 700 }}

:::info
Find a full-fledged example using the Next.js App router, Auth.js and this theme [here](https://codesandbox.io/s/github/mui/toolpad/tree/master/examples/core/auth-nextjs-themed).
Find a full-fledged example using the Next.js App Router, Auth.js and this theme [here](https://codesandbox.io/p/sandbox/github/mui/toolpad/tree/master/examples/core/auth-nextjs-themed).
:::

### Slots
Expand Down
2 changes: 1 addition & 1 deletion docs/data/toolpad/studio/how-to-guides/railway-deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This guide walks you through the deployment of a Toolpad Studio app from a GitHu

## Prerequisites

- A [Railway](https://railway.app/) account
- A [Railway](https://railway.com/) account
- A [GitHub](https://github.com) account
- A GitHub repository containing your Toolpad Studio app. Check out [pushing your Toolpad Studio app to GitHub](/toolpad/studio/how-to-guides/render-deploy/#pushing-your-toolpad-studio-app-to-github) for this step.

Expand Down
20 changes: 10 additions & 10 deletions docs/src/modules/components/Examples/ExamplesGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,32 +122,32 @@ function ExamplesGrid(props: ExamplesGridProps) {
{t('source')}
</Button>
<Stack direction="row" spacing={1}>
{example.codeSandbox && (
<Tooltip title="Edit in CodeSandbox">
{example.stackBlitz === true ? (
<Tooltip title="Edit in StackBlitz">
<IconButton
component="a"
href={example.codeSandbox}
href={`https://stackblitz.com/github/${example.source.replace('https://github.com/', '')}`}
target="_blank"
rel="noopener noreferrer"
size="small"
>
<CodeSandboxIcon />
<StackBlitzIcon />
</IconButton>
</Tooltip>
)}
{example.stackBlitz && (
<Tooltip title="Edit in StackBlitz">
) : null}
{example.codeSandbox === true ? (
<Tooltip title="Edit in CodeSandbox">
<IconButton
component="a"
href={example.stackBlitz}
href={`https://codesandbox.io/p/sandbox/github/${example.source.replace('https://github.com/', '')}`}
target="_blank"
rel="noopener noreferrer"
size="small"
>
<StackBlitzIcon />
<CodeSandboxIcon />
</IconButton>
</Tooltip>
)}
) : null}
</Stack>
</CardActions>
</Card>
Expand Down
18 changes: 10 additions & 8 deletions docs/src/modules/components/Examples/FeaturedExamples.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,35 +144,37 @@ export default function FeaturedExamples(props: FeaturedExamplesProps) {
gap: 1,
}}
>
{example.stackBlitz ? (
{example.stackBlitz === true ? (
<Tooltip title="Edit in StackBlitz">
<IconButton
component="a"
href={`https://stackblitz.com/github/${example.source.replace('https://github.com/', '')}`}
target="_blank"
rel="noopener noreferrer"
color="primary"
size="small"
aria-label={t('stackblitzPlayground')}
data-ga-event-category="toolpad-core-template"
data-ga-event-action="stackblitz"
onClick={() => {
window.open(example.stackBlitz, '_blank', 'noopener,noreferrer');
}}
>
<SvgIcon viewBox="0 0 19 28">
<path d="M8.13378 16.1087H0L14.8696 0L10.8662 11.1522L19 11.1522L4.13043 27.2609L8.13378 16.1087Z" />
</SvgIcon>
</IconButton>
</Tooltip>
) : null}
{example.codeSandbox ? (
{example.codeSandbox === true ? (
<Tooltip title="Edit in CodeSandbox">
<IconButton
component="a"
href={`https://codesandbox.io/p/sandbox/github/${example.source.replace('https://github.com/', '')}`}
target="_blank"
rel="noopener noreferrer"
color="primary"
size="small"
aria-label={t('codesandboxPlayground')}
data-ga-event-category="toolpad-core-template"
data-ga-event-action="codesandbox"
onClick={() => {
window.open(example.codeSandbox, '_blank', 'noopener,noreferrer');
}}
>
<SvgIcon viewBox="0 0 1080 1080">
<path d="M755 140.3l0.5-0.3h0.3L512 0 268.3 140h-0.3l0.8 0.4L68.6 256v512L512 1024l443.4-256V256L755 140.3z m-30 506.4v171.2L548 920.1V534.7L883.4 341v215.7l-158.4 90z m-584.4-90.6V340.8L476 534.4v385.7L300 818.5V646.7l-159.4-90.6zM511.7 280l171.1-98.3 166.3 96-336.9 194.5-337-194.6 165.7-95.7L511.7 280z" />
Expand Down
82 changes: 42 additions & 40 deletions docs/src/modules/components/Examples/core-examples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,104 +7,106 @@ export default function examples() {
src: '/static/toolpad/docs/core/tutorial-1.png',
href: 'https://mui.com/toolpad/core/introduction/tutorial/',
source: 'https://github.com/mui/toolpad/tree/master/examples/core/tutorial/',
codeSandbox: 'https://codesandbox.io/s/github/mui/toolpad/tree/master/examples/core/tutorial',
stackBlitz: 'https://stackblitz.com/github/mui/toolpad/tree/master/examples/core/tutorial',
codeSandbox: true,
stackBlitz: true,
},
{
title: 'Auth.js with Next.js App router',
title: 'Auth.js with Next.js App Router',
description:
'This app shows you to how to get started using Toolpad Core with Auth.js and the Next.js App router',
'This app shows you to how to get started using Toolpad Core with Auth.js and the Next.js App Router.',
src: '/static/toolpad/docs/core/auth-next.png',
srcDark: '/static/toolpad/docs/core/auth-next-dark.png',
source: 'https://github.com/mui/toolpad/tree/master/examples/core/auth-nextjs/',
codeSandbox:
'https://codesandbox.io/s/github/mui/toolpad/tree/master/examples/core/auth-nextjs',
stackblitz: 'https://stackblitz.com/github/mui/toolpad/tree/master/examples/core/auth-nextjs',
codeSandbox: true,
stackBlitz: true,
},
{
title: 'Auth.js with Next.js Pages router',
title: 'Auth.js with Next.js Pages Router',
description:
'This app shows you to how to get started using Toolpad Core with Auth.js and the Next.js Pages router',
'This app shows you to how to get started using Toolpad Core with Auth.js and the Next.js Pages router.',
src: '/static/toolpad/docs/core/auth-next.png',
srcDark: '/static/toolpad/docs/core/auth-next-dark.png',
source: 'https://github.com/mui/toolpad/tree/master/examples/core/auth-nextjs-pages/',
codeSandbox:
'https://codesandbox.io/s/github/mui/toolpad/tree/master/examples/core/auth-nextjs-pages',
stackblitz:
'https://stackblitz.com/github/mui/toolpad/tree/master/examples/core/auth-nextjs-pages',
// infinite redirection
codeSandbox: false,
stackBlitz: false,
},
{
title: 'Auth.js Magic Link with Next.js App router',
title: 'Auth.js Magic Link with Next.js App Router',
description:
'This app shows you to how to get started using Toolpad Core with Auth.js Magic Links and the Next.js App router',
'This app shows you to how to get started using Toolpad Core with Auth.js Magic Links and the Next.js App Router.',
src: '/static/toolpad/docs/core/auth-next.png',
source: 'https://github.com/mui/toolpad/tree/master/examples/core/auth-nextjs-email',
codeSandbox:
'https://codesandbox.io/s/github/mui/toolpad/tree/master/examples/core/auth-nextjs-email',
// Crash with Prisma
codeSandbox: false,
stackBlitz: false,
},
{
title: 'Vite with React Router',
description:
'This app shows you to how to get started using Toolpad Core with Vite and React Router',
'This app shows you to how to get started using Toolpad Core with Vite and React Router.',
src: '/static/toolpad/docs/core/vite-react-router.png',
source: 'https://github.com/mui/toolpad/tree/master/examples/core/vite/',
codeSandbox: 'https://codesandbox.io/s/github/mui/toolpad/tree/master/examples/core/vite',
stackblitz: 'https://stackblitz.com/github/mui/toolpad/tree/master/examples/core/vite',
codeSandbox: true,
// Show nothing
stackBlitz: false,
},
{
title: 'Auth.js v4 with Next.js Pages router',
title: 'Auth.js v4 with Next.js Pages Router',
description:
'This app shows you to how to get started using Toolpad Core with Auth.js v4 and the Next.js Pages router',
'This app shows you to how to get started using Toolpad Core with Auth.js v4 and the Next.js Pages router.',
src: '/static/toolpad/docs/core/auth-next.png',
srcDark: '/static/toolpad/docs/core/auth-next-dark.png',
source:
'https://github.com/mui/toolpad/tree/master/examples/core/auth-nextjs-pages-nextauth-4/',
codeSandbox:
'https://codesandbox.io/s/github/mui/toolpad/tree/master/examples/core/auth-nextjs-pages-nextauth-4',
stackblitz:
'https://stackblitz.com/github/mui/toolpad/tree/master/examples/core/auth-nextjs-pages-nextauth-4',
codeSandbox: true,
// Show nothing
stackBlitz: false,
},
{
title: 'Next.js App router with Auth.js Passkey',
title: 'Next.js App Router with Auth.js Passkey',
description:
'This app shows you to how to get started using Toolpad Core with Auth.js Passkeys and the Next.js App router',
'This app shows you to how to get started using Toolpad Core with Auth.js Passkeys and the Next.js App Router.',
src: '/static/toolpad/docs/core/auth-next-passkey.png',
srcDark: '/static/toolpad/docs/core/auth-next-passkey-dark.png',
source: 'https://github.com/mui/toolpad/tree/master/examples/core/auth-nextjs-passkey/',
codeSandbox:
'https://codesandbox.io/s/github/mui/toolpad/tree/master/examples/core/auth-nextjs-passkey',
// Crash with Prisma
codeSandbox: false,
stackBlitz: false,
},
{
title: 'Vite with React Router and mock authentication',
description:
'This app shows you to how to get started using Toolpad Core with Vite, React Router and any external authentication provider',
'This app shows you to how to get started using Toolpad Core with Vite, React Router and any external authentication provider.',
src: '/static/toolpad/docs/core/vite-react-router.png',
source: 'https://github.com/mui/toolpad/tree/master/examples/core/auth-vite',
codeSandbox:
'https://codesandbox.io/s/github/mui/toolpad/tree/master/examples/core/auth-vite',
codeSandbox: true,
// Show nothing
stackBlitz: false,
},
{
title: 'Vite with React Router and Firebase Auth',
description:
'This app shows you to how to get started using Toolpad Core with Vite, React Router, and authentication using Firebase',
'This app shows you to how to get started using Toolpad Core with Vite, React Router, and authentication using Firebase.',
src: '/static/toolpad/docs/core/firebase-vite-light.png',
srcDark: '/static/toolpad/docs/core/firebase-vite-dark.png',
source: 'https://github.com/mui/toolpad/tree/master/examples/core/firebase-vite',
codeSandbox:
'https://codesandbox.io/s/github/mui/toolpad/tree/master/examples/core/firebase-vite',
// Show nothing
codeSandbox: false,
stackBlitz: false,
},
{
title: 'Functional Dashboard',
title: 'Functional dashboard',
description:
'This example shows you how to get started building a dashboard with Toolpad Core, Next.js app router, Auth.js and Material UI components in a customized theme',
'This example shows you how to get started building a dashboard with Toolpad Core, Next.js app router, Auth.js and Material UI components in a customized theme.',
src: '/static/toolpad/docs/core/functional-dashboard.png',
href: 'https://mui.com/toolpad/core/templates/nextjs-dashboard',
srcDark: '/static/toolpad/docs/core/functional-dashboard-dark.png',
source: 'https://github.com/mui/toolpad/tree/master/examples/core/auth-nextjs-themed',
featured: true,
new: true,
codeSandbox:
'https://codesandbox.io/s/github/mui/toolpad/tree/master/examples/core/auth-nextjs-themed',
codeSandbox: true,
stackBlitz: true,
},
];
}
4 changes: 2 additions & 2 deletions docs/src/modules/components/Examples/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ export interface Example {
srcDark?: string;
href: string;
source: string;
codeSandbox?: string;
stackBlitz?: string;
codeSandbox?: boolean;
stackBlitz?: boolean;
new?: boolean;
featured?: boolean;
}
2 changes: 1 addition & 1 deletion examples/core/auth-nextjs-email/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Toolpad Core Next.js App Router app with email provider
# Toolpad Core - Next.js App Router app with email provider

This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

Expand Down
2 changes: 1 addition & 1 deletion examples/core/auth-nextjs-passkey/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Toolpad Core Playground - Next.js App Router with Passkey
# Toolpad Core - Next.js App Router with Passkey

This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

Expand Down
4 changes: 2 additions & 2 deletions examples/core/auth-nextjs-themed/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Create Toolpad App
# Toolpad Core - Create Toolpad App

This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-toolpad-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

Expand All @@ -16,7 +16,7 @@ Open [http://localhost:3000](http://localhost:3000) with your browser to see the

## Run on CodeSandbox

Run this example on CodeSandbox [here](https://codesandbox.io/s/github/mui/toolpad/tree/master/examples/core/auth-nextjs-themed).
Run this example on CodeSandbox [here](https://codesandbox.io/p/sandbox/github/mui/toolpad/tree/master/examples/core/auth-nextjs-themed).

## Clone using `create-toolpad-app`

Expand Down
2 changes: 1 addition & 1 deletion examples/core/auth-vite/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# React + TypeScript + Vite
# Toolpad Core - Vite with React Router and mock authentication

This template provides a minimal setup to get React working in Vite with HMR.

Expand Down
2 changes: 1 addition & 1 deletion examples/core/firebase-vite/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# React + TypeScript + Vite
# Toolpad Core - Vite with React Router and Firebase Auth

This template provides a minimal setup to get React working in Vite with HMR, and authentication with Firebase.

Expand Down
2 changes: 1 addition & 1 deletion examples/core/vite/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Toolpad Core - Vite & React Router
# Toolpad Core - Vite with React Router

This example provides a minimal setup to get Toolpad Core working in Vite with HMR, as well as routing with React Router.

Expand Down
2 changes: 1 addition & 1 deletion packages/create-toolpad-app/src/generateProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import ordersPage from './templates/ordersPage';
import packageJson from './templates/packageJson';
import indexPage from './templates/indexPage';

// App router specific files
// App Router specific files
import rootLayout from './templates/nextjs-app/rootLayout';
import dashboardLayout from './templates/nextjs-app/dashboardLayout';

Expand Down