|
| 1 | +# KMMtg Improvement Tasks |
| 2 | + |
| 3 | +This document contains a prioritized list of actionable improvement tasks for the KMMtg project. Each task is designed to enhance the project's architecture, code quality, or functionality. |
| 4 | + |
| 5 | +## Architecture Improvements |
| 6 | + |
| 7 | +1. [ ] Complete Android support in all modules |
| 8 | + - Fix Android configuration in scryfall module |
| 9 | + - Uncomment and fix Android-specific code in build.gradle.kts files |
| 10 | + - Implement Android-specific database drivers |
| 11 | + |
| 12 | +2. [ ] Implement proper multiplatform support for collection-import module |
| 13 | + - Research alternatives to kotlin-csv that support iOS |
| 14 | + - Implement iOS-specific file handling |
| 15 | + |
| 16 | +3. [ ] Implement a proper dependency injection framework across all modules |
| 17 | + - Standardize Koin usage across all modules |
| 18 | + - Create module definitions for each module |
| 19 | + |
| 20 | +4. [ ] Implement a comprehensive error handling strategy |
| 21 | + - Standardize error types and handling across modules |
| 22 | + - Improve error messages and logging |
| 23 | + |
| 24 | +5. [ ] Implement a proper user authentication and authorization system |
| 25 | + - Complete User table implementation |
| 26 | + - Add password/authentication fields |
| 27 | + - Implement token-based authentication |
| 28 | + |
| 29 | +## Database Improvements |
| 30 | + |
| 31 | +6. [ ] Enhance Card schema with additional attributes |
| 32 | + - Add mana cost, card type, rarity, and other important MTG card attributes |
| 33 | + - Update queries to support filtering by these attributes |
| 34 | + |
| 35 | +7. [ ] Complete User-Deck relationship implementation |
| 36 | + - Uncomment and implement user_id foreign key in Deck table |
| 37 | + - Implement user-specific deck queries |
| 38 | + |
| 39 | +8. [ ] Add query to update card quantity in a deck |
| 40 | + - Implement updateCardQuantityInDeck query in DeckCard.sq |
| 41 | + |
| 42 | +9. [ ] Implement database migrations strategy |
| 43 | + - Add versioning to database schema |
| 44 | + - Create migration scripts for future schema changes |
| 45 | + |
| 46 | +## API Improvements |
| 47 | + |
| 48 | +10. [ ] Expand Scryfall API coverage |
| 49 | + - Implement additional endpoints (card by ID, random card, etc.) |
| 50 | + - Add support for advanced search parameters |
| 51 | + |
| 52 | +11. [ ] Implement pagination handling for Scryfall API responses |
| 53 | + - Add support for retrieving multiple pages of results |
| 54 | + - Implement a paging mechanism for large result sets |
| 55 | + |
| 56 | +12. [ ] Add caching for Scryfall API responses |
| 57 | + - Implement a caching strategy to reduce API calls |
| 58 | + - Add TTL (time-to-live) for cached responses |
| 59 | + |
| 60 | +## Testing and Documentation |
| 61 | + |
| 62 | +13. [ ] Implement comprehensive unit tests for all modules |
| 63 | + - Add tests for database operations |
| 64 | + - Add tests for API client |
| 65 | + - Add tests for collection import/export |
| 66 | + |
| 67 | +14. [ ] Implement integration tests |
| 68 | + - Add tests for interactions between modules |
| 69 | + - Add end-to-end tests for key user flows |
| 70 | + |
| 71 | +15. [ ] Add KDoc documentation to all public APIs |
| 72 | + - Document all public classes, interfaces, and functions |
| 73 | + - Include examples where appropriate |
| 74 | + |
| 75 | +16. [ ] Create user documentation |
| 76 | + - Add usage examples for CLI |
| 77 | + - Document supported file formats for collection import/export |
| 78 | + |
| 79 | +## Code Quality Improvements |
| 80 | + |
| 81 | +17. [ ] Replace non-null assertions (!!) with proper null handling |
| 82 | + - Use Elvis operator (?:) or other null-safe approaches |
| 83 | + - Add validation to prevent null pointer exceptions |
| 84 | + |
| 85 | +18. [ ] Implement proper logging throughout the application |
| 86 | + - Standardize logging approach |
| 87 | + - Add appropriate log levels for different types of messages |
| 88 | + |
| 89 | +19. [ ] Add input validation for all user inputs |
| 90 | + - Validate CSV file formats |
| 91 | + - Validate deck construction rules |
| 92 | + |
| 93 | +20. [ ] Implement proper exception handling |
| 94 | + - Replace generic error messages with specific ones |
| 95 | + - Add context to error messages |
| 96 | + |
| 97 | +## Feature Improvements |
| 98 | + |
| 99 | +21. [ ] Add support for additional collection import/export formats |
| 100 | + - Support more popular MTG collection management tools |
| 101 | + - Implement a plugin system for custom formats |
| 102 | + |
| 103 | +22. [ ] Implement deck validation against format rules |
| 104 | + - Add support for checking deck legality in different formats |
| 105 | + - Implement card legality checking |
| 106 | + |
| 107 | +23. [ ] Add support for card pricing information |
| 108 | + - Integrate with pricing APIs |
| 109 | + - Add price tracking for collections |
| 110 | + |
| 111 | +24. [ ] Enhance CLI with more interactive features |
| 112 | + - Implement autocomplete for card names |
| 113 | + - Add visual card representation in terminal |
0 commit comments