Architecture Overview
MaxTracks Web is a Flutter web application that serves as the primary dashboard for MaxShipping’s logistics operations. It connects to Firebase for backend services and is deployed via Firebase Hosting.
Technology Stack
| Layer | Technology | Version |
|---|---|---|
| Frontend Framework | Flutter (Dart) | 2.0.0 |
| State Management | Provider | 6.1.2 |
| Database | Cloud Firestore | 5.6.1 |
| Backend | Cloud Functions (Node.js) | 5.0.0 |
| Storage | Firebase Storage | 12.2.0 |
| Payments | Square API | – |
| Hosting | Firebase Hosting (CDN) | – |
| Analytics | Firebase Analytics | 11.3.0 |
High-Level Architecture
The Flutter Web App runs on Firebase Hosting (CDN) and uses Provider for state management. It connects to four Firebase services:
- Cloud Firestore – primary database for all collections
- Firebase Storage – file storage for loaded packages, prepaid docs
- Cloud Functions – backend logic, triggers, scheduled jobs
- Firebase Auth – user authentication
Cloud Functions in turn integrate with external services:
- Square API – payment processing
- Gmail (SMTP) – email notifications via Nodemailer
- Google Sheets/Drive – data import/export and reporting
Firebase Projects
| Alias | Project ID | Purpose |
|---|---|---|
| max-production | max-inventory-scanner-b0b53 | Production environment |
| maxshipping | max-shipping-development | Development/testing |
Key Dependencies
Flutter (Frontend):
firebase_core,cloud_firestore,cloud_functions– Firebase integrationqr_flutter– QR code generation for packagespdf+printing– PDF document generation and printingprovider– State management across screensgoogle_fonts– Montserrat font familyintl_phone_number_input– Phone number validationurl_launcher– External URL handling
Cloud Functions (Backend):
firebase-admin,firebase-functions– Firebase SDKgoogleapis– Google Sheets/Drive integrationnodemailer– Email dispatch (Gmail SMTP)exceljs– Excel file generationaxios+axios-retry– HTTP with retry logicbottleneck– Rate limiting for external APIslibphonenumber-js– Phone number parsing
Theming
The app uses Material Design 3 with a custom color scheme:
- Primary Color: RGB(97, 136, 186) – steel blue
- Secondary Header: RGB(18, 47, 80) – dark navy
- Font Family: Montserrat (multiple weight variants)