Building with AdonisJS & Inertia

Building with AdonisJS & Inertia

Intermediate
48 Lessons
7h 11m

We'll learn how to use InertiaJS with AdonisJS 6 to build a feature-complete application, called PlotMyCourse. Our application will use server-side rendering (SSR), Vue 3, and Shadcn-Vue. It'll feature organizations, drag-and-drop, and lots of forms.

Module 1 › Getting Started (5 lessons)

Video preview
What Is InertiaJS
Lesson 1.0
・
Aug 15

What Is InertiaJS?

In this lesson, we'll introduce InertiaJS. We'll discuss what it is, what it helps with, its adapters, and more.

Video preview
What We'll Be Building
Lesson 1.1
・
Aug 15

What We'll Be Building

At the end of this series, we'll have a feature-complete application with organizations, teams, drag-and-drop ordering, password reset, and more! So, let's take a second to see our end goal and walk through the app.

Video preview
Creating Our AdonisJS App With InertiaJS
Lesson 1.2
・
Aug 15

Creating Our AdonisJS App With InertiaJS

In this lesson, we'll create a new AdonisJS 6 application with the InertiaJS Starter Kit. We'll then walk through the Inertia-specific aspects of our project structure and briefly discuss the configuration steps taken when adding Inertia.

Video preview
SSR vs CSR
Lesson 1.3
・
Aug 15

Server-Side Rendering (SSR) vs Client-Side Rendering (CSR)

In this lesson, we'll discuss the differences between InertiaJS in a server-side rendered (SSR) and a client-side rendered (CSR) application. We'll then compare when you would want to choose one over the other and the pros and cons of both.

Video preview
Shadcn-vue and TailwindCSS
Lesson 1.4
・
Aug 20

Setting Up TailwindCSS, Shadcn-Vue, and Automatic Component Imports

In this lesson, we'll install and configure Shadcn-Vue and TailwindCSS. We'll then set up automatic imports for all of our local Vue components.

Module 2 › The Basics (10 lessons)

Video preview
The Flow of Pages and Page Props
Lesson 2.0
・
Aug 20

The Flow of Pages and Page Props

In this lesson, we'll talk about the flow InertiaJS follows when rendering pages, from AdonisJS to our Vue application. Then, we'll talk about passing props to our Vue page components.

Video preview
Sharing Data from AdonisJS to Vue via Inertia
Lesson 2.1
・
Aug 20

Sharing Data from AdonisJS to Vue via Inertia

In this lesson, we'll learn how to pass data from AdonisJS to Vue using Inertia as the broker. We'll discuss passing data from our controllers, from middleware, and globally via the Inertia shared data configuration.

Video preview
Linking Between Pages
Lesson 2.2
・
Aug 27

Linking Between Pages & Page State Flow

In this lesson, we'll learn how to link from page to page the InertiaJS way. We'll then inspect how InertiaJS gets and updates our page's stateful information via our page props.

Video preview
The Link Component
Lesson 2.3
・
Aug 27

The Link Component and Programmatic Linking

In this lesson, we'll explore Inertia's Link component and its props. We'll then examine how to link between pages programmatically using Inertia's router.

Video preview
Global Components
Lesson 2.4
・
Aug 27

Global Components and Hydration Mismatch in Action

In this lesson, we'll learn how to register components globally inside our Vue application. We'll also learn what to watch out for and examine a hydration mismatch in action.

Video preview
Partial and Lazy Data Loading
Lesson 2.5
・
Aug 27

Partial and Lazy Data Loading and Evaluation

In this lesson, we'll learn about Inertia's partial reload functionality that allows us to refresh only specifically specified prop items for our page. We'll also examine lazy properties and how our props are evaluated with partial reloads.

Video preview
Creating A Layout
Lesson 2.6
・
Aug 30

Creating A Layout

In this lesson, we'll learn how to create a layout component and apply it to all our pages, the Inertia way.

Video preview
Default Layouts and Overwriting the Default
Lesson 2.7
・
Aug 30

Default Layouts & Overwriting the Default Layout

In this lesson, we'll inspect how Inertia injects our layout component and the data passed to it. We'll also learn how we can overwrite our default layout from our page components.

Video preview
Page Titles and Meta Tags
Lesson 2.8
・
Sep 06

Specifying Page Titles & Meta Tags

In this lesson, we'll learn how we can append information into the head of our document with Inertia on a per-page basis. We'll then create our own head component, wrapping Inertia's, to allow easier global changes.

Video preview
What Can We Share?
Lesson 2.9
・
Sep 06

What Code Can & Can't Be Shared Between AdonisJS & Inertia

In this lesson, we'll discuss what code we can and cannot share between AdonisJS and Inertia.

Module 3 › Working with Forms (7 lessons)

Video preview
Inertia Form Basics
Lesson 3.0
・
Sep 06

Inertia Form Basics

In this lesson, we'll introduce the basics of working with form in Inertia. We'll set up our register form with its fields, get our form state set up, and send off a post request to one of our AdonisJS routes.

Video preview
Adocasts Plus Exclusive
Exclusive
Form Validation & Displaying Errors
Lesson 3.1
・
Sep 06

Form Validation & Displaying Errors

In this lesson, we'll add validation to our POST handler for our register route. We'll then update our form fields to check for and display any validation errors that may have occurred.

Video preview
Adocasts Plus Exclusive
Exclusive
The useForm Helper
Lesson 3.2
・
Sep 13

The useForm Helper

In this lesson, we'll introduce the useForm helper composable provided by InertiaJS. We'll refactor our current form to use the useForm helper instead and see how it can help manage our form state, errors, and submission.

Video preview
Adocasts Plus Exclusive
Exclusive
Lesson 3.3
・
Sep 13

Common useForm Methods & Options

In this lesson, we'll walk through some of the more common methods and options we have with the useForm helper, like adding form errors, maintaining scroll position, mutating values prior to submission, and more.

Video preview
Adocasts Plus Exclusive
Exclusive
Creating A FormInput Component
Lesson 3.4
・
Sep 13

Creating A FormInput Vue Component

In this lesson, we'll create a reusable FormInput Vue Component using our current form field as a starting point.

Video preview
Adocasts Plus Exclusive
Exclusive
Cross-Site Request Forgery (CSRF) in InertiaJS
Lesson 3.5
・
Sep 13

Cross-Site Request Forgery (CSRF) Protection in InertiaJS

In this lesson, we'll learn how cross-site request forgery (CSRF) protection between AdonisJS and InertiaJS behaves in our application.

Video preview
Adocasts Plus Exclusive
Exclusive
What Are Some of Inertia's Limitations
Lesson 3.6
・
Sep 13

What Are Some of Inertia's Limitations

In this lesson, we'll discuss a couple of Inertia's request and routing limitations and how we can circumvent them by reaching for axios or fetch instead.

Module 4 › Database & Project Scaffolding (8 lessons)

Video preview
Adocasts Plus Exclusive
Exclusive
Database Schema
Lesson 4.0
・
Sep 20

Understanding Our Database Schema

In this lesson, we'll walk through a diagram of our application's database schema to understand how things relate to one another.

Video preview
Adocasts Plus Exclusive
Exclusive
Defining Our Migrations & Foreign Keys
Lesson 4.1
・
Sep 20

Defining Our Migrations & Foreign Keys

In this lesson, we'll create our migrations, models, and some of our controllers. We'll then fill out our migrations and define our relationship's foreign key constraints.

Video preview
Adocasts Plus Exclusive
Exclusive
Defining Our Lucid Models & Relationships
Lesson 4.2
・
Sep 20

Defining Our Lucid Models & Relationships

In this lesson, we'll convert our migrations into Lucid Models and define both sides of the relationships so they're ready to go.

Video preview
Adocasts Plus Exclusive
Exclusive
Lucid Model Relationship Mixin
Lesson 4.3
・
Sep 27

Creating A Lucid Model Mixin for our Organization Relationship

In this lesson, we'll learn how we can extract repetitive relationships, and other model properties/methods, into a mixin. We'll also learn what to look out for when using decorators within a TypeScript mixin.

Video preview
Adocasts Plus Exclusive
Exclusive
Seeding Our Initial Data
Lesson 4.4
・
Sep 27

Seeding Our Initial Database Data

In this lesson, we'll create a seeder file to create the initial data we'll need in our database to get going. For now, that's just going to be our application's roles.

Video preview
Adocasts Plus Exclusive
Exclusive
Model Types with DTOs
Lesson 4.5
・
Sep 27

Typing Lucid Models in Inertia with DTOs

In this lesson, we'll learn how we can specify types for our Lucid Models easily using DTOs we'll generate directly from our models.

Video preview
Adocasts Plus Exclusive
Exclusive
AppLayout & NavBar
Lesson 4.6
・
Oct 02

Completing Our AppLayout & Navigation Bar

In this lesson, we'll finish setting up our application's layout shell and navigation bar.

Video preview
Adocasts Plus Exclusive
Exclusive
Toast Message Manager
Lesson 4.7
・
Oct 02

Creating A Toast Message Manager

Learn how to implement a user feedback manager in your app using toast messages and vue-sonner. We'll integrate our flash message manager with state provided from AdonisJS' flash messages store to display success and error messages.

Module 5 › Authentication & Onboarding (7 lessons)

Video preview
Adocasts Plus Exclusive
Exclusive
Register new users
Lesson 5.0
・
Oct 04

User Registration with InertiaJS

In this lesson, we'll complete our user registration flow by validating our registration form data, creating a new user, logging that user in, and forwarding them to the next page in the flow.

Video preview
Adocasts Plus Exclusive
Exclusive
Splitting Our Routes Between Auth & Web
Lesson 5.1
・
Oct 04

Splitting Our Routes Between Auth & Web

In this lesson, we'll split our routes into two files: auth and web. Our auth routes file will contain all our authentication-based route definitions and our web routes will contain the remaining.

Video preview
Adocasts Plus Exclusive
Exclusive
Logging Out Users
Lesson 5.2
・
Oct 04

Logging Out Users

In this lesson, we'll hook up our logout user menu button to a POST route to logout an authenticated user.

Video preview
Adocasts Plus Exclusive
Exclusive
Onboarding New Users
Lesson 5.3
・
Oct 11

Onboarding Newly Registered Users

In this lesson, we'll create our onboarding flow for newly registered users. Before users can enter the application, they'll need to have at least one organization set up so everything works smoothly.

Video preview
Adocasts Plus Exclusive
Exclusive
Login & Exceptions
Lesson 5.4
・
Oct 11

Logging In Users & Displaying Exceptions

In this lesson, we'll add the ability to login to our application. We'll then discuss the differences between errors and errorsBag and how we can display long-lived exception messages as an alternative to our toast manager.

Video preview
Adocasts Plus Exclusive
Exclusive
Remember Me Token
Lesson 5.5
・
Oct 21

Adding the Remember Me Token

In this lesson, we'll enable the remember me feature on our auth login flow and add the remember me tokens table to our database.

Video preview
Adocasts Plus Exclusive
Exclusive
Forgot Password
Lesson 5.6
・
Oct 21

Forgot Password & Password Reset

In this lesson, we'll walk through setting up the complete forgot password flow including, creating a password reset token with time-expiry, sending an email notification with a password reset link, verifying the token, and resetting the users password.

Module 6 › The User's Organizations (7 lessons)

Video preview
Adocasts Plus Exclusive
Exclusive
Setting the Active Organization
Lesson 6.0
・
Oct 25

Setting & Loading the User's Active Organization

In this lesson, we'll set up our organization middleware and actions that'll be in charge of loading the user's active organization and role

Video preview
Adocasts Plus Exclusive
Exclusive
Listing the User's Organizations
Lesson 6.1
・
Oct 25

Listing the User's Organizations

In this lesson, we'll update our organization middleware to query all the user's organizations. We'll then provide everything into our Vue page state via Inertia and begin building our organization select component.

Video preview
Adocasts Plus Exclusive
Exclusive
Form Dialog Component
Lesson 6.2
・
Nov 01

The Form Dialog Component & Adding Organizations

In this lesson, we'll add a new form dialog component that simplifies the create and update forms we'll use throughout our application. We'll then use this component to add a create organization dialog within our organization selector.

Video preview
Adocasts Plus Exclusive
Exclusive
Switching Organizations
Lesson 6.3
・
Nov 01

Switching Between Organizations

In this lesson, we'll add the ability for our users to change which of their organizations is their active organization via our organization selector.

Video preview
Adocasts Plus Exclusive
Exclusive
Resource Action Composable
Lesson 6.4
・
Nov 08

Creating A UseResourceActions Composable

In this lesson, we'll create a composable that'll be in charge of maintaining form and dialog state for the resources throughout our application, starting with our organizations.

Video preview
Adocasts Plus Exclusive
Exclusive
Editing the Active Organization
Lesson 6.5
・
Nov 08

Editing the Active Organization

In this lesson, we'll make use of our useResourceActions composable to add the ability for our user's to edit their active organization.

Video preview
Adocasts Plus Exclusive
Exclusive
Confirm Delete Dialog
Lesson 6.6
・
Nov 11

The Confirm Delete Dialog & Deleting the Active Organization

In this lesson, we'll create a reusable confirm deletion dialog and bind its state into our use resource actions composable. We'll then incorporate this all together to allow users to delete their active organization.

Module 7 › Difficulties, Statuses, & Access Levels (4 lessons)

Video preview
Adocasts Plus Exclusive
Exclusive
Listing and creating difficulties
Lesson 7.0
・
Nov 11

Listing & Creating Difficulties

In this lesson, we'll create a page to list the active organization's difficulties. Then, we'll add the ability to create a new difficulty and add a new color picker type to our FormInput component.

Video preview
Adocasts Plus Exclusive
Exclusive
Updating Difficulties
Lesson 7.1
・
Nov 15

Updating Difficulties

In this lesson, we'll add the ability to update an organization's difficulties using our useResourceActions composable.

Video preview
Adocasts Plus Exclusive
Exclusive
Deleting Difficulties
Lesson 7.2
・
Nov 15

Confirming & Deleting Difficulties

In this lesson, we'll add the ability to delete an organization's difficulties. We'll also make use of our ConfirmDeleteDialog component to confirm the deletion action with our user.

Video preview
Adocasts Plus Exclusive
Exclusive
Deleted Replacement
Lesson 7.3
・
Nov 15

Replacing A Course's Deleted Difficulty

In this lesson, we'll add the ability to gracefully handle instances where a required relationship's record is being deleted. When a difficulty is being used by a course, we'll have our users select a replacement difficulty for the one being deleted.

excited robot

More in the works!

Add to your watchlist to get notified when new lessons are added

Sign in or sign up to add to your watchlist