fed6a3df1b4493d582da8b1997a848a7fa5e4d94
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>
Personal AI Assistant
A client-server web application for managing personal health and life areas with AI-powered assistance. Upload documents, chat with AI specialists, receive proactive health reminders, and track critical information across multiple life domains.
Key Features
- AI Chat with Specialists — create chats using configurable skills (e.g., cardiologist, nutritionist). Each skill shapes the AI's behavior as a domain expert.
- Document Management — upload health records, lab results, prescriptions, and consultation notes. AI extracts and indexes content for intelligent retrieval.
- Proactive Notifications — AI analyzes your health profile and schedules reminders (checkups, medication reviews) via in-app, email, or Telegram.
- PDF Compilation — request AI-generated health summaries as downloadable PDF documents.
- Global Memory — AI maintains a shared memory of critical health information across all your chats.
- Multi-language — English and Russian support.
Tech Stack
| Layer | Technology |
|---|---|
| Backend | Python 3.12, FastAPI, SQLAlchemy 2.0, Alembic |
| Frontend | React 18, TypeScript, Vite, Shadcn/ui, Tailwind CSS |
| Database | PostgreSQL 16 |
| AI | Claude API (Anthropic) |
| Notifications | WebSocket, Email (SMTP), Telegram Bot |
| Deployment | Docker Compose |
Getting Started
Prerequisites: Docker and Docker Compose installed.
# Clone the repository
git clone https://git.dolgolyov-family.by/alexei.dolgolyov/personal-ai-assistant.git
cd personal-ai-assistant
# Copy environment config
cp .env.example .env
# Edit .env with your API keys and settings
# Start all services
docker compose up -d
# Create initial admin user
docker compose exec backend python scripts/seed_admin.py
The app will be available at http://localhost.
Project Structure
personal-ai-assistant/
├── backend/ # FastAPI application
├── frontend/ # React SPA
├── telegram-bot/ # Telegram notification bot
├── nginx/ # Reverse proxy config
├── plans/ # Phase subplans
├── docker-compose.yml
└── GeneralPlan.md # Full implementation plan
License
Private project. All rights reserved.
Description
Languages
Python
52.9%
TypeScript
42.3%
HTML
3.8%
CSS
0.4%
Dockerfile
0.4%
Other
0.2%