mnemo_cards/TODO.md

174 lines
6.7 KiB
Markdown
Raw Normal View History

- Подготовить Dockerfile и CI/CD для Dart backend под Coolify.
- Подготовить Dockerfile и CI/CD для веб/админки (статический билд + nginx/caddy).
- Завести сервисы и домены в Coolify (api/web/admin) с Traefik/LE.
- Переключить трафик, остановить legacy nginx/systemd после проверки.
# Mnemo Cards TODO List
## High Priority
### Infrastructure & Deployment
- [x] **Admin Panel Deployment**: Fixed automated CI/CD pipeline for admin panel
- Fixed directory navigation issue in `tools/deploy/admin/deploy.sh`
- Modified `check_project_root()` function to automatically navigate to `mnemo_cards_admin/web`
- **Enhanced portability**: Script can now be run from any directory within the project
- Added intelligent project root detection that searches upwards from script location
- **SSL Certificate Fix**: Resolved HTTPS certificate issue for admin.mnemo-cards.online
- Created automated SSL certificate renewal script (`tools/ssl/renew_admin_ssl.sh`)
- Obtained Let's Encrypt certificate for admin.mnemo-cards.online
- Updated nginx configuration to use HTTPS with proper SSL certificates
- Added automatic certificate renewal via cron job
- **Admin API Configuration Fix**: Fixed admin authentication API URL routing
- Created separate `adminApiClient` that always uses production backend (`https://api.mnemo-cards.online`)
- Admin authentication now correctly routes to production server instead of localhost:8000
- Prevents authentication failures during local development
- Admin panel deployment now works correctly from CI/CD pipeline and any project directory with valid HTTPS
- [x] **Telegram Bot Deployment**: Created automated CI/CD pipeline for telegram bot
- Created `deploy_bot.yaml` workflow for automated bot deployment
- Triggers on changes to `mnemo_cards_telegram_bot/**`, `mnemo_cards_common/**`, `mnemo_cards_common_backend/**`
- Compiles Dart executable and updates systemd service
- Includes proper error handling and service verification
- [ ] **Monitoring Setup**: Implement comprehensive monitoring for all services
- Application performance monitoring (APM)
- Server resource monitoring
- Service health checks
- Alerting system
- [ ] **Backup Automation**: Automated backup procedures
- Database backups
- Configuration backups
- User data backups
- Recovery testing
- [ ] **Load Testing**: Performance testing under load
- Identify bottlenecks
- Optimize resource usage
- Scalability testing
### Testing
- [ ] **Unit Test Coverage**: Expand unit test coverage
- Backend services: Target 80% coverage
- Frontend components: Target 70% coverage
- Common libraries: Target 90% coverage
- ✅ Added unit test for version display on auth page
- ✅ Refactored authentication components - need to add unit tests for SignInWithGoogleButton and SignInWithTelegram
- ✅ Added comprehensive unit tests for ThemeToggleWidget (7 test cases covering all functionality)
- ✅ Game/Test flow cleanup: removed traditional test entry, themed game page, added widget coverage for question card surfaces, exit control, and interactive-only notice; timer/progress pulled from live session state
- ✅ Game Tests package: created `games/packages/game_tests`, added `GameTestSettings`, integrated into `mnemo_cards_web_v2` settings and state manager
-**Test Page Code Quality Fix**: Fixed critical code duplication in `test_page.dart`
- Removed 700+ lines of duplicate code
- Added missing state variables and TestResult class
- Fixed deprecated method calls and compilation issues
- Restored full test functionality
-**PackDetailsHeader Code Fix**: Fixed critical structural issues in pack details header widget
- Resolved broken method structure with hanging code blocks
- Created missing `_buildTitleSection` method
- Removed undefined `cachedImage` variable usage
- Cleaned up unused imports
- Fixed all linter errors and compilation issues
- [ ] **Integration Tests**: Implement comprehensive integration testing
- API endpoint testing
- Database operations
- Service interactions
- [ ] **E2E Tests**: End-to-end testing suite
- User journey testing
- Cross-browser compatibility
- Mobile device testing
## Medium Priority
### Security
- [ ] **Security Audit**: Comprehensive security review
- Code security analysis
- Infrastructure security
- Data protection compliance
- [ ] **Advanced Security**: Enhanced security measures
- Rate limiting implementation
- Advanced firewall rules
- Intrusion detection
- Security headers optimization
### Performance
- [ ] **Frontend Optimization**: Web application performance
- Bundle size optimization
- Lazy loading implementation
- Caching strategies
- [ ] **Backend Optimization**: API performance improvements
- Database query optimization
- Caching layer implementation
- Response time optimization
### Features
- [x] **Card Voices**: Audio metadata & playback
- Isar collection for voices linked to cards
- Public API for voices list and mp3 delivery
- Web UI playback with error handling and tests
2025-12-18 19:47:17 +00:00
- [x] **Admin Card Voices**: Upload voice on card Create/Update
- Added voice uploader to card editor (upload on Save)
- Added unit tests for upsert+voice flow
- [ ] **User Experience**: Enhanced user experience features
- Offline mode support
- Progressive Web App (PWA)
- Advanced statistics and analytics
## Low Priority
### Infrastructure
- [ ] **CDN Integration**: Content delivery network
- Static asset delivery
- Global performance improvement
- Cost optimization
- [ ] **Containerization**: Docker containerization
- Development environment standardization
- Deployment consistency
- Scaling capabilities
### Documentation
- [ ] **API Documentation**: Comprehensive API docs
- OpenAPI/Swagger documentation
- Developer guides
- Integration examples
- [ ] **User Documentation**: User-facing documentation
- User guides
- FAQ section
- Video tutorials
### Analytics
- [ ] **Usage Analytics**: User behavior analysis
- Feature usage tracking
- Performance metrics
- User engagement analysis
---
## Development Guidelines
### Code Quality
- Follow established coding standards
- Implement proper error handling
- Use TypeScript/Flow for type safety
- Regular code reviews
### Testing Strategy
- Write tests before implementing features (TDD)
- Maintain test coverage above established thresholds
- Regular integration testing
- Performance regression testing
### Deployment Process
- Automated deployment pipeline
- Rollback capabilities
- Environment parity
- Zero-downtime deployments
---
*Last updated: December 6, 2025*