How albotech405/albotaxi_v1 works
Project type and purpose
• This is a full‐stack, cross-platform ride-sharing mobile application built in Flutter.
• It supports two user roles (Customer & Driver), integrates with Supabase (Postgres, auth, realtime, storage), Firebase Cloud Messaging, Google Maps, Twilio (OTP), and uses Provider for state management.
File structure
• Top‐level “android/”, “ios/”, “web/”, “linux/”, “macos/”, “windows/” directories contain platform runners.
• “lib/” holds application code:
• main.dart (entry point)
• screens/ (UI pages grouped by feature & role)
• providers/ (state management)
• services/ (all API-calling business logic)
• models/, widgets/, utils/, constants/, config
• “supabase/” holds serverless functions and SQL migrations.
• CI/CD pipelines in “.github/workflows” and “.roocode”.
README for additional insights
• Confirms tech stack: Flutter 3.9+, Supabase backend, FCM, Google Maps, Provider.
• Mentions serverless “send_push_notification” function for welcome messages.
• Defines core features and ongoing “welcome notification” architecture.
Main components
a. Mobile App (Flutter layer)
• UI Screens (Auth, Customer, Driver, Emergency, Home, Payment)
• State Management (Provider)
• Service Layer (Dart services: auth, ride matching, payments, notifications, location, etc.)
• Config/env (.env via flutter_dotenv)
b. External Services
• Supabase
• Auth (phone + OTP)
• PostgreSQL DB (user, trip, notification tables)
• Realtime (WebSocket) for live location & trip updates
• Storage (documents & photos)
• Serverless Functions (TypeScript: send_push_notification)
• Firebase Cloud Messaging (push notifications)
• Google Maps API (maps, directions)
• Twilio (OTP SMS relay)
c. CI/CD
• GitHub Actions / RooCode pipelines for building & deploying to Android, iOS, Web, Desktop
Relationships & data flows
• User interacts with Flutter UI → triggers Provider state change → invokes Service method
• Service makes REST/gotrue calls to Supabase Auth / Database / Storage
• Service subscribes to Supabase Realtime channel for trip & driver location updates
• Service requests Google Maps Directions API for routing
• On new user signup, Supabase function triggers FCM via Firebase Admin SDK → FCM pushes to device
• Twilio OTP service invoked by AuthService for phone verification
• CI/CD pipelines pull code → run flutter build for each platform
Architectural patterns & design principles
• Layered architecture: UI → State (Provider) → Services → External APIs
• Single Responsibility: each service file encapsulates one domain concern
• Dependency Injection via Provider
• Separation of concerns between platform runners and shared Dart code
• Real-time event-driven updates via WebSockets