Skip to content

tyeom/flutter_basic_architecture

Repository files navigation

Flutter basic clean architecture demo app

This project is based on Flutter and implements and explains simple functions aimed at basic Clean Architecture design.

이 프로젝트는 Flutter 기반으로 기본적인 Clean Architecture 설계를 목표로한 간단한 기능이 구현 되어 있고, 설명 하고 있습니다.

Project Architecture

플러터_클린아키텍처_구조

※ Incorrect orientation of the 'Import to' arrow in the architectural diagram.
[Presentaion Module] Bloc -> [Domain Module] Use Case → [Domain Module] Use Case -> [Presentaion Module] Bloc
[Data Module] Translator -> [Domain Module] Model → [Domain Module] Model -> [Data Module] Translator

Project solution structure

├─App - App initial settings
├─Data
│ ├─data_source - API request
│ ├─network - http request module
│ ├─repository - Implementation of actual data request processing
│ ├─responses - data entity
│ └─translator - Domain layer Model Mapper
├─Domain
│ ├─models - Data Model
│ ├─repository - Business logic abstraction
│ ├─request - Data request information
│ └─usecase - Either Concepts (Left - Failure) / (Right - Success), UseCase definition
├─Injectable - Initialize injectable
├─l10n
│ └─arb
└─Presentation - UI(Login, Data List, Simple page routing, skeleton loading)
├─authentication
│ └─bloc - Authentication-related UI business logic
├─component - common widgets
├─home
│ ├─bloc - Main home UI business logic
│ └─view - Main home UI
├─login
│ ├─bloc - Login UI business logic
│ ├─forms - Login user input forms (used in the forms package)
│ └─view - Login UI
├─splash - splash UI
└─subscription_info
├─bloc
└─view

Packages

  • get_it
  • injectable
  • flutter_bloc
  • dio
  • pretty_dio_logger
  • equatable
  • dartz
  • json_annotation
  • json_serializable
  • retrofit
  • formz
  • shared_preferences
  • flutter_secure_storage
  • flutter_speed_dial
  • bottom_sheet
  • shimmer

This project implements various functions in basic app implementation.

이 프로젝트는 기본적인 앱 구현에 있어 필요한 다양한 기능들이 구현 되어 있습니다.
(반응형 UI처리, skeleton loading 효과, 다국어 처리, BLoC를 통한 상태 관리, Dio Interceptor를 통한 API Access token 인증 처리, API Access token 만료시 재발급 로직 설명 등)


how to use tha app?

Clean_Architecture_Flutter

for login use the following data

{
  "Id":"test",
  "Password":"1234"
}