https://github.com/adonisjs/inertia-starter-kit
https://github.com/adonisjs/inertia-starter-kit
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/adonisjs/inertia-starter-kit
- Owner: adonisjs
- Created: 2024-02-17T18:41:52.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-13T08:09:11.000Z (over 1 year ago)
- Last Synced: 2025-03-21T18:05:32.320Z (about 1 year ago)
- Language: TypeScript
- Size: 1.35 MB
- Stars: 21
- Watchers: 5
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AdonisJS Inertia Starter Kit
This repo contains an AdonisJS application tailored for building an Inertia powered application using your favorite frontend framework. ( React, Vue, Solid.js, Svelte )
## What's included
- TypeScript setup with commands to run developments server using `ts-node + swc` and create production build.
- ESLint and Prettier setup extending the [AdonisJS tooling config](https://github.com/adonisjs/tooling-config) presets.
- Ace command line framework.
- Everything else you get with the core of AdonisJS.
On top of the framework core and dev-tooling, the following features are enabled by the inertia starter kit.
- Lucid ORM ( Installed, but not configured )
- Auth module ( Installed, but not configured )
- CSRF protection
- Edge template engine
- VineJS for validations
- Static files server
- Vite for bundling and serving frontend assets
- Inertia.js for building server-driven single-page apps
- Your favorite frontend framework ( React, Vue, Solid.js, Svelte )
## Usage
You can create a new app using the `inertia` boilerplate by executing the following command. The command will perform the following steps.
- Clone the repo
- Install dependencies
- Copy `.env.example` to `.env`
- Set app key using `node ace generate:key` command.
- Configure `@adonisjs/lucid` package.
- Configure `@adonisjs/auth` package.
- Configure `@adonisjs/inertia` package.
```sh
npm init adonisjs -- -K=inertia
```
### Configuring Lucid database dialect
```sh
npm init adonisjs -- -K=inertia --db=postgres
```
Available options for the `--db` flag.
- sqlite
- postgres
- mysql
- mssql
### Configuring Auth package guard
```sh
npm init adonisjs -- -K=inertia --auth-guard=access_tokens
```
Available options for the `--auth-guard` flag.
- session
- basic_auth
- access_tokens
### Configuring Inertia
You can pass the `--adapter` flag to configure the frontend adapter. Available options are `react`, `vue`, `solid`, and `svelte`.
```sh
npm init adonisjs -- -K=inertia --adapter=react
```
You can also pass the `--ssr` or `--no-ssr` flag to enable or disable server-side rendering.
```sh
npm init adonisjs -- -K=inertia --ssr
```