Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,10 @@ typings/
# next.js build output
.next

# nuxt.js build output
# nuxt.js build / generate output
.nuxt
.output
.data

# vuepress build output
.vuepress/dist
Expand Down
Empty file removed apps/.gitkeep
Empty file.
12 changes: 12 additions & 0 deletions apps/docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Nuxt
.nuxt/
.output/
dist/
.data/

# Node
node_modules/

# Misc
.DS_Store
*.log
23 changes: 23 additions & 0 deletions apps/docs/app.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
export default defineAppConfig({
docus: {
locale: 'en',
},
seo: {
title: '@please-auth',
description: 'Better Auth plugins and adapters — waitlist, Firestore, and more.',
},
header: {
title: '@please-auth',
},
navigation: {
sub: 'aside',
},
toc: {
title: 'On this page',
},
github: {
url: 'https://github.com/chatbot-pf/please-auth',
branch: 'main',
rootDir: 'apps/docs',
},
})
2 changes: 2 additions & 0 deletions apps/docs/content/docs/1.getting-started/.navigation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
title: Getting Started
icon: i-lucide-rocket
52 changes: 52 additions & 0 deletions apps/docs/content/docs/1.getting-started/1.introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
title: Introduction
description: Welcome to the @please-auth documentation.
---

# Introduction

`@please-auth` is a collection of production-ready plugins and adapters for [Better Auth](https://www.better-auth.com/).

## Packages

| Package | Description |
|---------|-------------|
| [`@please-auth/waitlist`](/docs/plugins/waitlist) | Invite-based waitlist plugin that gates all registration paths |
| [`@please-auth/firestore`](/docs/adapters/firestore) | Cloud Firestore database adapter |

## Prerequisites

- [Better Auth](https://www.better-auth.com/) `^1.0.0`
- Node.js 18+ or Bun

## Quick Start

### Waitlist Plugin

```ts
import { betterAuth } from "better-auth";
import { waitlist } from "@please-auth/waitlist";

export const auth = betterAuth({
plugins: [
waitlist({
requireInviteCode: true,
sendInviteEmail: async ({ email, inviteCode }) => {
await sendEmail({ to: email, subject: "You're in!", body: inviteCode });
},
}),
],
});
```

### Firestore Adapter

```ts
import { betterAuth } from "better-auth";
import { firestoreAdapter } from "@please-auth/firestore";
import { getFirestore } from "firebase-admin/firestore";

const auth = betterAuth({
database: firestoreAdapter({ db: getFirestore() }),
});
```
70 changes: 70 additions & 0 deletions apps/docs/content/docs/1.getting-started/2.installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
title: Installation
description: Install @please-auth packages.
---

# Installation

Install the packages you need alongside Better Auth.

## Waitlist Plugin

::code-group
```bash [npm]
npm install @please-auth/waitlist
```
```bash [bun]
bun add @please-auth/waitlist
```
```bash [pnpm]
pnpm add @please-auth/waitlist
```
```bash [yarn]
yarn add @please-auth/waitlist
```
::

### Peer dependencies

The waitlist plugin requires the following peer dependencies:

| Package | Version |
|---------|---------|
| `@better-auth/core` | `^1.0.0` |
| `better-auth` | `^1.0.0` |
| `better-call` | `^1.0.0` |
| `nanostores` | `^1.0.1` _(optional — only needed for reactive client atoms)_ |

## Firestore Adapter

::code-group
```bash [npm]
npm install @please-auth/firestore
```
```bash [bun]
bun add @please-auth/firestore
```
```bash [pnpm]
pnpm add @please-auth/firestore
```
```bash [yarn]
yarn add @please-auth/firestore
```
::

### Peer dependencies

| Package | Version |
|---------|---------|
| `better-auth` | `>=1.0.0` |
| `firebase-admin` | `>=13.0.0` |

## Database Migration

After installing the waitlist plugin, run the Better Auth migration command to create the `waitlist` table:

```bash
npx @better-auth/cli migrate
```

This adds a `waitlist` table with fields for email, status, invite codes, and timestamps. See the [Waitlist Plugin](/docs/plugins/waitlist) page for the full schema.
2 changes: 2 additions & 0 deletions apps/docs/content/docs/2.plugins/.navigation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
title: Plugins
icon: i-lucide-puzzle
Loading
Loading