This guide will help you go from zero to a working application in less than 10 minutes. For detailed setup instructions, see the Installation page.
Prerequisites
Before you begin, ensure you have:- Node.js 20 or higher
- pnpm 10.18.0 or higher
- Docker and Docker Compose (for database services)
Create Your Project
Use the AdonisJS CLI to scaffold a new project from the starter kit template:You’ll be prompted to:
This command clones the starter kit repository and sets up your project structure with all necessary dependencies.
- Enter your project name
- Choose your preferred package manager (select pnpm)
- Configure additional options
Configure Environment Variables
Copy the example environment file and configure your application:Generate a secure application key:Your
.env file will contain essential configuration:Start Database Services
Launch PostgreSQL, PgAdmin, and Mailpit using Docker Compose:This command starts three essential services:Verify services are running:You should see all three services with status “Up”.
PostgreSQL
Database server on port 5432
PgAdmin
Database admin UI on port 5050
Mailpit
Email testing on port 8025
The PostgreSQL container automatically initializes with a development database named
adonis_app using the script at .github/postgres/dev-init.sql.Initialize Database
Run migrations to create the database schema:This creates all necessary tables including:
roles- User roles and permissionsusers- User accountsaccess_tokens- API authentication tokensreset_password_tokens- Password recovery tokensrate_limits- API rate limiting
Start Development Server
Launch the development server with hot module reloading:You should see output similar to:Open your browser and navigate to:
TurboRepo orchestrates the build process, starting the AdonisJS server and Vite dev server simultaneously.
The application uses Inertia.js, so requests go to port 3333 (AdonisJS), which serves React components bundled by Vite.
What You’ve Accomplished
Congratulations! You now have a fully functional AdonisJS Starter Kit application with:- ✅ Complete monorepo structure with TurboRepo
- ✅ PostgreSQL database with migrations and seed data
- ✅ Development environment with hot reloading
- ✅ Email testing with Mailpit
- ✅ Database administration with PgAdmin
- ✅ Modern React frontend with Inertia.js
- ✅ Tailwind CSS and ShadCN components
Access Your Services
Application
Main application interface
Mailpit
View test emails
PgAdmin
Default Credentials
Check your seeder file to find the default user accounts created during the setup.Next Steps
Explore the Codebase
Monorepo Structure:
apps/web/- Main applicationpackages/ui/- Shared componentsapps/web/app/- Feature modules (auth, users, analytics)
Add UI Components
Install ShadCN components:
Create Modules
Generate a new feature module:
Configure Social Auth
Set up authentication providers:
- Google OAuth
- GitHub OAuth
- More via @adonisjs/ally
Troubleshooting
Database connection failed
Database connection failed
Ensure Docker services are running:Check your database credentials in
.env match the Docker Compose configuration.Port already in use
Port already in use
If port 3333 is busy, change it in
apps/web/.env:Migration errors
Migration errors
Reset your database and try again:
Module not found errors
Module not found errors
Clear your build cache and reinstall dependencies:
Learn More
Installation Guide
Detailed setup instructions and configuration options
AdonisJS Docs
Official AdonisJS documentation