diff --git a/data/src/main/java/com/homebox/lens/data/api/mapper/TokenMapper.kt b/data/src/main/java/com/homebox/lens/data/api/mapper/TokenMapper.kt new file mode 100644 index 0000000..6a28cc0 --- /dev/null +++ b/data/src/main/java/com/homebox/lens/data/api/mapper/TokenMapper.kt @@ -0,0 +1,4 @@ +package com.homebox.lens.data.api.mapper + +class TokenMapper { +} \ No newline at end of file diff --git a/data/src/main/java/com/homebox/lens/data/api/model/LoginRequest.kt b/data/src/main/java/com/homebox/lens/data/api/model/LoginRequest.kt new file mode 100644 index 0000000..e97ba2f --- /dev/null +++ b/data/src/main/java/com/homebox/lens/data/api/model/LoginRequest.kt @@ -0,0 +1,29 @@ +// [PACKAGE] com.homebox.lens.data.api.model +// [FILE] LoginRequest.kt +// [SEMANTICS] dto, network, serialization, authentication + +package com.homebox.lens.data.api + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * [ENTITY: DataClass('LoginRequest')] + * [CONTRACT] + * DTO (Data Transfer Object) для запроса на аутентификацию. + * @property username Имя пользователя. + * @property password Пароль пользователя. + * @invariant Свойства не должны быть пустыми. + */ +@JsonClass(generateAdapter = true) +data class LoginRequest( + @Json(name = "username") val username: String, + @Json(name = "password") val password: String +) { + init { + // [INVARIANT_CHECK] + require(username.isNotBlank()) { "[INVARIANT_FAILED] Username cannot be blank." } + require(password.isNotBlank()) { "[INVARIANT_FAILED] Password cannot be blank." } + } +} +// [END_FILE_LoginRequest.kt] \ No newline at end of file diff --git a/data/src/main/java/com/homebox/lens/data/repository/EncryptedPreferencesWrapper.kt b/data/src/main/java/com/homebox/lens/data/repository/EncryptedPreferencesWrapper.kt new file mode 100644 index 0000000..aa7d460 --- /dev/null +++ b/data/src/main/java/com/homebox/lens/data/repository/EncryptedPreferencesWrapper.kt @@ -0,0 +1,4 @@ +package com.homebox.lens.data.repository + +class EncryptedPreferencesWrapper { +} \ No newline at end of file diff --git a/data/src/main/java/com/homebox/lens/data/security/CryptoManager.kt b/data/src/main/java/com/homebox/lens/data/security/CryptoManager.kt new file mode 100644 index 0000000..de7b5c9 --- /dev/null +++ b/data/src/main/java/com/homebox/lens/data/security/CryptoManager.kt @@ -0,0 +1,4 @@ +package com.homebox.lens.data.security + +class CryptoManager { +} \ No newline at end of file diff --git a/domain/src/main/java/com/homebox/lens/domain/model/TokenResponse.kt b/domain/src/main/java/com/homebox/lens/domain/model/TokenResponse.kt new file mode 100644 index 0000000..80f030c --- /dev/null +++ b/domain/src/main/java/com/homebox/lens/domain/model/TokenResponse.kt @@ -0,0 +1,4 @@ +package com.homebox.lens.domain.model + +class TokenResponse { +} \ No newline at end of file diff --git a/tech_spec/project_structure.txt b/tech_spec/project_structure.txt index 15af92e..fe0154b 100644 --- a/tech_spec/project_structure.txt +++ b/tech_spec/project_structure.txt @@ -17,52 +17,52 @@ Defines the routes for all screens in the app as a sealed class. - + UI for the Dashboard screen. - + ViewModel for the Dashboard screen, handles business logic. - + UI for the Inventory List screen. - + ViewModel for the Inventory List screen. - + UI for the Item Details screen. - + ViewModel for the Item Details screen. - + UI for the Item Edit screen. - + ViewModel for the Item Edit screen. - + UI for the Labels List screen. - + ViewModel for the Labels List screen. - + UI for the Locations List screen. - + ViewModel for the Locations List screen. - + UI for the Search screen. - + ViewModel for the Search screen. - + UI for the Setup screen. - + ViewModel for the Setup screen. diff --git a/tech_spec/tech_spec.txt b/tech_spec/tech_spec.txt index e92b749..c4bde20 100644 --- a/tech_spec/tech_spec.txt +++ b/tech_spec/tech_spec.txt @@ -5,8 +5,15 @@ An Android client for the Homebox inventory management system. It allows users to manage their inventory by interacting with a Homebox server instance. + + + Logging Library + The project uses Timber (timber.log.Timber) for all logging purposes. It provides a simple and extensible API for logging. + + + - + Dashboard Screen Displays a summary of the inventory, including statistics like total items, total value, and counts by location/label. @@ -19,7 +26,7 @@ - + Inventory List Screen Displays a searchable and filterable list of all inventory items. @@ -37,7 +44,7 @@ - + Item Details Screen Shows all details for a single inventory item, including its name, description, images, attachments, and custom fields. @@ -50,7 +57,7 @@ - + Create/Edit/Delete Items Allows users to create new items, update existing ones, and delete them. @@ -73,7 +80,7 @@ - + Manage Labels and Locations Allows users to view lists of all available labels and locations. @@ -92,7 +99,7 @@ - + Search Screen Provides a dedicated UI for searching items.