From c867133c6b3ec17b196240463a03a1957aeb05d3 Mon Sep 17 00:00:00 2001 From: Thatsaphorn Atchariyaphap Date: Tue, 23 Sep 2025 22:06:35 +0200 Subject: [PATCH] Update README with project structure and Clean Architecture overview --- finlog_app/app/README.md | 50 ++++++++++++++++++++++++++++++++-------- 1 file changed, 40 insertions(+), 10 deletions(-) diff --git a/finlog_app/app/README.md b/finlog_app/app/README.md index b73cfb0..0deb2d3 100644 --- a/finlog_app/app/README.md +++ b/finlog_app/app/README.md @@ -1,16 +1,46 @@ -# app +# Project Structure -A new Flutter project. +The project follows a **Clean Architecture inspired** structure with clear separation into **app**, **core**, and * +*features**. -## Getting Started +```text +lib/ + app/ → app-wide modules (theme, router, DI, env) + router.dart → global routing (go_router) + theme.dart → app theme and styling + di.dart → dependency injection (providers, locator) -This project is a starting point for a Flutter application. + core/ → shared, generic & stable components + network/ → Dio client, interceptors + storage/ → secure/local storage abstractions + error/ → Failure, AppException, guards + utils/ → formatters, validators, helpers + result.dart → Either/Result type -A few resources to get you started if this is your first Flutter project: + features/ + inventory/ + data/ + models/ → DTOs (Json) + sources/ → remote/local data sources + repositories/ → implementations (InventoryRepositoryImpl) + domain/ + entities/ → pure Dart objects (business entities) + repositories/ → abstract definitions (InventoryRepository) + usecases/ → business logic (AddItem, ScanBarcode, …) + presentation/ + pages/ + inventory_page.dart + add_item_page.dart + controllers/ → state management (Riverpod/BLoC) & presenters + widgets/ → feature-specific UI components + inventory_routes.dart → go_router routes for this feature -- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) -- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) + budget/ → same structure as inventory + expenses/ → same structure as inventory + auth/ → same structure as inventory -For help getting started with Flutter development, view the -[online documentation](https://docs.flutter.dev/), which offers tutorials, -samples, guidance on mobile development, and a full API reference. + main.dart → application entry point +``` +# Layered Flow + +Data Source → Repository Impl → Repository Abstraction → UseCase → Controller → UI (Pages/Widgets)