Skip to content

burakodaloglu/ProductsApp

Repository files navigation

Products App Clean Architecture

This repository contains the Products App, a clean architecture project built with Flutter. The app demonstrates a clean and maintainable code structure, focusing on modularity and scalability.

Clean Architecture Overview

Project Structure

The project follows a well-defined folder structure to ensure code maintainability and clarity:

Root Structure

lib/
├── config/
│   ├── routes/
│   │   └── router.dart
│   ├── theme/
│       └── app_theme.dart
├── core/
│   ├── constants/
│   │   └── constants.dart
│   ├── resources/
│   │   └── data_state.dart
│   ├── usecase/
│   │   └── usecase.dart
│   ├── util/
│       ├── converter/
│           └── rating_converter.dart
├── features/
│   ├── products/
│   │   ├── data/
│   │   │   ├── model/
│   │   │   │   ├── products.dart
│   │   │   │   └── rating.dart
│   │   │   ├── repository/
│   │   │   │   └── products_repository_impl.dart
│   │   │   ├── sources/
│   │   │       ├── local/
│   │   │       │   ├── app_database.dart
│   │   │       │   ├── app_database.g.dart
│   │   │       │   └── dao/
│   │   │       │       └── products_dao.dart
│   │   │       ├── remote/
│   │   │           ├── products_api_service.dart
│   │   │           └── products_api_service.g.dart
│   │   ├── domain/
│   │   │   ├── entities/
│   │   │   │   └── products.dart
│   │   │   ├── repository/
│   │   │   │   └── products_repository.dart
│   │   │   ├── usecase/
│   │   │       ├── delete_product_use_case.dart
│   │   │       ├── get_products_use_case.dart
│   │   │       ├── get_saved_use_case.dart
│   │   │       └── save_product_use_case.dart
│   │   ├── presentation/
│   │       ├── bloc/
│   │       │   ├── products/
│   │       │       ├── local/
│   │       │       │   ├── local_products_bloc.dart
│   │       │       │   ├── local_products_event.dart
│   │       │       │   └── local_products_state.dart
│   │       │       ├── remote/
│   │       │           ├── remote_products_bloc.dart
│   │       │           ├── remote_products_event.dart
│   │       │           └── remote_products_state.dart
│   │       ├── pages/
│   │       │   ├── cart/
│   │       │   │   └── cart_product_screen.dart
│   │       │   ├── detail/
│   │       │   │   └── product_detail_screen.dart
│   │       │   ├── home/
│   │       │       └── products_screen.dart
│   │       ├── widgets/
│   │           ├── appbar_widget.dart
│   │           ├── cart_widget.dart
│   │           └── products_widget.dart
├── injection_container.dart
├── main.dart

Technologies Used

This project leverages the following dependencies and tools:

Dependencies

Dev Dependencies

Key Features

  • Clean Architecture: Adopts a structured approach to separate concerns into layers.
  • State Management: Utilizes flutter_bloc for efficient state management.
  • Data Persistence: Implements the floor library for local database management.
  • API Integration: Integrates RESTful APIs using dio and retrofit_generator.
  • Routing: Efficient navigation using go_router.
  • Responsive UI: Modular widget system to ensure adaptability across devices.

Preview

Screenshots

Getting Started

  1. Clone the repository:

    git clone https://github.com/your-username/ProductsAppCleanArchitecture.git
    cd ProductsAppCleanArchitecture
  2. Install dependencies:

    flutter pub get
  3. Run the app:

    flutter run

Feel free to contribute, raise issues, or suggest improvements for this project! 🚀