How rohan-varghese02/travelgo_user works
Project type and purpose
• TravLGO is a cross-platform Flutter application for event discovery, booking, chat, reminders and payments.
• It targets Android, iOS, Web, macOS, Windows and Linux.
• It uses BLoC for state management, Firebase for backend services, Stripe for payments, Hive for local storage and Lottie for UI animations.
File structure
• Top-level “android”, “ios”, “windows”, “linux”, “macos”, “web” folders contain platform-specific Flutter wrappers and build configs.
• lib/core – low-level services and constants (API calls, auth, Firebase options, chat, Stripe, local storage).
• lib/data – data models (Firestore models, Hive-generated types).
• lib/features/logic – BLoC implementations grouped by domain (auth, journal, navigation, post, user).
• lib/features/view – UI screens and reusable widgets organized by feature (auth, main, pages, shared widgets).
• pubspec.yaml, firebase.json, google-services.json configure dependencies and Firebase integration.
README for insights
• Confirms core features: browsing events, booking tickets, push notifications, real-time chat, secure payments.
• Technology stack: Flutter/Dart, flutter_bloc, HTTP (REST), Stripe, Lottie, Firebase Core/Auth/Firestore, Hive.
a. Components
– Client (Flutter UI across platforms)
– Presentation Layer (Widgets in lib/features/view)
– Business Logic Layer (BLoC classes in lib/features/logic)
– Data Layer (Services in lib/core/services + Data Models in lib/data)
– Local Storage (Hive)
– Remote Services:
• Firebase Auth
• Cloud Firestore (and Firestore streams)
• RESTful API endpoints (dio/http for events listing, booking)
• Payment Gateway (Stripe / Razorpay via flutter_stripe)
• Push Notification Service (Firebase Messaging)
– External Real-Time Chat (could be Firestore streams or WebSocket server)
b. Interactions
– UI components dispatch events to BLoC → BLoC invokes core services → services call remote APIs or local storage → responses flow back through BLoC to UI.
– AuthService ↔ Firebase Auth; FirestoreService ↔ Cloud Firestore; ApiServices ↔ REST endpoints; StripeServices ↔ Stripe API; ChatServices ↔ WebSocket or Firestore streams; LocalStorage ↔ Hive.
– Push notifications configured via firebase.json and platform wrappers.
c. Architectural patterns
– Layered clean architecture style (Presentation → BLoC → Service → Data)
– BLoC state management decouples UI and business logic
– Dependency injection of services via constructors (or global providers)
– Separation of concerns: UI, logic, data models, platform integrations
d. Key technologies/frameworks
– flutter_bloc for state management
– dio/http package for REST calls
– firebase_auth, cloud_firestore, firebase_core for backend
– flutter_stripe for payments
– hive/hive_flutter for local persistence
– lottie for animations
Final recommendation
– Capture all layers from UI to external services.
– Annotate key protocols (HTTP, WebSocket, gRPC if used).
– Document any asynchronous flows (Firestore streams, push notifications).
– Iterate with developers to refine component boundaries and data pathways.