{"id":18928652,"url":"https://github.com/hamidhosen42/buynjoy","last_synced_at":"2026-05-05T03:39:31.665Z","repository":{"id":207718485,"uuid":"711242245","full_name":"hamidhosen42/BuyNJoy","owner":"hamidhosen42","description":null,"archived":false,"fork":false,"pushed_at":"2024-09-30T15:44:37.000Z","size":49894,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-31T19:16:50.851Z","etag":null,"topics":["cloude","dart","firbase","firebase-auth","flutter","payment-gateway"],"latest_commit_sha":null,"homepage":"https://www.figma.com/design/LnCQmogcpOCwhcicXOmeJA/ShopSavvy?node-id=11-197\u0026node-type=frame\u0026t=cYFef7qytJDYoAIp-0","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hamidhosen42.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-28T16:31:31.000Z","updated_at":"2024-09-30T15:47:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"bd872937-803e-4f2f-bcbd-d3a9ea99466b","html_url":"https://github.com/hamidhosen42/BuyNJoy","commit_stats":null,"previous_names":["hamidhosen42/shopsavvy","hamidhosen42/buynjoy"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamidhosen42%2FBuyNJoy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamidhosen42%2FBuyNJoy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamidhosen42%2FBuyNJoy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hamidhosen42%2FBuyNJoy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hamidhosen42","download_url":"https://codeload.github.com/hamidhosen42/BuyNJoy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239923819,"owners_count":19719201,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloude","dart","firbase","firebase-auth","flutter","payment-gateway"],"created_at":"2024-11-08T11:26:55.558Z","updated_at":"2026-03-15T22:30:17.426Z","avatar_url":"https://github.com/hamidhosen42.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"Here is a Flutter MVC folder structure for an e-commerce app using GetX, Firebase, push notifications, Google Maps, dark and light theme, Google Ads, animations, and a payment method with order by product functionality, along with example code for each major component:\n\n\n```\nlib/\n├── controllers/\n│   ├── auth_controller.dart           // Handles authentication (Firebase Auth)\n│   ├── cart_controller.dart           // Manages shopping cart\n│   ├── product_controller.dart        // Handles product logic and ordering\n│   ├── order_controller.dart          // Manages orders, tracking, payments\n│   ├── user_controller.dart           // Handles user profile, address data\n│   ├── map_controller.dart            // Google Maps for user location and delivery\n│   ├── notification_controller.dart   // Firebase push notifications\n│   ├── theme_controller.dart          // Light/Dark theme management\n│   ├── payment_controller.dart        // Manages payment methods (e.g., Stripe)\n│   └── ad_controller.dart             // Google Ads integration\n├── models/\n│   ├── user_model.dart                // User data model\n│   ├── product_model.dart             // Product data model\n│   ├── cart_model.dart                // Cart data model\n│   ├── order_model.dart               // Order data model\n│   ├── address_model.dart             // Address model for Google Maps\n│   └── notification_model.dart        // Push notification model\n├── views/\n│   ├── auth/\n│   │   ├── login_view.dart            // Login page UI\n│   │   └── signup_view.dart           // Signup page UI\n│   ├── home/\n│   │   ├── home_view.dart             // Home page for product listings\n│   │   └── product_detail_view.dart   // Product details and purchase\n│   ├── cart/\n│   │   ├── cart_view.dart             // Shopping cart view\n│   │   └── checkout_view.dart         // Checkout and payment\n│   ├── orders/\n│   │   ├── order_list_view.dart       // View for user's orders\n│   │   └── order_detail_view.dart     // Detailed order tracking\n│   ├── user/\n│   │   ├── profile_view.dart          // User profile page\n│   │   └── address_view.dart          // Address management with Google Maps\n│   ├── ads/\n│   │   └── google_ads_view.dart       // Google Ads banner and interstitials\n│   ├── notifications/\n│   │   └── notifications_view.dart    // Notification center\n│   └── theme/\n│       └── theme_toggle_view.dart     // Toggle between dark and light themes\n├── bindings/\n│   ├── initial_bindings.dart          // Initial bindings (e.g., AuthController)\n│   ├── home_bindings.dart             // Bindings for home, cart, product pages\n│   ├── order_bindings.dart            // Bindings for order pages\n│   └── map_bindings.dart              // Google Maps-related bindings\n├── services/\n│   ├── firebase_service.dart          // Firebase integration (Auth, Firestore, etc.)\n│   ├── push_notification_service.dart // Firebase Cloud Messaging for push notifications\n│   ├── map_service.dart               // Google Maps API integration\n│   ├── payment_service.dart           // Stripe or other payment provider integration\n│   └── ad_service.dart                // Google Ads service\n├── utils/\n│   ├── constants.dart                 // Constant values, API keys, endpoints, etc.\n│   ├── routes.dart                    // Route management for the app\n│   ├── theme.dart                     // Dark and light theme definitions\n│   └── animations.dart                // Animation helpers and presets\n├── widgets/\n│   ├── custom_button.dart             // Reusable button widget\n│   ├── product_card.dart              // Product card widget for list views\n│   ├── order_card.dart                // Order summary card\n│   ├── theme_toggle.dart              // Widget to toggle dark/light theme\n│   └── google_ad_widget.dart          // Google Ad widget\n├── main.dart                          // App entry point\n└── app_pages.dart                     // App routes and page bindings\n```\n\n\nauth_controller.dart\n\n```\nimport 'package:get/get.dart';\nimport 'package:firebase_auth/firebase_auth.dart';\n\nclass AuthController extends GetxController {\n  FirebaseAuth _auth = FirebaseAuth.instance;\n  Rx\u003cUser?\u003e firebaseUser = Rx\u003cUser?\u003e(null);\n\n  @override\n  void onReady() {\n    firebaseUser.bindStream(_auth.authStateChanges());\n    super.onReady();\n  }\n\n  void signIn(String email, String password) async {\n    try {\n      await _auth.signInWithEmailAndPassword(email: email, password: password);\n    } catch (e) {\n      Get.snackbar(\"Error\", e.toString());\n    }\n  }\n\n  void signOut() async {\n    await _auth.signOut();\n  }\n}\n```\n\nproduct_controller.dart\n\n```\nimport 'package:get/get.dart';\nimport '../models/product_model.dart';\n\nclass ProductController extends GetxController {\n  var products = List\u003cProductModel\u003e.empty().obs;\n  var isLoading = true.obs;\n\n  @override\n  void onInit() {\n    fetchProducts();\n    super.onInit();\n  }\n\n  void fetchProducts() async {\n    // Fetch products from Firebase Firestore or API\n    try {\n      isLoading(true);\n      var productResult = await FirebaseService().getProducts();\n      products.value = productResult;\n    } finally {\n      isLoading(false);\n    }\n  }\n\n  void orderByPriceAsc() {\n    products.sort((a, b) =\u003e a.price.compareTo(b.price));\n  }\n}\n```\n\ntheme_controller.dart\n\n```\nimport 'package:get/get.dart';\nimport 'package:flutter/material.dart';\nimport '../utils/theme.dart';\n\nclass ThemeController extends GetxController {\n  var isDarkMode = false.obs;\n\n  ThemeData get theme =\u003e isDarkMode.value ? darkTheme : lightTheme;\n\n  void toggleTheme() {\n    isDarkMode.value = !isDarkMode.value;\n    Get.changeTheme(theme);\n  }\n}\n\n```\n\npush_notification_service.dart\n\n```\nimport 'package:firebase_messaging/firebase_messaging.dart';\n\nclass PushNotificationService {\n  final FirebaseMessaging _fcm = FirebaseMessaging.instance;\n\n  Future\u003cvoid\u003e init() async {\n    _fcm.requestPermission();\n    String? token = await _fcm.getToken();\n    print(\"FCM Token: $token\");\n\n    FirebaseMessaging.onMessage.listen((RemoteMessage message) {\n      print(\"Message received: ${message.notification!.title}\");\n    });\n  }\n}\n```\n\nmap_controller.dart\n\n```\nimport 'package:get/get.dart';\nimport 'package:google_maps_flutter/google_maps_flutter.dart';\n\nclass MapController extends GetxController {\n  GoogleMapController? mapController;\n  Rx\u003cLatLng\u003e currentLocation = LatLng(0, 0).obs;\n\n  void setMapController(GoogleMapController controller) {\n    mapController = controller;\n  }\n\n  void updateLocation(LatLng newLocation) {\n    currentLocation.value = newLocation;\n    mapController?.moveCamera(CameraUpdate.newLatLng(newLocation));\n  }\n}\n\n```\n\nad_controller.dart\n\n```\nimport 'package:get/get.dart';\nimport 'package:google_mobile_ads/google_mobile_ads.dart';\n\nclass AdController extends GetxController {\n  BannerAd? bannerAd;\n\n  @override\n  void onInit() {\n    bannerAd = BannerAd(\n      size: AdSize.banner,\n      adUnitId: '\u003cyour_ad_unit_id\u003e',\n      listener: BannerAdListener(),\n      request: AdRequest(),\n    )..load();\n    super.onInit();\n  }\n}\n```\n\npayment_controller.dart\n\n```\nimport 'package:get/get.dart';\nimport '../services/payment_service.dart';\n\nclass PaymentController extends GetxController {\n  var isPaymentSuccessful = false.obs;\n\n  void makePayment(double amount) async {\n    try {\n      isPaymentSuccessful.value = await PaymentService().processPayment(amount);\n    } catch (e) {\n      Get.snackbar(\"Payment Error\", e.toString());\n    }\n  }\n}\n\n```\n\nanimations.dart\n\n```\nimport 'package:flutter/material.dart';\n\nclass Animations {\n  static SlideTransition slideFromLeft(Animation\u003cdouble\u003e animation, Widget child) {\n    return SlideTransition(\n      position: Tween\u003cOffset\u003e(begin: const Offset(-1, 0), end: Offset.zero).animate(animation),\n      child: child,\n    );\n  }\n\n  static FadeTransition fadeIn(Animation\u003cdouble\u003e animation, Widget child) {\n    return FadeTransition(\n      opacity: Tween\u003cdouble\u003e(begin: 0, end: 1).animate(animation),\n      child: child,\n    );\n  }\n}\n\n```\n\ntheme.dart\n\n```\nimport 'package:flutter/material.dart';\n\nfinal ThemeData darkTheme = ThemeData(\n  brightness: Brightness.dark,\n  primaryColor: Colors.black,\n  accentColor: Colors.blueAccent,\n);\n\nfinal ThemeData lightTheme = ThemeData(\n  brightness: Brightness.light,\n  primaryColor: Colors.white,\n  accentColor: Colors.blueAccent,\n);\n\n```\n\nmain.dart\n\n```\nimport 'package:flutter/material.dart';\nimport 'package:get/get.dart';\nimport 'controllers/theme_controller.dart';\nimport 'utils/routes.dart';\nimport 'app_pages.dart';\n\nvoid main() {\n  runApp(MyApp());\n}\n\nclass MyApp extends StatelessWidget {\n  final ThemeController themeController = Get.put(ThemeController());\n\n  @override\n  Widget build(BuildContext context) {\n    return Obx(() =\u003e GetMaterialApp(\n          debugShowCheckedModeBanner: false,\n          theme: themeController.theme,\n          initialRoute: Routes.HOME,\n          getPages: AppPages.pages,\n        ));\n  }\n}\n```\n\nConclusion:\nThis folder structure and code provides a clean and modular architecture for a Flutter e-commerce app with all the requested features. The use of GetX for state management, Firebase for backend services, push notifications, Google Maps, Google Ads, dark/light theme, animations, and payment integration is demonstrated in this structure.\n\n\n[//]: # (--------------------------------------------------------------------------)\n\n\n\u003cp align=\"center\"\u003e \n  \u003ctr\u003e\n     \u003ctd\u003e\u003cimg src=\"/assets/images/logo.png\" width=100 \u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ch2 align=\"center\"\u003eShopSavvy\u003ch2\u003e\n \u003c/p\u003e\n\n\n## Development Setup\nClone the repository and run the following commands:\n```\ngit clone https://github.com/hamidhosen42/Flutter-ShopSavvy-App.git\nflutter pub get\nflutter run\n```\n### [Firebase](https://console.firebase.google.com/u/5/project/shopsavvy-fb9e3/firestore/data/~2Fbanners~2FP9MUfp45wj6wTTmkXruZ)\n### [APK](https://github.com/hamidhosen42/Flutter-ShopSavvy-App/blob/main/ShopSavvy.apk)\n\n### flutter packages:\n```\n- cupertino_icons: ^1.0.2\n- carousel_slider: ^4.2.1\n- firebase_core: ^2.20.0\n- firebase_auth: ^4.12.0\n- cloud_firestore: ^4.12.1\n- cached_network_image: ^3.3.0\n- top_snackbar_flutter: ^3.1.0\n- flutter_screenutil: ^5.9.0\n- lottie: ^2.7.0\n- dropdown_button2: ^2.3.9\n- velocity_x: ^4.1.1\n- flutter_stripe: any\n- http: any\n- flutter_bkash: \n- flutter_paystack: \n- image_picker: ^1.0.4\n- firebase_storage: ^11.4.1\n- toggle_switch: ^2.1.0\n```\n\n### The main features of our app are:\n```\n- Login: Allows existing users to access their accounts by providing valid credentials.\n- Register: Enables new users to create an account to utilize the app's features.\n- Product catalog browsing - Users can browse and search for products by category, view product details, reviews, add items to cart.\n- Cart and checkout - Users can add/remove products and quantities to cart, apply promo codes during checkout and make payments.\n- User account management - Users can register, login to their account, view order history, manage profile, addresses etc.\n- Order tracking - Users can track the status of their orders from account section.\n- Category management - Admins can add, edit, delete product categories.\n- Product management - Admins can add, modify and manage catalog products.\n- Order management - Admins can view and manage orders placed by users.\n- Admin dashboard - Provides insights like sales reports, revenue metrics, user activity to admins.\n- Payments - Likely integrates payment gateways like Stripe for accepting online payments.\n- Search/filter - Users can search for products and filter by price, ratings, etc.\n- Deals/coupons - Special discounted deals and coupon codes for users.\n- Upload Packages (Admin review): Allows authorized personnel (like travel agencies) to upload new packages, which can be reviewed and approved by the app's admin.\n- Logout: Ensures users can securely exit their accounts.\n- Internet Checker: Monitors and notifies users of their internet connection status.\n- Support: Provides assistance and solutions for any technical issues or queries users may encounter.\n- Privacy: Outlines the app's data collection, storage, and usage policies to ensure users' personal information is protected.\n- FAQ: Offers answers to frequently asked questions about the app and its features.\n- Edit Profile Information: Allows users to update and modify their personal account details.\n```\n\n### App UI :\n![image](https://github.com/hamidhosen42/Flutter-ShopSavvy-App/blob/main/assets/images/img.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhamidhosen42%2Fbuynjoy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhamidhosen42%2Fbuynjoy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhamidhosen42%2Fbuynjoy/lists"}