[RFC] Toolpad core app scaffolding #3309
Janpot
announced in
Early feedback
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Which problem do we want to solve?
How will we solve it?
The CLI
Initially we’ll start with a new mode on the
create-toolpad-app
CLI. Over time this can become the default.The CLI asks questions:
After completion it generates the following layout in the file system (for Next.js app router):
Root layout:
The root layout wraps the whole app and provides app wide context.
Responsibilities:
The navigation interface:
Auth API
https://next-auth.js.org/configuration/initialization#route-handlers-app
We wrap
next-auth
and initialize itspages
property to our custom authentication pagesAuth pages
provides UI for MUI themed [auth pages](https://next-auth.js.org/configuration/pages). exempt from the dashboard layout by placing the latter in a
(dashboard)
route.This will supply
next-auth
pages for/auth/sign-in
/auth/sign-out
/auth/error
/auth/verify-request
/auth/new-user
We will provide a render prop interface to override the most common UI elements:
To provide defaults for each of these customization options we will also export a component per authentication page.
Dashboard layout
./src/app/layout.tsx
We will add a render prop interface to override the most common UI elements:
Theme
Beta Was this translation helpful? Give feedback.
All reactions