How tbiyiktas/cleannetkit works
Project Type & Purpose
• This is an Android application (“app” module) showcasing and exercising a production-ready, clean-architecture network layer (“lib/net”) called CleanNetKit.
• It follows SOLID principles and CQRS-style use cases to give Android developers a Room-like ergonomics for HTTP calls, with retry/backoff strategies, pluggable interceptors, commands, and cancellable futures.
File Structure Analysis
• Top-Level: gradle scripts, settings.gradle.kts, README.md
• “app” module
• UI Layer: Activities under src/main/java/com/example/cleannetkit (MainActivity, CreateTodoActivity, etc.) + layouts in res/layout
• Domain Layer: interfaces/use cases under domain/posts and domain/todo
• Application Layer: service implementations under application/service (posts, todo, upload)
• Data Layer: remote DTOs and mappers under data/remote/dto
• API Layer: PostsApi, TodoApi, UploadApi under application/api
• “lib/net” package under app/src/main/java:
• Core NetworkManager, ABaseApi, AHttpClient
• Command Pattern: GetCommand, PostCommand, etc.
• Interceptors, Parsers (GsonResponseParser)
• Strategy Pattern: retry/backoff policies, request configurators, body writers
README Insights
• Emphasizes Clean Architecture integration: UI → UseCases → Services → API → NetworkCore → HTTP
• Highlights pluggable strategies, CancellableFuture, retry policies, backoff algorithms, Upload support
Essential Details to Capture
• UseCase to its Service and Api class
• How commands propagate through NetworkManager to the HTTP adapter
• Retry/backoff strategy injection points
• DTO → domain model mapping step
• Cancellation flow back to UI