# Plan B Logistics - Flutter Mobile App

A complete Flutter/Dart refactoring of the Plan B Logistics delivery management system. Built with Material Design 3, Svrnty brand colors, and CQRS architecture for type-safe API integration.

## Overview

This is a mobile delivery management application for logistics personnel to:
- View assigned delivery routes with progress tracking
- Manage individual deliveries (complete, uncomplete, skip)
- Capture photos as delivery proof
- Call customers and navigate to delivery addresses
- Manage app settings and language preferences
- Secure authentication via OAuth2/OIDC with Keycloak

**Built with:**
- Flutter 3.9+ / Dart 3.9.2+
- Material Design 3 with Svrnty theming (Crimson & Slate Blue)
- Riverpod for state management
- CQRS pattern with Result<T> error handling
- Strict typing (no `dynamic`)

## Quick Start

### Prerequisites

- Flutter SDK 3.9.2+: [Install Flutter](https://flutter.dev/docs/get-started/install)
- Dart SDK 3.9.2+ (included with Flutter)

### Setup

```bash
cd ionic-planb-logistic-app-flutter
flutter pub get
```

### Run

```bash
flutter run                # Android/iOS default device
flutter run -d chrome      # Web
flutter run -d ios         # iOS simulator
flutter run -d android     # Android emulator
```

## Project Structure

```
lib/
├── api/              # CQRS client & types
├── models/           # Data models
├── services/         # Auth service
├── providers/        # Riverpod state
├── pages/            # Login, Routes, Deliveries, Settings
├── l10n/             # Translations (EN/FR)
├── theme.dart        # Svrnty Material Design 3
└── main.dart         # Entry point
```

## Key Features

- **OAuth2/OIDC Authentication** with Keycloak
- **CQRS API Integration** with Result<T> error handling
- **Riverpod State Management** for reactive UI
- **Internationalization** (English & French)
- **Material Design 3** with Svrnty brand colors
- **Native Features**: Camera, Phone calls, Maps
- **Strict Typing**: No `dynamic` type allowed

## Development

See **[CLAUDE.md](CLAUDE.md)** for:
- Detailed architecture & patterns
- Code standards & conventions
- API integration examples
- Development workflow

## Build Commands

```bash
flutter build web --release        # Web
flutter build ios --release         # iOS
flutter build appbundle --release   # Android (Play Store)
```

## Documentation

- **CLAUDE.md** - Complete development guidelines
- **pubspec.yaml** - Dependencies and configuration
- **[Flutter Docs](https://flutter.dev/docs)** - Official documentation

## Version

1.0.0+1

---

Svrnty Edition
