How erknvl/mlit_sdk works
Project type and purpose
• This is an SDK (a client library), not a full‐stack app.
• Purpose: Provide a Dart/Flutter interface to MLIT’s REST APIs, with caching and functional error handling.
File structure
• lib/src/domain
• *entities* (core data models)
• *value_objects* (immutable simple types)
• *repositories* (interfaces)
• *failures* (error types)
• lib/src/application
• *services* (use‐case handlers per domain: real_estate, facilities, hazard, urban_planning)
• lib/src/infrastructure
• *config* (API client & Dio settings)
• *datasources*
– *remote* (calls MLIT REST)
– *local* (cache layer)
• *dtos* (data transfer objects matching JSON)
• *mappers* (DTO ↔ domain entity)
• *repositories* (implements domain repository interfaces)
• Entry point: createMLITSdk() in lib/mlit_sdk.dart builds MLITSdk instance and wires configuration, services, and repos.
Key README insights
• Highlights services exposed (transactionService, landPriceService, appraisalService, facilitiesService, hazardService, etc.).
• Explains caching (local data source) and error handling (Either<Failure, T>).
• Shows SDK configuration (API key, cache TTL, logging).
Essential elements
• Each component’s name and responsibility
• Distinction between interfaces and implementations
• Indication of transformation steps (JSON → DTO → Entity)
• Caching branch (Local vs. Remote)