first commit

This commit is contained in:
debu-2 2026-10-02 11:22:40 +05:30
commit efa5080897
127 changed files with 18610 additions and 0 deletions

27
backend/app/schemas.py Normal file
View file

@ -0,0 +1,27 @@
from pydantic import BaseModel, EmailStr, Field
class RegisterRequest(BaseModel):
name: str = Field(min_length=2, max_length=160)
email: EmailStr
password: str = Field(min_length=10, max_length=128)
class LoginRequest(BaseModel):
email: EmailStr
password: str = Field(min_length=1, max_length=128)
class SetPasswordRequest(BaseModel):
password: str = Field(min_length=10, max_length=128)
current_password: str | None = Field(default=None, max_length=128)
class UserResponse(BaseModel):
id: str
email: EmailStr
name: str
avatar_url: str | None
email_verified: bool
has_password: bool
providers: list[str]