Skip to content

Commit

Permalink
docs: add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ammezie committed Jun 14, 2022
1 parent ba57fad commit 849b05d
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 5 deletions.
Binary file added .github/socialcard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 47 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,55 @@
# flair
> Tagline
<p align="center"><img src="/.github/socialcard.png" alt="Social card of Flair"></p>

# Flair
> AdonisJS authentication scaffolding
[![npm-image]][npm-url] [![license-image]][license-url] [![typescript-image]][typescript-url]

A short brief
Flair provides a way to quickly add authentication to your AdonisJS application using TailwindCSS and Alpine.js.

## Prerequisites
While doing its thing, Flair is going to create and overwrite some files. Hence, Flair is meant to be used on a fresh AdonisJS application. In addition to that, your application should already have the following packages installed and configred:

* Encore (can be easily done at the point of creating the application)
* Lucid
* Auth
* Shield

## Setup

First, install Flair with your preffered package manager:

```bash
npm install @mezielabs/flair

# or
yarn add @mezielabs/flair

# or
pnpm add @mezielabs/flair
```

Next, configure the package using the `configure` command:

```bash
node ace configure @mezielabs/flair
```

This will scaffold and create the necessary files.

Finally, make sure to add the following middlewares inside the `start/kernel.ts` file:

```ts
Server.middleware.registerNamed({
'...',
guest: () => import('App/Middleware/Guest'),
confirmPassword: () => import('App/Middleware/ConfirmPassword'),
})
```

## Installation
## Learn AdonisJS

## Usage
Want to learn how to build projects like this with AdonisJS? Check out [Adonis Mastery](https://adonismastery.com), where you get to learn AdonisJS through practical screencasts.

[npm-image]: https://img.shields.io/npm/v/flair.svg?style=for-the-badge&logo=npm
[npm-url]: https://npmjs.org/package/flair "npm"
Expand Down

0 comments on commit 849b05d

Please sign in to comment.