A fully featured web framework for Node.js

AdonisJS includes everything you need to create a fully functional web app or an API server. So stop wasting hours downloading and assembling hundreds of packages — Use AdonisJS and be productive from day one.

Jam-packed framework core

AdonisJS is not a minimalist framework. To give your projects a head start, we pack many baseline features within the core of the framework.

Loved by people across the globe

A wall full of love and support from our community

First party packages

AdonisJS has a rich collection of first-party packages you can use to speed up your development process. Just like the framework, they are well maintained and easy to test.

World-class testing experience

AdonisJS gives you a delightful testing experience with its well-crafted APIs, inbuilt fakes, helpers to reset the database state, HTTP clients, and more.

import { test } from '@japa/runner'
import { TwitterService } from 'App/Services/Twitter'
test('get latest tweets from a user timeline', async ({ assert }) => {
const twitterService = new TwitterService()
const tweets = await twitterService.fetchLatest()
assert.lengthOf(tweets, 10)
})
import { test } from '@japa/runner'
import Application from '@ioc:Adonis/Core/Application'
test('create new post', async ({ client, route }) => {
const response = await client
.post(route('PostsController.store'))
.field('title', 'Hello world')
.field('content', 'This is the first blog post')
.attach('cover_image', Application.makePath('sample.jpg'))
response.assertStatus(201)
response.assertBodyContains({
title: 'Hello world',
content: 'This is the first blog post'
})
})
import { test } from '@japa/runner'
import Mail from '@ioc:Adonis/Core/Mail'
test('create user account', async ({ client, assert }) => {
const mailer = Mail.fake()
// Make request to create a new user account
await client.post('/register')
assert.exists(mailer.find({
to: [{ address: 'user@example.com' }],
subject: 'Welcome to AdonisJS!'
}))
Mail.restore()
})
import { test } from '@japa/runner'
import Database from '@ioc:Adonis/Core/Database'
test.group((group) => {
group.each.setup(async () => {
// Using hooks to wrap all database queries inside
// transactions and performing rollback after each
// test
await Database.beginGlobalTransaction()
return () => Database.rollbackGlobalTransaction()
})
test('create user with email', () => {
// test receives empty database
})
test('create user with username', () => {
// test receives empty database
})
})

Social

Get help and stay connected

Need some inspiration?

Checkout the source code of a demo polls application built using AdonisJS, TailwindCSS, and Turbo drive.