In this episode, we set up the basic structure for the account management area of our app! You’ll see how we create the main account and security pages, making sure the layout is clean and ready for all the user profile and security features we’ll add later (like updating passwords and enabling two-factor authentication).
We start by creating controllers and routes for the account area. Next, we add basic pages for profile information and security, then hook them up to the navigation. After that, we focus on building an account-specific layout using a responsive grid that adapts to desktop or mobile views. The left side is a sidebar menu, while the right side shows the selected section (e.g. profile or security).
As we develop the layout, we also make it visually nice with good spacing, borders, and active styles. We touch on how to conditionally show menu options depending on which features are enabled in our config—some items are hidden if the user doesn’t have access.
To keep things DRY, we refactor the structure using Inertia layouts: we nest the account layout inside the main default layout, so we don’t duplicate shared elements like navigation or toast messages. This makes the code much tidier and easier to maintain.
By the end of the episode, you’ll have a solid reusable account section with a responsive sidebar navigation and no duplicated components. In the next episode, we’ll tackle making our menu show which section is active, and then keep building out the actual account management functionality!