How samsongulma/ilink-online-market-place-mobile-application works
Project type and purpose
• This is a cross-platform mobile application built with Flutter and Dart.
• It serves as a “Customer-Service-Handler” storefront: users browse products, view details, add to cart, authenticate, and maintain profiles.
• The back-end is entirely handled by Google Firebase (Firestore for data, Firebase Auth for user management), supplemented by local storage (SharedPreferences).
File structure
• Top-level files:
• main.dart – application entry point.
• pubspec.yaml / pubspec.lock – Flutter dependencies and asset declarations.
• README.md – project overview.
• Directories:
• Admin/ – screens for administrator login and home (Admin role).
• userPages/ – user-facing screens (login, signup, home, details, posting, wish cart, profile, forgot password).
• service/ – data layer: database.dart (wraps Firestore calls), shared_pref.dart (wraps local SharedPreferences).
• widget/ – reusable UI components (widget_support.dart).
• assets/ – fonts and images used in the UI.
README
• Confirms Firebase Firestore as the database, Firebase Auth for authentication.
• Outlines features: product listing, details, cart, user authentication.
• Provides setup instructions for integrating google-services.json or GoogleService-Info.plist.
Main components and their interactions
a. Mobile Client (Flutter)
• UI Layer:
• Pages (in Admin/ and userPages/)
• Reusable Widgets (widget/)
• Business Logic / Service Layer (service/)
• Database service: CRUD operations on Firestore.
• SharedPref service: local caching of tokens or user settings.
b. External Services
• Firebase Firestore: stores product, user profile, cart data.
• Firebase Auth: handles sign-up, login, session.
c. Assets & Local Storage
• Local fonts/images (assets/) loaded by Flutter.
• SharedPreferences for offline caching and quick retrieval.
Architectural patterns & design principles
• Layered Architecture:
• Presentation (UI pages, widgets)
• Domain/Service (service layer abstracting Firebase and local storage)
• Data (Firestore + SharedPreferences)
• Single code base for both user and admin roles – role-based routing managed in main.dart.
• Dependency injection possible via passing service instances to pages (not shown but recommended).