How dangvu1724/moviegoapp works
Main Components
• Frontend (Client-side): Represent the Flutter-based UI which is implemented in the "lib" directory. This includes:
• Controllers (e.g., home_controller, movie_controller, payment_controller, etc.) for business logic.
• Models (e.g., movie.dart) defining data structures.
• Screens and Pages (e.g., homepage.dart, sign_in_API.dart, movie screens, ticket screens) that provide the user interface.
• Widgets (reusable UI components like movie details, search bar, bottom app bar) that build the overall user experience.
• Custom components such as those in "CustomUI", "ForgotPassWord", and "LoginWithGoogle" for specialized functionality.
• Platform-Specific Configurations: Represent the native layer configurations for Android, iOS, Web, and desktop. This involves the android, ios, web, linux, macos, and windows directories with their respective build configuration files.
• Backend / External Services:
• Firebase: Used for authentication (Firebase Authentication) and data storage (Firestore).
• Authentication providers (Email/Password and Google login) that interact with Firebase.
• Payment integrations (via various payment methods such as Momo, Visa, MasterCard) which are part of the business logic in the controller(s) but might also interact with external payment APIs.
Relationships and Interactions
• Authentication components (both Email and Google) interact with Firebase Authentication.
• Data flows from user inputs (screen interactions) to controllers, which then trigger calls to Firebase for operations like booking tickets, viewing showtimes, or updating user profiles.
• Payment modules interact with external payment gateways before updating the booking status in Firebase.
• The mobile app’s native layers (Android, iOS, etc.) provide the runtime environment for the Flutter UI to execute and manage platform-specific functionalities.
Architectural Patterns and Design Principles
• Separation of Concerns: The project is neatly divided into UI (screens, widgets), business logic (controllers), and data models.
• Modularization: The clear division among directories like "auth", "controllers", "services", and "widgets" indicates a modular design that supports easier maintenance and scalability.
• Cross-Platform Design: Using Flutter ensures a single codebase across multiple platforms while keeping platform-specific configurations in separate directories.
• Integration with Third-Party Services: Emphasize the integration with Firebase and external payment APIs.
Relevant Technologies, Frameworks, and Libraries
• Flutter for the UI and main application logic.
• Firebase for authentication, Firestore for database needs.
• Platform-specific build tools (Gradle for Android, Xcode for iOS, etc.).
• Dependency management through pubspec.yaml.