Skip to content

Commit

Permalink
updated readme.md with license file
Browse files Browse the repository at this point in the history
  • Loading branch information
k8pai committed Sep 22, 2023
1 parent 6b53266 commit 05c66fc
Show file tree
Hide file tree
Showing 2 changed files with 151 additions and 147 deletions.
19 changes: 19 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) [2023] [k8pai]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
279 changes: 132 additions & 147 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,156 +1,141 @@
# What's nextauth-cli
# NextAuth CLI

A cli tool to initialize nextauth setup with a simple command.
NextAuth CLI is a command-line interface tool designed to simplify the process of creating base templates and initializing NextAuth.js base templates for users.

## Commands and it's use
## Table of Contents

### Installation
- [Installation](#installation)
- [Usage](#usage)
- [Contributing](#contributing)
- [License](#license)

```bash
npm i -g nextauth-cli@latest
```
## Installation

---

### Base Initialization ⚒️

- Configures `/api/auth/[...nextauth].js` | `/api/auth/[...nextauth]/route.js` files, with base configuration of `nextauth`.
- Adds a `GitHubProvider` Provider to the base auth file.
To install the NextAuth CLI, you can use npm:

```bash
nextauth --GitHub
```

### Configuration of .env file. ✅

- Comes with the base Configuration along with a sample `.env.example` file with all the `ID` and `SECRET` variables used mentioned.
- We don't want to peek in your `.env` files, hence `.env.example`. 🫣

```bash
nextauth --GitHub --env
```

### Configuration for typescript projects. ✔️

- `--ts` flag generates **.ts** files in the project structure with typesafety. If not specified files with `.js` extentions are created by default.

```bash
nextauth --GitHub --env --ts
```

### Configuration for projects with Adapters. ✔️

- `--adapter` flags generates **adapters** in the `[...nextauth].{ts/js}` | `route.{ts/js}` files. By default no Adapters are generated.
- `--adapter` takes in an argument, of type `AdapterType` which includes **16** adapters that are currently supported by [authjs.dev](https://authjs.dev/reference/adapters).
- Checkout the status of all the adapters that are currently ready to use, and under updation.

```bash
nextauth --GitHub --env --ts --adapter prisma
npm i -g nextauth-cli@latest
```

## Adapters Support

- `dgraph`
- `drizzle`
- `dynamodb`
- `fauna`
- `firebase`
- `kysely`
- `mikro-orm`⚒️
- `mongodb`
- `neo4j`
- `pouchdb`⚒️
- `prisma`
- `sequalize`
- `supabase`
- `typeorm`
- `upstash-redis`
- `xata`⚒️

## Provider Support

- `Apple`
- `Atlassian`
- `Auth0`
- `Authentik`
- `AzureAD`
- `AzureB2C`
- `Battlenet`
- `Box`
- `BoxyHQSAML`
- `Bungie`
- `Cognito`
- `Coinbase`
- `Credentials`
- `Discord`
- `Dropbox`
- `DuendeIDS6`
- `Email`
- `Eveonline`
- `Facebook`
- `Faceit`
- `FortyTwoSchool`
- `Foursquare`
- `Freshbooks`
- `Fusionauth`
- `GitHub`
- `Gitlab`
- `Google`
- `Hubspot`
- `Instagram`
- `Kakao`
- `Keycloak`
- `Line`
- `LinkedIn`
- `Mailchimp`
- `Mailru`
- `Medium`
- `Naver`
- `Netlify`
- `Okta`
- `Onelogin`
- `Osso`
- `Osu`
- `Passage`
- `Patreon`
- `Pinterest`
- `Pipedrive`
- `Reddit`
- `Salesforce`
- `Slack`
- `Spotify`
- `Strava`
- `Todoist`
- `Trakt`
- `Twitch`
- `Twitter`
- `UnitedEffects`
- `Vk`
- `Wikimedia`
- `Wordpress`
- `WorkOS`
- `Yandex`
- `Zitadel`
- `Zoho`
- `Zoom`

## Fixes to be made.

- Adapters `xata`, `pouchdb` and `mikro-orm` are to be made effective. ✔️
- Fix `route.ts` file exports for latest **Next.js 13.4+** versions. ✔️
- Fix `src/pages` directory structure. ☑️

## What-Status

- ✔️: "Partially Fixed.",
- ✅: "Totally Fixed issues",
- ⚒️: "Build on Progress",
- ☑️: "Broken Command",
- 🎟️: "Bug and doesnt work",
- 🎫: "Bug present, but works. Upgrade on the way.",

## Upcoming Updates

- Support for `email` providers.
- Support for `OAuth` Providers.
- Support for `Credentials` Providers.
## Usage

The CLI provides a set of commands to streamline the setup process for NextAuth.js projects. Here are the available commands:

### `nextauth --router <router-type> --provider <provider> --adapter <adapter> --env --ts`

Creates a new project with the the specified Next.js base template. Options for the following flags are given below.

#### Options:

- `--env`: Specifies if an additional `.env.example` file is to be generated which includes all the `process.env` variables that are to be used. Default value is **false**.

- `--ts`: Specifies if the project is **typescript** configured. Default value is **false**.

- `--router <router-type>`: Specifies the type of Next.js router to be used. Available options:

- `app`
- `pages`
- `src` ⚒️

- `--adapter <adapter>`: Specifies the adapter used for the project. Available options:

- `dgraph`
- `drizzle`
- `dynamodb`
- `fauna`
- `firebase`
- `kysely`
- `mikro-orm`⚒️
- `mongodb`
- `neo4j`
- `pouchdb`⚒️
- `prisma`
- `sequalize`
- `supabase`
- `typeorm`
- `upstash-redis`
- `xata`⚒️

- `--provider <provider>`: Specifies the authentication provider(s) to be used for the project. Available options:
- `Apple`
- `Atlassian`
- `Auth0`
- `Authentik`
- `AzureAD`
- `AzureB2C`
- `Battlenet`
- `Box`
- `BoxyHQSAML`
- `Bungie`
- `Cognito`
- `Coinbase`
- `Credentials`
- `Discord`
- `Dropbox`
- `DuendeIDS6`
- `Email`
- `Eveonline`
- `Facebook`
- `Faceit`
- `FortyTwoSchool`
- `Foursquare`
- `Freshbooks`
- `Fusionauth`
- `GitHub`
- `Gitlab`
- `Google`
- `Hubspot`
- `Instagram`
- `Kakao`
- `Keycloak`
- `Line`
- `LinkedIn`
- `Mailchimp`
- `Mailru`
- `Medium`
- `Naver`
- `Netlify`
- `Okta`
- `Onelogin`
- `Osso`
- `Osu`
- `Passage`
- `Patreon`
- `Pinterest`
- `Pipedrive`
- `Reddit`
- `Salesforce`
- `Slack`
- `Spotify`
- `Strava`
- `Todoist`
- `Trakt`
- `Twitch`
- `Twitter`
- `UnitedEffects`
- `Vk`
- `Wikimedia`
- `Wordpress`
- `WorkOS`
- `Yandex`
- `Zitadel`
- `Zoho`
- `Zoom`

### `nextauth`

Initializes the NextAuth.js base template with **prompts** support.

## Status

- ✔️ **Partially Fixed**: Some progress has been made, but more work is needed.
-**Totally Fixed**: All reported issues have been successfully resolved.
- ⚒️ **Build in Progress**: Work is currently underway to fix the reported issues.

## Contributing

We welcome contributions from the community! If you find any issues or have suggestions for improvement, please feel free to open an issue or submit a pull request.

## License

This project is licensed under the [MIT License](LICENSE).

0 comments on commit 05c66fc

Please sign in to comment.