Add invite code registration system for beta
Backend: - Add InviteCode model with single-use codes - Add invite API endpoints (create, list, revoke, validate) - Modify registration to require invite code when enabled - Add REQUIRE_INVITE_CODE config toggle (default: true) - Add Alembic migration for invite_codes table Frontend: - Add invite code field to registration page - Validate invite code on blur with visual feedback - Pass invite code to registration API Admins can generate invite codes via /api/docs (Swagger UI). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@ export * from './user'
|
||||
export * from './auth'
|
||||
export * from './tree'
|
||||
export * from './session'
|
||||
export * from './invite'
|
||||
|
||||
// API response wrapper types
|
||||
export interface PaginatedResponse<T> {
|
||||
|
||||
4
frontend/src/types/invite.ts
Normal file
4
frontend/src/types/invite.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export interface InviteCodeValidation {
|
||||
valid: boolean
|
||||
message: string
|
||||
}
|
||||
@@ -15,6 +15,7 @@ export interface UserCreate {
|
||||
password: string
|
||||
name: string
|
||||
role?: UserRole
|
||||
invite_code?: string
|
||||
}
|
||||
|
||||
export interface UserLogin {
|
||||
|
||||
Reference in New Issue
Block a user