docs(waitlist): add README.md#7
Open
amondnet wants to merge 2 commits into
Open
Conversation
Add comprehensive README for the @please-auth/waitlist package covering installation, server/client usage, configuration options, API endpoints, database schema, error codes, and how it works.
There was a problem hiding this comment.
No issues found across 1 file
Architecture diagram
sequenceDiagram
participant Client as User / Auth Client
participant Auth as Auth Server (Waitlist Plugin)
participant DB as Database
participant Email as Email Service
Note over Client, DB: Waitlist Onboarding Flow
Client->>Auth: NEW: POST /waitlist/join (email)
Auth->>DB: Create waitlist entry (status: pending)
DB-->>Auth: Record + lookupToken
Auth-->>Client: 200 OK (lookupToken)
Note over Auth, Email: Admin Approval Flow
Auth->>DB: CHANGED: Update status to 'approved'
Auth->>Auth: NEW: Generate inviteCode & expiry
Auth->>Email: NEW: sendInviteEmail()
Email-->>Client: Invite Code Notification
Note over Client, DB: Sign-up Interception Flow
Client->>Auth: POST /sign-up/email (or OAuth/Magic-link)
Auth->>Auth: NEW: Intercept Path (Middleware)
Auth->>DB: Query waitlist by email
alt Entry Not Found OR Not Approved
DB-->>Auth: No valid entry
Auth-->>Client: 403 Forbidden (NOT_APPROVED)
else Entry Approved
DB-->>Auth: Approved entry + inviteCode
opt requireInviteCode: true
Auth->>Auth: NEW: Verify inviteCode vs request body
end
Auth->>DB: Create User (via database hook)
Auth->>DB: CHANGED: Update status to 'registered'
DB-->>Auth: Success
Auth-->>Client: 200 OK (Session Created)
end
Note over Client, Auth: Status Polling (Optional)
Client->>Auth: GET /waitlist/status?token=<lookupToken>
Auth->>DB: Fetch entry
DB-->>Auth: Current status
Auth-->>Client: JSON Status Object
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@please-auth/waitlistpackageChanges
Test Plan
Summary by cubic
Add a comprehensive README for the
@please-auth/waitlistpackage, covering install, server/client setup, config, public/admin APIs, DB schema, error codes, and how the plugin works. Also update the rootREADME.mdto link package entries to their#readmeanchors (for@please-auth/waitlistand@please-auth/firestore) to improve navigation.Written for commit d822864. Summary will update on new commits.