Welcome to the IReader developer documentation! This directory contains comprehensive guides for developers working on the IReader project.
-
ARCHITECTURE.md - Complete architecture guide
- Clean Architecture principles
- Module structure and responsibilities
- Layer boundaries and dependency rules
- Development guidelines and best practices
- Code organization patterns
- Testing strategies
-
MODULE_DEPENDENCIES.md - Module dependency documentation
- Detailed dependency graph
- Module overview and responsibilities
- Allowed and forbidden dependencies
- External dependency categories
- Troubleshooting dependency issues
- BUILD_OPTIMIZATION.md - Build configuration guide
- Version catalog structure
- Dependency management
- Build performance optimizations
- Common build configurations
- Start with ARCHITECTURE.md to understand the project structure
- Review MODULE_DEPENDENCIES.md to understand module relationships
- Check BUILD_OPTIMIZATION.md for build setup
- Review the architecture guide for layer responsibilities
- Follow the "Adding a New Feature" section in ARCHITECTURE.md
- Ensure your code follows clean architecture principles
- Add tests for your feature
- Document public APIs with KDoc
- Check BUILD_OPTIMIZATION.md troubleshooting section
- Review MODULE_DEPENDENCIES.md for dependency conflicts
- Use Gradle commands to analyze dependencies
IReader follows Clean Architecture with three main layers:
Presentation → Domain → Data
- Domain: Business logic, use cases, repository interfaces
- Data: Repository implementations, database, network
- Presentation: UI, ViewModels, Compose screens
:android, :desktop # Platform entry points
:presentation # UI layer
:domain # Business logic
:data # Data access
:core # Shared utilities
:source-api # Extension API
:i18n # Localization
✅ Allowed: Presentation → Domain, Data → Domain ❌ Forbidden: Domain → Presentation, Domain → Data
# View module structure
ls -la
# Check dependencies
./gradlew :domain:dependencies
# Run tests
./gradlew test- Identify the appropriate layer (domain/data/presentation)
- Follow existing patterns in that layer
- Write tests for your changes
- Document public APIs with KDoc
- Ensure clean architecture principles are followed
# Run all tests
./gradlew test
# Run specific module tests
./gradlew :domain:test
# Run with coverage
./gradlew testDebugUnitTest jacocoTestReport# Clean build
./gradlew clean build
# Build specific variant
./gradlew assembleDebug
# Build desktop
./gradlew :desktop:packageDistributionForCurrentOSAll public APIs in the domain layer should have KDoc comments:
/**
* Brief description of the class or function.
*
* Detailed explanation if needed.
*
* @param paramName Description of parameter
* @return Description of return value
* @throws ExceptionType When this exception is thrown
*/- Use comments to explain "why", not "what"
- Keep comments up-to-date with code changes
- Remove commented-out code
- Use TODO comments for future improvements
When making significant changes:
- Update relevant documentation files
- Add examples if introducing new patterns
- Update architecture diagrams if structure changes
- Keep documentation in sync with code
- Architecture: ARCHITECTURE.md
- Dependencies: MODULE_DEPENDENCIES.md
- Build: BUILD_OPTIMIZATION.md
- Features: Feature-specific guides
Each module's responsibilities are documented in:
- ARCHITECTURE.md (Module Structure section)
- MODULE_DEPENDENCIES.md (Module Overview section)
Layer-specific guidelines are in:
- ARCHITECTURE.md (Layer Responsibilities section)
- Keep documentation clear and concise
- Use examples to illustrate concepts
- Update documentation with code changes
- Follow existing documentation style
- Follow clean architecture principles
- Write tests for new features
- Document public APIs
- Update relevant documentation
- Follow Kotlin coding conventions
-
Where should my code go?
- See ARCHITECTURE.md "Layer Responsibilities"
-
How do I add a dependency?
- See BUILD_OPTIMIZATION.md "Adding New Dependencies"
-
Why is my build failing?
- See BUILD_OPTIMIZATION.md "Troubleshooting"
-
How do I test my feature?
- See ARCHITECTURE.md "Testing Strategy"
- Review and update documentation quarterly
- Keep examples current with latest code
- Update metrics and benchmarks
- Add new patterns as they emerge
- 1.0 (2025-11-13): Initial comprehensive documentation
- Architecture guide
- Module dependencies
- Build optimization
- Developer guides
Questions or suggestions? Open an issue or submit a PR to improve this documentation!