Guides
Creating Admin Panel Page
Guide on how to create an admin panel page in Nextbase.
Admin Panel pages are internal web app pages that are only accessible to application administrators. These pages usually require the user to be authenticated and have admin privileges.
All admin panel pages should be children of the layout located at src/app/(dynamic-pages)/(authenticated-pages)/app_admin/layout.tsx
. This layout handles checking if the user is authenticated and if they have admin privileges. If the user is not authenticated or does not have admin privileges, they will be redirected to the login page.
Here is an example of how to create an admin panel page: