AdonisJS Project Structure — Let’s Learn Adonis 5, Lesson 1.1

Tom Gobich | Adocasts.com
10 min readOct 30, 2021

View all lessons in the Let’s Learn Adonis 5 series here.

Now that we have our Adonis application created and we’ve verified that it runs okay, let’s go ahead and start to dive into our project and learn the actual project structure.

So, go ahead and open up your newly created project in your text editor of choice, I’m using Visual Studio Code, and off to the left-hand side, you can see that we’re started with a number of directories and files. Some of these you might be familiar with, if not that’s okay we’re going to spend some time in this lesson going through each of these different folders and files so that you know exactly where you are within your project structure at all times.

To start, there are going to be two directories we’re going to spend the vast majority of our time within. The app directory and the resources directory.

App Directory

The app directory is going to contain almost, if not all, of our business logic. It’s going to contain our controllers, models, services, exceptions, middleware, and so on.

Each of those is going to get its own subdirectory within the app directory. Adonis…

--

--

Tom Gobich | Adocasts.com

Learn AdonisJS, NodeJS, JavaScript and more through in-depth lessons, screencasts, and livestreams at adocasts.com