Skip to content

adonisjs/react-starter-kit

AdonisJS React Inertia Starter Kit

React Inertia Starter Kit

A batteries-included AdonisJS starter kit for building modern single-page applications with React.

Built for developers who want the power of React with the simplicity of server-side routing and rendering.


Features   •   Quick Start   •   Documentation




✨ What's in the Box

This starter kit is designed to help you build production-ready single-page applications with React and Inertia.js. It combines the modern DX of React with the simplicity of traditional server-side routing, giving you the best of both worlds.

🎯 Core Features

  • 🔐 Authentication System - Complete user signup, login, and session management out of the box
  • ⚛️ React 19 - Latest React with modern hooks and concurrent features
  • 🔄 Inertia.js - Build SPAs without the API complexity—server-side routing that feels like client-side
  • 🎨 Custom Design System - Beautiful, accessible components with modern CSS (OKLCH color system)
  • ✅ Form Validation - Powered by VineJS with automatic error handling
  • 🔔 Toast Notifications - Built-in toast system using Sonner
  • 🛡️ Security First - CSRF protection, Shield middleware, and secure session handling
  • 🔒 Type Safety - End-to-end TypeScript with Tuyau for type-safe routing

🔧 Tech Stack

Backend AdonisJS 7.x - Full-featured Node.js framework
Frontend React 19 - Modern UI library with hooks and concurrent rendering
Adapter Inertia.js - Build SPAs with server-side routing (no API needed)
Database Lucid ORM - SQL ORM with migrations (SQLite, PostgreSQL, MySQL, MSSQL)
Auth Session-based authentication with secure cookie storage
Styling Custom CSS with modern features (OKLCH colors, CSS variables)
Build Vite - Lightning-fast HMR and optimized builds
Validation VineJS - Type-safe schema validation
Type Safety Tuyau - End-to-end type safety for routes and API calls
UI Components Sonner - Toast notifications for React
Testing Japa - Delightful testing framework with browser testing support
TypeScript Full TypeScript support with strict mode enabled

🚀 Quick Start

Create a New Project

npm init adonisjs@latest -- -K=inertia

During setup, you'll be asked to choose:

  • Frontend adapter: Select react
  • Database: Choose your preferred database (SQLite, PostgreSQL, MySQL, MSSQL)
  • Auth guard: Select session for cookie-based authentication
  • SSR: Choose whether to enable server-side rendering (optional)

This command will:

  • Clone this starter kit
  • Install all dependencies
  • Set up your .env file
  • Generate your app encryption key
  • Configure your database
  • Configure Inertia with React
  • Run migrations

Start Developing

# Run the development server with hot reload
node ace serve --hmr

# Run tests
node ace test

# Type check both backend and frontend
npm run typecheck

# Lint your code
npm run lint

# Build for production
npm run build

# Start production server
npm start

Your app will be running at http://localhost:3333


📚 Learn More

📖 AdonisJS Docs
Complete guide to AdonisJS
🔄 Inertia.js
Learn about server-driven SPAs
⚛️ React Docs
Modern React with hooks
🔒 Tuyau
Type-safe routing and API calls
💾 Lucid ORM
Database queries and relationships
✅ VineJS
Schema validation guide

🎨 Philosophy

This starter kit embraces the modern full-stack approach to web development:

  • Server-Side Routing - No API complexity, just controllers returning Inertia responses
  • Client-Side Experience - React handles the UI with smooth SPA navigation
  • Type Safety Everywhere - TypeScript across frontend and backend with Tuyau integration
  • Convention Over Configuration - Sensible defaults, escape hatches when you need them
  • Developer Experience - Hot reload, great error messages, instant feedback
  • Production Ready - Security, validation, and testing built-in

Why Inertia.js?

Traditional SPAs require building and maintaining a separate API. Inertia.js eliminates this complexity by letting your controllers return data directly to your React components. You get the smooth navigation of a SPA with the simplicity of traditional server-side routing.


🤝 Contributing

This starter kit is maintained by the AdonisJS team. Found a bug or have a suggestion? Open an issue or submit a pull request!


📄 License

This starter kit is open-sourced software licensed under the MIT license.


Built with ❤️ by the AdonisJS team

About

React Starter Kit with Inertia and AdonisJS targeting v7

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published