Features:
- User registration and login with JWT tokens
- All data is now user-specific (multi-tenancy)
- Profile page with integrations and logout
- Automatic migration of existing data to first user
Backend changes:
- Added users and refresh_tokens tables
- Added user_id to all data tables (projects, entries, nodes, dictionaries, words, progress, configs, telegram_integrations, weekly_goals)
- JWT authentication middleware
- claimOrphanedData() for data migration
Frontend changes:
- AuthContext for state management
- Login/Register forms
- Profile page (replaced Integrations)
- All API calls use authFetch with Bearer token
Migration notes:
- On first deploy, backend automatically adds user_id columns
- First user to login claims all existing data
- Add telegram_integrations table to store bot token and chat_id
- Add Integrations tab with Todoist and Telegram integration screens
- Remove TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID from env variables
- All Telegram configuration now done through UI
- Telegram webhook registration happens when user saves bot token
- Rename TELEGRAM_WEBHOOK_BASE_URL to WEBHOOK_BASE_URL
- Создан скрипт dump-db.sh для создания дампов (по умолчанию из .env.prod)
- Создан скрипт restore-db.sh для восстановления дампов (по умолчанию в .env.local)
- Создан скрипт list-dumps.sh для просмотра списка дампов
- Добавлена директория database-dumps/ для хранения дампов
- Обновлен .gitignore для исключения дампов и env файлов
- Исправлен контекст сборки в docker-compose.yml для backend
- Добавлено автоматическое ограничение количества дампов (максимум 10)