How yader1/flutter-food-ordering-app works
Project type and purpose
• This is a cross-platform full-stack mobile/desktop “Fast Food Shop” client built in Flutter.
• It uses GetX for state management & routing, communicates via REST to a Laravel backend, integrates Google Maps for address picking, Firebase (FCM) for notifications, and Laravel Echo for real-time events.
File structure
• Top-level platform folders (android, ios, web, linux, macos, windows) host native shells.
• The core app lives under /lib, organized into:
• base (shared widgets)
• controllers (GetX controllers driving UI state)
• data/api (ApiClient, API checker)
• data/repository (repository layer per feature)
• helper (DI setup, notifications)
• models (data transfer objects)
• pages & widgets (UI screens & components)
• routes (RouteHelper) and utils/constants.
• Dependencies declared in pubspec.yaml; firebase_options.dart & native google-services files show FCM.
README for insights
• Confirms GetX, GoogleMaps, Laravel Echo usage.
• Points to a separate Laravel REST backend.
a. Main components
• Client (Flutter App)
– UI Layer (Pages & Widgets)
– State/Logic Layer (GetX Controllers)
– Data Layer
· Repositories
· ApiClient (HTTP client + ApiChecker)
– Models & Helpers (DI, NotificationHelper)
• External Services
– REST API (Laravel backend + MySQL)
– Real-time channel (Laravel Echo / Pusher)
– Google Maps API
– Firebase Cloud Messaging
b. Relationships & interactions
• UI → Controller → Repository → ApiClient → Laravel REST API
• ApiClient ↔ Laravel Echo (WebSocket connection for live updates)
• Controller or Helper → Firebase FCM (push notifications)
• UI or Controller → Google Maps SDK (address picking)
c. Architectural patterns/design principles
• Layered architecture (UI → domain/controller → data → external)
• Repository pattern decouples controllers from HTTP calls
• Dependency injection in helper/dependencies.dart
• GetX for reactive state management & routing
d. Key technologies/frameworks
• Flutter & Dart
• GetX (state, DI, routing)
• http/GetConnect (ApiClient)
• GoogleMaps Flutter plugin
• firebase_messaging (FCM)
• Laravel Echo / Pusher for real-time
• Laravel REST API backend (external)
Detailed capture of essential elements
• Don’t omit the notification helper or DI setup—these are vital for FCM and controller instantiation.
• Firebase_options.dart linking native platforms to FCM.