Let's Learn AdonisJS 5
Learn AdonisJS 5 in-depth as we step through all the major functionalities of the framework in-depth. Learn about Routing, Controllers, Lucid, Auth, and much more.
Module 1 › Introduction (4 lessons)
Lesson 1.0
Prerequisites & Creating A New Project
In this lesson, we'll learn about AdonisJS 5; what it is, what it offers, its prerequisites, and how to create a new project. We'll then start our project up to ensure everything is working.
Lesson 1.1
Project Structure
In this lesson, we'll get familiar with our Adonis 5 project by running through all the folders and files and their purposes. We'll learn which folders and files within our project structure
Lesson 1.2
Introducing the Ace CLI
In this lesson, we'll be learning about Adonis' command-line interface (CLI). Including what the Ace CLI is, its options, how it'll be expanded, and how we can create custom commands
Lesson 1.3
Understanding the HttpContext
The HttpContext object contains unique information about individual requests our application receives. In this lesson, we'll cover what it is, how it's passed, and how we can mutate it.
Module 2 › Routing (8 lessons)
Lesson 2.0
Routing Introduction
We'll learn how to define routes in Adonis using the Route module. We'll cover defining routes for specific HTTP Methods (like GET, POST, PUT/PATCH, and DELETE), Caveats, and Brisk Routes.
Lesson 2.1
Dynamic Routing with Route Parameters
In this lesson, we go in-depth with route parameters covering optional route params, validation using matchers, casting, wildcards, and a few things to watch out for.
Lesson 2.2
Moving & Organizing Routes
In this lesson, we'll cover various different ways you can structure your routes within your Adonis project, including moving the routes.ts file, and using a module approach
Lesson 2.3
Naming, Grouping, & Prefixing Routes
In this lesson, we'll learn about naming routes and using groups with prefixes to structure our routes and reduce redundancies.
Lesson 2.4
Multi-File Route Grouping Strategies
In this lesson, we'll discuss strategies you can use to apply multiple files worth of route definitions into a single route group without redefining the route group in each file.
Lesson 2.5
Generating URLs and Signed URLs
In this lesson, we'll be focusing specifically on generating URLs from our route definitions. We'll cover generating generic URLs, signed URLs, redirect URLs, and more.
Lesson 2.6
Extending the Adonis Router and Route Matchers
In this lesson, we'll be learning how we can add our own chainable methods using macros to the Adonis Router's Route, Route Group, Route Resource, Brisk Route, and Matchers properties.
Lesson 2.7
The Middleware Mountain
In this lesson, we'll learn about the two different types of middleware, global middleware and registered middleware. We'll also take a deep dive into how they play into the flow of an AdonisJS Request.
Module 3 › Controllers (3 lessons)
Lesson 3.0
Handling Routes with Controllers
In this lesson, we'll learn about Controllers and how we can keep our route definitions clean and easy to scan by extracting our route handlers into these Controllers.
Lesson 3.1
Route & Controller Resources
In this lesson, we'll learn what a resource is and how we can quickly and easily define a route resource and handle each resourceful route with a resource controller.
Lesson 3.2
Static, Non-Static, & Singleton Services
We'll learn what services are. We'll then discuss three different ways we can use them within our AdonisJS application, including static, non-static, and singleton services.
Module 4 › Service Providers (1 lessons)
Lesson 4.0
Service Providers & The IoC Container
We'll learn about Service Providers and how they interact with the IoC Container. We'll then put this to practice by wrapping a NodeJS package so it's easy to use within AdonisJS
Module 5 › Lucid ORM (10 lessons)
Lesson 5.0
Introducing, Installing, and Configuring Lucid ORM
In this lesson, we'll learn about Lucid ORM; its capabilities, Ace CLI commands, and the difference between it and the Database module. We'll then install and configure it within our project.
Lesson 5.1
Migrations & Understanding the Flow of Migrations
In this lesson, we'll learn all about migrations, what they are, how they're used, and how they're tracked. We'll also learn about the flow of migrations and how they work similarly to a timeline.
Lesson 5.2
What To Know Before Altering Your Database with Migrations
In this lesson, we'll discuss two different flows you can use to alter your database. One, when working completely locally and another when a migration has already been executed on your production database.
Lesson 5.3
What Is A Model?
In this lesson, we'll delve into AdonisJS Models learning what they are, what they represent, how to create them, what we can do with them, and more.
Lesson 5.4
Database Schema to Migration
In this lesson, we'll walk through a real-world example of a database schema and how to create migrations. We'll define each table's columns, primary keys, and foreign keys.
Lesson 5.5
Database Migrations To Lucid Models
In this lesson, we'll walk through examples of transferring our database migrations into our Lucid Models. This will pave the way for us to begin CRUD operations in later lessons.
Lesson 5.6
Defining Model Relationships
In this lesson, we'll learn how to define relationships on our Lucid Models. We'll cover one-to-one, many-to-one, one-to-many, and many-to-many relationship definitions.
Lesson 5.7
Creating Records with Lucid ORM
In this lesson, we'll learn various ways we can create and bulk-create records using the AdonisJS Lucid ORM.
Lesson 5.8
Password Hashing & Model Hook Overview
In this lesson, we'll learn briefly about the model hooks available and how they work. Then, we'll walk through an example by hashing our password anytime it is changed.
Lesson 5.9
Easy Querying with Static Model Query Methods
In this lesson, we'll learn what static methods are available on our Lucid Models to help us easily query records from our database. These methods offer a convenient query option compared to the query builder.
Module 6 › Query Builder (3 lessons)
Lesson 6.0
Intro to the Query Builder & It's Where Statements
In this lesson, we'll introduce the query builder. We'll spend most of our time looking at its various where statement options and how we can use them to build queries.
Lesson 6.1
Limiting, Sorting, & Pagination with the Query Builder
In this lesson, we'll take a look at the various options we have to limit results when using the query builder including first, firstOrFail, limit, and pagination. We'll also learn how we can sort our results.
Lesson 6.2
Model vs Database Query Builder
In this lesson, we'll take a look at the differences between the model and database query builders.