Backend: - Setting + GeneratedPdf models, Alembic migration with default settings seed - PDF generation service (WeasyPrint + Jinja2 with autoescape) - Health report HTML template with memory entries + document excerpts - Admin user management: list, create, update (role/max_chats/is_active) - Admin settings: self_registration_enabled, default_max_chats - Self-registration check wired into auth register endpoint - default_max_chats applied to new user registrations - AI tool: generate_pdf creates health compilation PDFs - PDF compile/list/download API endpoints - WeasyPrint system deps added to Dockerfile Frontend: - PDF reports page with generate + download - Admin users page with create/edit/activate/deactivate - Admin settings page with self-registration toggle + max chats - Extended sidebar with PDF reports + admin users/settings links - English + Russian translations for all new UI Review fixes applied: - Jinja2 autoescape enabled (XSS prevention in PDFs) - db.refresh after flush (created_at populated correctly) - storage_path removed from API response (no internal path leak) - Role field uses Literal["user", "admin"] validation - React hooks called before conditional returns (rules of hooks) - default_max_chats setting now applied during registration Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
40 lines
892 B
TOML
40 lines
892 B
TOML
[project]
|
|
name = "ai-assistant-backend"
|
|
version = "0.1.0"
|
|
description = "Personal AI Assistant - Backend"
|
|
requires-python = ">=3.12"
|
|
dependencies = [
|
|
"fastapi>=0.115.0",
|
|
"uvicorn[standard]>=0.30.0",
|
|
"sqlalchemy[asyncio]>=2.0.30",
|
|
"asyncpg>=0.30.0",
|
|
"alembic>=1.13.0",
|
|
"pydantic[email]>=2.9.0",
|
|
"pydantic-settings>=2.5.0",
|
|
"passlib[bcrypt]>=1.7.4",
|
|
"python-jose[cryptography]>=3.3.0",
|
|
"python-multipart>=0.0.9",
|
|
"httpx>=0.27.0",
|
|
"anthropic>=0.40.0",
|
|
"pymupdf>=1.24.0",
|
|
"aiofiles>=24.0.0",
|
|
"apscheduler>=3.10.0",
|
|
"weasyprint>=62.0",
|
|
"jinja2>=3.1.0",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = [
|
|
"pytest>=8.0.0",
|
|
"pytest-asyncio>=0.24.0",
|
|
"httpx>=0.27.0",
|
|
]
|
|
|
|
[build-system]
|
|
requires = ["setuptools>=69.0"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[tool.pytest.ini_options]
|
|
asyncio_mode = "auto"
|
|
testpaths = ["tests"]
|