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

https://github.com/bitoobit/patrickmarrymobileflutter

PatrickMarryMobileFlutter
https://github.com/bitoobit/patrickmarrymobileflutter

Last synced: about 1 month ago
JSON representation

PatrickMarryMobileFlutter

Awesome Lists containing this project

README

          

# PatrickMarryFlutter

Flutter migration of the MAUI app with 1:1 logic/API/navigation parity as the
primary goal.

## Architecture

Project structure follows layered architecture:

- `lib/app` - app bootstrap, router, global app widget.
- `lib/core` - cross-cutting config, network, theme, DI helpers.
- `lib/data` - remote data sources, DTO/models, repository implementations.
- `lib/domain` - entities, repository contracts, use cases.
- `lib/features` - screen-level presentation logic and UI.
- `lib/common` - reusable UI widgets shared by multiple features.

## Key Classes (Current Stage)

### App/Navigation

- `PatrickMarryApp` (`lib/app/app.dart`)
Root app widget. Wires router, light/dark themes, and global app settings.
- `appRouterProvider` (`lib/app/router/app_router.dart`)
Route map for splash -> items/main flow and version page.

### Theme / Design System

- `AppTheme` (`lib/core/theme/app_theme.dart`)
Builds global `ThemeData` for light and dark modes; connects text theme and
palette extension.
- `AppPalette` (`lib/core/theme/app_palette.dart`)
Typed color tokens via `ThemeExtension` (`context.palette`).
- `AppSpacing` (`lib/core/theme/app_spacing.dart`)
Shared spacing scale (4/8/12/16/24/32/48).
- `AppRadii` (`lib/core/theme/app_radii.dart`)
Shared corner radius scale.
- `AppTextStyles` (`lib/core/theme/app_text_styles.dart`)
Centralized semantic text styles.

### Shared UI Components

- `AppCard` (`lib/common/widgets/app_card.dart`)
Standard card container with shared radius/background defaults.
- `AppLoader` (`lib/common/widgets/app_loader.dart`)
Unified circular loader using theme palette accent.
- `AppSkeletonBox` (`lib/common/widgets/app_skeleton_box.dart`)
Reusable shimmering/pulsing placeholder block for loading states.

### Feature: Splash

- `SplashPage` (`lib/features/splash/presentation/pages/splash_page.dart`)
Executes bootstrap logic and routes to version/items.

### Feature: Items + Main

- `ItemsPage` (`lib/features/items/presentation/pages/items_page.dart`)
Bottom navigation container (Main/Menu/Cakes/Cart/Profile).
- `MainController` (`lib/features/main/presentation/controllers/main_controller.dart`)
Riverpod async controller for main-screen data loading and refresh.
- `MainPage` (`lib/features/main/presentation/pages/main_page.dart`)
Main tab UI with MAUI-like header logo, ticker banner popup, slider cards,
loading/error/empty states.
- `MainRemoteDataSource` (`lib/data/datasources/main_remote_data_source.dart`)
Main tab API calls (`slider_offers`, `get_ticker`, `basic_parameters`).
- `MainRepository` / `MainRepositoryImpl`
Domain contract + data implementation for main tab data.
- `LoadMainDataUseCase` (`lib/domain/usecases/load_main_data_usecase.dart`)
Use-case orchestrator for main tab payload.

### Feature: Menu (categories tree)

- `MenuPage` (`lib/features/menu/presentation/pages/menu_page.dart`)
Loads root categories and reproduces nested category navigation.
- `MenuController` (`lib/features/menu/presentation/controllers/menu_controller.dart`)
Riverpod async controller for menu tree loading/refresh.
- `MenuRemoteDataSource` (`lib/data/datasources/menu_remote_data_source.dart`)
API call for `categories_with_noms`.
- `MenuRepository` / `MenuRepositoryImpl`
Domain contract + implementation mapping API models to menu entities.
- `LoadMenuTreeUseCase` (`lib/domain/usecases/load_menu_tree_usecase.dart`)
Use-case entrypoint for menu tree.

## Styling Rules (Mandatory)

- Do not hardcode colors/sizes/radius on pages when a shared token exists.
- Use:
- colors from `AppPalette` (`context.palette.*`)
- spacing from `AppSpacing`
- radius from `AppRadii`
- semantic text from `Theme.of(context).textTheme`
- For repeatable layout blocks, create/update shared widgets in `lib/common/widgets`.
- Every new shared token/component must be documented in this README.

## Clone from Git

This repository excludes build outputs, Gradle caches, CocoaPods, and generated
iOS Flutter files (`ios/Flutter/Generated.xcconfig`, `flutter_export_environment.sh`,
`Flutter.podspec`, ephemeral). After cloning:

```bash
flutter pub get
cd ios && pod install && cd ..
flutter run
```

Create `android/local.properties` with your Android SDK path if Android Studio
does not generate it (that file is ignored on purpose).

## Validation Commands

```bash
/Users/denistverdohleb/Development/Project/PatrickMobile/flutter_sdk/bin/flutter analyze
/Users/denistverdohleb/Development/Project/PatrickMobile/flutter_sdk/bin/flutter test
```