An open API service indexing awesome lists of open source software.

https://github.com/2gpb/avito

An iOS shopping app with paginated loading, search with filters, image caching, and shimmer effects. Supports search history, error handling, a shopping list with persistence, and sharing.
https://github.com/2gpb/avito

avito-tech swift test-task uikit

Last synced: 2 months ago
JSON representation

An iOS shopping app with paginated loading, search with filters, image caching, and shimmer effects. Supports search history, error handling, a shopping list with persistence, and sharing.

Awesome Lists containing this project

README

        

# Avito

### Project Description:
The project includes paginated product loading, a convenient search with filtering capabilities, image caching for fast loading, and a smooth shimmer effect when loading data.
It implements search query history saving, empty-state handling when no products are available or in case of a loading error, a detailed product card, and a user-friendly shopping list
with the ability to save, delete, and share products. Additionally, test support is provided to ensure the stability and reliability of the application.

### Design
[Figma Prototype](https://www.figma.com/design/XO8gGlwIRKt8AhTk6Tbdje/Test-task-Avito?node-id=0-1&t=up2szI7Bw4SPyM5g-1)

### Architecture:
**SVIP (VIPER):**

- **View** – Displays the interface and interacts with the user.
- **Interactor** – Contains the business logic of the application.
- **Presenter** – Prepares data for the user interface and implements the Router.
- **Router** – Manages screen transitions.
- **Worker** – Handles data processing and network requests.

More details about the architectural pattern: [Article](https://habr.com/ru/companies/wildberries/articles/798275/)

### Technologies

- Swift
- UIKit | UIView+Pin
- URLSession
- GCD
- UserDefaults | CoreData
- NSCache
- SOLID
- XCTest

### Functionality:
**1. Search Screen (Product Listing) ✅**
- Paginated product list
- Grid view display (2 products per row)
- Ability to filter products by category or price range
- Text search with the last 7 unique queries saved
- Empty-state when no products are available and error-state for loading failures
- Shimmer effect when loading images
- Navigation to the product card

**2. Product Card ✅**
- Displays image, title, description, price, and category
- Placeholder in case of image loading failure
- Ability to add the product to the shopping list
- Navigation to the shopping list
- Ability to increase/decrease product quantity
- Ability to share the product
- Return to the search screen

**3. Shopping List ✅**
- Displays added products with images, prices, and quantities
- Ability to change the quantity or remove a product
- Persistent shopping list across sessions
- Option to clear the entire list
- State synchronization with the search screen and product cards
- "Share" function to send the shopping list via messenger or notes
- Navigation to the product card

### Testing

**The project includes XCTest tests**

- Unit tests implemented for business logic in separate modules

### Running the Project
1. ```git clone [email protected]:2Gpb/TestTaskAvito.git```
2. Open **TestTaskAvito.xcodeproj** in Xcode
3. Run the project

# Visual









![Запись экрана 2025-02-19 в 11 45 22](https://github.com/user-attachments/assets/26cb66d5-edeb-4f7e-ae4c-38768280ba6c)
![Запись экрана 2025-02-19 в 12 01 31](https://github.com/user-attachments/assets/58a09591-070f-4503-9122-36ad5a831fbd)