Skip to main content

file_structure

📂 Project Structure Overview

🌟 Root Files

  • firebase_options.dart: Firebase configuration options.
  • main.dart: Entry point of the Flutter application.

🗂️ Pages

Contains the main pages of the app, each with specific functionality:

  • dev.dart: Development-related page.
  • error.dart: Error-handling page.

🔄 Sub-Directories for Specific Features

  • Barter: Manages the barter system.

    • barter.dart
  • Cart: Handles the shopping cart.

    • cart.dart
    • Widgets/
      • cart_item.dart: Widget for displaying individual cart items.
  • Checkout: Manages the checkout process.

    • checkout.dart
    • Widgets/
      • checkout_item.dart: Widget for displaying checkout items.
  • Discover: Manages content discovery.

    • discover.dart
  • Home: The home screen.

    • home.dart
  • Item: Manages item-related operations.

    • Core files: add_item.dart, item.dart, item_management.dart, item_preview.dart, update_item.dart.
    • Widgets/: Contains widgets related to item operations (e.g., category.dart, tag_input.dart).
    • Subdirectories:
      • Bases/: Base item-related classes.
      • Breakdown/: Handles item upload broken down into 3 parts (e.g., details.dart, pricing.dart).
      • Category/: Category-related operations.
      • Image/: Image management.
      • RichText/: Rich text editor and related functionalities.
  • Login: Manages user login.

    • login.dart
  • Message: Handles messaging within the app.

    • Core files: messages.dart
    • Widgets/: Widgets for messaging (e.g., message_bubble.dart).
  • Notification: Manages notifications.

    • notification.dart
  • Order: Handles orders within the app.

    • Core files: order.dart, Orders.dart, post_order.dart
    • Widgets/: Widgets for tracking orders (e.g., order_tracker.dart).
  • Profile: Manages user profile.

    • profile.dart
  • Search: Manages search functionality.

    • searchResult.dart
  • Store: Manages store operations.

    • Core files: address.dart, add_store.dart, owner.dart, return_policy.dart, store_page_base.dart, update_store.dart
    • Widgets/: Widgets for store-related operations (e.g., address_form.dart, map_view.dart).

🔧 Services

Handles various services that have to do with some kind of backend, often firebase:

  • auth_methods.dart, chat_service.dart, firebase_auth_methods.dart, user_methods.dart

🔄 Shared

Shared resources used across the app:

  • Common Files: credit_card.dart, custom_colors_constants.dart, custom_theme.dart, etc.
  • API: API-related operations.
    • Files like checkout.dart, GPT.dart, google_nlp.dart
  • Controller: (Empty, or possibly related to MVC pattern controllers).
  • Data: Manages various data structures.
    • Subdirectories for different data types (e.g., Arguments/, Category/, GoogleNlp/, Item/, Policy/, Response/, Store/).
  • Validation: Contains validation logic for data that will be submitted.
    • item.dart
    • Should include store but we do not currently.

🎨 Widgets

Custom widgets used throughout the app:

  • Root Widgets: Common widgets like bottom_menu_bar.dart, search_bar.dart, title_bar.dart.
  • Buttons: Custom button widgets (custom_text_button.dart, lateral_button.dart, top_button.dart).
  • Cards: Various card layouts (barter_card.dart, item_card.dart, metric_store_card.dart).
  • ScaffoldBase: Basic scaffold-related widgets (header.dart, scaffold_wrapper.dart).
  • Unused: Widgets that are currently not in use (filter_column.dart, mertric_row.dart).