Playing Next Lesson In
seconds

Let's Learn AdonisJS 7 #1.0

Introducing AdonisJS

In This Lesson

Introduction to AdonisJS, a full-featured Node.js web framework designed to reduce choice fatigue with opinionated conventions, built-in batteries, and first-class TypeScript support.

Created by
@tomgobich
Published

If you’ve ever felt the "fatigue of choice" in the NodeJS ecosystem, spending more time picking libraries, then you are going to love AdonisJS.

What is AdonisJS?

AdonisJS is a NodeJS web framework for building type-safe full-stack, API, and even Inertia applications. It also provides everything you need to build production-ready applications out-of-the-box with a coherent suite of first-party packages.

Many NodeJS frameworks are micro, meaning you have to plug in 20 different packages to get a working app and decide how those 20 different packages should play into a bigger structural picture. AdonisJS, on the other hand, gives you an opinionated code base built with a standard structure, a set of powerful tools, and a clear way of doing things. Allowing you to stop debating folder structures and whether to use this or that package and start building features.

The opinionated and convention-driven native of AdonisJS is awesome for many reasons. First, the foundations are built from tried and tested patterns to help you succeed from the gate. It also provides a predictable and easy-to-understand structure for those onboarding onto your team and project. Plus, in the era of ever-growing AI usage, these conventions act as built-in guardrails for AI as well. Allowing it to understand your project with less tweaking and teaching required by you.

AdonisJS's core suite of first-party packages also shares a coherent voice. If you familiarize yourself with one, you'll be instantly familiar with the APIs of the others. Each package has different features and purposes, but the voice they use is the same, making understanding them that much easier.

So, all-in-all, AdonisJS is built to provide a great developer experience and to allow you to rapidly build applications to help you spend more time making and less time gluing things together.

Some of the powerful batteries included with AdonisJS are:

  • Type-safe routing

  • Lucid ORM for easy database communication

  • EdgeJS for server-side templating

  • Transformers for API and response shaping

  • Japa for testing

  • Encryption, CSRF, Rate Limiting, and other security mechanisms

  • IoC Container with Dependency Injection

  • Command line interface (CLI)

  • Authentication

  • Authorization

  • Internationalization

  • File storage

  • Events

  • Email delivery

  • OpenTelemetry integration

  • And more!

Our Roadmap

Throughout this series, we'll start by getting familiar with the project structure and setting up our environment. Then, we'll move on to the fundamentals of the framework, getting comfortable with the basics.

We'll next move into the three critical topics: database, authentication, and authorization, all of which are needed by almost every application. Finally, we'll dig into the engine room of the framework, covering things like the IoC Container, dependency injection, email, file uploads, and more.

For us to cover what we need in a time-efficient manner, we won't be building a specific application. There will, however, be a general data theme we'll follow throughout.

AdonisJS 7

Version 7 of AdonisJS focuses heavily on providing type-safety and cleanliness throughout the framework. This includes type, model schema, and barrel file generation. It also introduces transformers as a way to explicitly describe the shape of the data being returned by your endpoints.

We'll be discussing each of these throughout this series, so if you're already familiar with AdonisJS, feel free to jump to those respective lessons as you see fit.

Okay, ready to start? In the next lesson, we'll set up our development environment so we're all on the same page before we create our project.

Join the Discussion 7 comments

Create a free account to join in on the discussion
  1. I'm glad I waited till v7 to learn adonis, I've been following up on this on X and glad to see the series now live. I'm super excited to get started!

    I've always wanted e2e typesafe APIs just like how hono RPC integrates cleanly with meta-frameworks like nextjs but didn't want to use hono because of decision fatigue and hono's unopinionated nature and v7 brings the best of both worlds for me; convention over config, structure and e2e typesafe API integration with tuyau.

    Thanks for this series @tomgobich

    1
    1. Responding to julius-emmanuel-oyigocho
      @tomgobich

      Yeah, definitely sounds like you're going to really enjoy the improvements v7 brings with it then! :D

      My pleasure! Thank you for watching, and I hope you enjoy @julius-emmanuel-oyigocho!!

      1
  2. @ricardo-fortis

    I recently discovered AdonisJS, and it immediately caught my interest. While I don’t yet have much experience with JavaScript/TypeScript, I’m excited to dive in and start learning. I’m really looking forward to the upcoming lessons!

    1
    1. Responding to ricardo-fortis
      @tomgobich

      That's awesome to hear, @ricardo-fortis! I hope you enjoy AdonisJS and find these lessons helpful. If you have any questions are you go through them, always feel free to ask. Happy to help!

      0
  3. @aaron-ford

    Ah, 7 is out! How hard is it to upgrade our v6 project to 7? Is there a video for upgrading plotmycourse, or is it pretty straight forward?

    Has @adocasts.com/actions not been updated to work with 7?

    1
    1. Responding to aaron-ford
      @tomgobich

      Yep, sure is! 🙂 Should be relatively quick and easy! The core team has even provided AI agent instructions, if that's your sort of thing. You can find that along with all the upgrade instructions here: https://docs.adonisjs.com/v6-to-v7.

      I don't have any upgrade instructions of my own nor have I upgraded any of my packages at this time, unfortunately. I've been putting all my resources into making this series as good as I can get it!

      1
  4. Thanks a lot i'm so glad to be here

    0