Project KARL includes comprehensive documentation generation using Dokka. The documentation covers all public APIs, includes code examples, and provides detailed technical explanations.
./gradlew generateDocs./gradlew openDocs./gradlew cleanDocs- HTML Multi-Module: Complete documentation with cross-module linking
- Individual Module Docs: Per-module documentation available via
./gradlew :module-name:dokkaHtml
build/dokka/htmlMultiModule/
├── index.html # Main documentation index
├── karl-core/ # Core framework documentation
├── karl-kldl/ # KotlinDL engine documentation
├── karl-room/ # Room storage documentation
├── karl-compose-ui/ # Compose UI components documentation
└── navigation.html # Documentation navigationContains fundamental interfaces, data models, and APIs for the KARL framework.
- Core interfaces:
LearningEngine,KarlContainer,DataStorage,DataSource - Data models:
InteractionData,KarlContainerState,Prediction,KarlInstruction - API layer:
Karlbuilder pattern and configuration utilities
Machine learning implementation using KotlinDL for neural network computation.
KLDLLearningEngine: Main ML engine with incremental learningSimpleMLPModel: Multi-layer perceptron architecture- Privacy-first on-device training and inference
Robust data persistence layer using Android's Room database library.
RoomDataStorage: Main storage implementationKarlDao: Type-safe database operations- Entity models for container state and interaction data
Modern UI components for visualizing KARL AI containers.
KarlContainerUI: Main container visualizationKarlLearningProgressIndicator: Progress visualization- Material Design compliant with reactive state management
- API Documentation: All public classes, interfaces, and methods
- Code Examples: Usage patterns and integration examples
- Architecture Guides: Design principles and implementation details
- Cross-References: Links between related components
- Performance Considerations: Optimization notes and best practices
- Error Handling: Exception documentation and recovery strategies
- Thread Safety: Concurrency patterns and safety guarantees
- Privacy & Security: Data protection and compliance considerations
- Source Links: Direct links to GitHub source code
- External Links: Links to related documentation (Coroutines, Compose, Room)
- Search Functionality: Full-text search across all documentation
- Mobile Responsive: Documentation works on all devices
Each module includes its own Dokka configuration in build.gradle.kts:
- Module name and version
- Source links to GitHub
- External documentation links
- Package-level documentation
- KDoc Comments: Use
/** */format for all public APIs - Module Descriptions: Update
Module.mdfiles for module overviews - Code Examples: Include usage examples in KDoc
- Cross-References: Use
@seetags for related components
The documentation includes links to:
generateDocs: Generate complete multi-module documentationopenDocs: Generate and open documentation in browsercleanDocs: Clean generated documentationdokkaHtmlMultiModule: Core Dokka multi-module task:module:dokkaHtml: Generate documentation for specific module
Documentation can be automatically generated and deployed:
- name: Generate Documentation
run: ./gradlew generateDocs
- name: Deploy Documentation
# Deploy build/dokka/htmlMultiModule/ to documentation hosting- All public APIs must have KDoc comments
- Include parameter descriptions with
@param - Document return values with
@return - List exceptions with
@throws - Provide usage examples for complex APIs
Documentation generation serves as validation:
- Ensures all KDoc is syntactically correct
- Verifies cross-references are valid
- Confirms external links are accessible
- Tests code examples for compilation
The comprehensive documentation ensures Project KARL is accessible to developers at all levels, from quick integration to deep customization.