Files
anti-plagiarism/services/api/app/schemas/auth.py
jze9 7758315632 feat: initial microservices project structure
Services:
- api: FastAPI gateway with JWT auth, async endpoints, WebSocket
- worker-gpu: CUDA sentence-transformers, FAISS IVFFlat, Ollama LLM
- worker-indexer: Winnowing+MinHash plagiarism detection, PDF/DOCX extraction
- worker-notifier: SMTP email notifications
- worker-gost: GOST 7.1-2003 and GOST R 7.0.5-2008 formatting

Infrastructure:
- docker-compose.yml (production) + docker-compose.dev.yml (hot reload)
- Nginx reverse proxy + WebSocket support
- PostgreSQL 16 with Alembic migrations
- Elasticsearch 8 with Russian/English analyzers
- MinIO, RabbitMQ, Redis, Ollama

Frontend:
- React 18 + Vite + TypeScript + TailwindCSS + Zustand + React Query v5
- 9 pages: Home, Search, Cabinet, Task, Check, Bibliography, Pricing, Login, Register

Scripts:
- Parser stubs: OpenAlex, КиберЛенинка, arXiv (Phase 0 - to be filled)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-24 19:42:39 +05:00

39 lines
968 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""Схемы для аутентификации и авторизации."""
from pydantic import BaseModel, EmailStr, Field
class RegisterRequest(BaseModel):
"""Запрос на регистрацию нового пользователя."""
email: EmailStr
password: str = Field(min_length=8, max_length=128)
name: str = Field(min_length=1, max_length=255)
class LoginRequest(BaseModel):
"""Запрос на вход в систему."""
email: EmailStr
password: str
class UserInToken(BaseModel):
"""Минимальная информация о пользователе в JWT токене."""
id: int
email: str
name: str
plan: str
is_verified: bool
model_config = {"from_attributes": True}
class TokenResponse(BaseModel):
"""Ответ с JWT токеном и данными пользователя."""
access_token: str
token_type: str = "bearer"
user: UserInToken