Skip to content

Amjad-elahi/Dal

 
 

Repository files navigation

DalLogo

Dal - Local Business Advertising App

Dal is an innovative advertising application designed to transform the way local businesses connect with consumers. By combining targeted advertising with proximity marketing, Dal connects businesses with nearby consumers, ensuring relevance, engagement, and effective advertising.

Key Features

  • Targeted Advertising: Businesses can tailor their ads to specific audiences, improving engagement and conversion rates.
  • Proximity Marketing: Ads are delivered based on the consumer's location, ensuring ads are timely and relevant.
  • User-Friendly Interface: The intuitive design makes navigating and creating ads easy for business owners.
  • Real-Time Analytics: Business owners can track live data on ad performance to optimize campaigns.
  • Localization Support: Multi-language support expands reach and ensures an inclusive experience.
  • Authentication: Includes user login, registration, and verification via auth_cubit.
  • Reminders & Notifications: Keeps users updated on relevant advertisements and events.
  • Push Notifications: Integrated with OneSignal for delivering timely notifications to users about new ads or important updates.
  • Map Integration: Uses Flutter Map to show the user’s location and nearby businesses for effective proximity-based advertising.

Dal bridges the gap between local businesses and their customers by providing a smart advertising solution based on proximity.

Project Structure

The Dal project is organized into logical directories for modularity and easy maintenance. Below is an overview of each folder’s purpose:

cubit

  • Contains ThemeCubit and ThemeState to manage the application's theme state across the app.

data_layer

  • data_layer.dart: Handles all data-related logic, serving as the intermediary between UI and data sources.

models

  • Defines data models representing various data structures used across the app.

screens

This folder contains screen-related files, divided by feature, including authentication, profile management, and advertising functionality:

  • auth_screens: Handles user registration, login, and verification.

    • login_screen.dart
    • create_account_screen.dart
    • verify_screen.dart
  • bottom_nav_bar_screen: Manages the state of the navigation bar with BLoC architecture.

  • discover_screen: Displays nearby businesses and ads using proximity marketing. This includes BLoC classes to handle events and states related to discovery.

  • edit_profile_screen: Allows users to edit their profiles and manage their settings.

  • home_screen: The landing page where users interact with different app features, including business categories.

  • onboarding_screen.dart: Guides users through the app’s features and functionalities upon their first use.

  • reminder_screen: Displays event or advertisement reminders to users.

  • add_ads_screen: Allows business owners to create and add new advertisements, with state management handled by add_ads_cubit.dart.

  • payment_screen: Handles payment functionality for business owners purchasing ad space.

  • profile_screen: Allows users to manage their profile, settings, and view saved ads.

  • stats_screen: Displays real-time analytics on ad performance for business owners.

services

  • location_permission: Manages location access, which is necessary for proximity-based advertising.
  • supabase: Handles authentication and database interactions using Supabase.
  • onesignal: Manages push notifications via OneSignal to send timely alerts about new ads, reminders, or updates.

setup

  • setup.dart: Configures the app with necessary setups, such as environment variables, dependency injection, and service initialization.

ER model

1. User

  • ID (int4): Unique identifier for each user.
  • FName (text): First name of the user.
  • LName (text): Last name of the user.
  • Email (text): Email address of the user.
  • PhoneNumber (text): Contact phone number of the user.
  • external_id (int4): External identifier for additional integrations.
  • confirmed (boolean): Indicates whether the user's account is confirmed.

2. Ad

  • ID (int4): Unique identifier for each advertisement.
  • Desc (text): Description of the advertisement.
  • StartDate (date): Start date of the advertisement.
  • EndDate (date): End date of the advertisement.
  • offer_type (text): Type of offer in the advertisement (e.g., discount, promotion).
  • BannerImg (text): URL to the banner image for the advertisement.
  • BranchID (int4): Identifier for the branch where the ad is displayed.
  • Views (int4): Number of times the ad has been viewed.
  • Clicks (int4): Number of times the ad has been clicked.
  • Ended (boolean): Indicates whether the advertisement has ended.

3. Branch

  • ID (int4): Unique identifier for each branch.
  • Address (text): Physical address of the branch.
  • Business_id (int4): Identifier of the associated business.
  • longitude (numeric): Geographical longitude of the branch.
  • latitude (numeric): Geographical latitude of the branch.

4. Business

  • ID (int4): Unique identifier for each business.
  • Name (text): Name of the business.
  • Email (text): Contact email for the business.
  • logo (text): URL to the business logo.
  • Subscribed (boolean): Indicates if the business is subscribed.
  • free-trial (boolean): Indicates if the business is in a free trial period.
  • ContactNumber (text): Contact number for the business.
  • Category (text): Category of the business (e.g., restaurant, retail).

5. Subscription

  • ID (int4): Unique identifier for each subscription.
  • Business_id (int4): Identifier of the subscribed business.
  • Subscription-type (text): Type of subscription (e.g., monthly, annual).
  • Start_date (date): Start date of the subscription.
  • End_time (date): End date or expiration of the subscription.

Relationships:

  • User - Ad: A user can display an ad.
  • Business - Branch: A business can have multiple branches.
  • Business - Subscription: A business can have one or more subscriptions.
  • Branch - Ad: Ads are associated with specific branches.

Screenshot 2024-11-07 at 12 54 40 AM


Screenshot 2024-11-07 at 12 55 52 AM


Key Dependencies

Dal uses the following dependencies to enhance functionality:

  • flutter_bloc: Implements BLoC (Business Logic Component) for state management.
  • supabase_flutter: Integrates Supabase for backend operations like user authentication and database management.
  • device_preview: Provides an emulator to preview the app on multiple devices.
  • lottie: Adds animations for a more engaging user experience.
  • get_it: A service locator for dependency injection.
  • flutter_dotenv: Loads environment variables, keeping API keys secure.
  • get_storage: Provides a simple key-value storage solution.
  • moyasar: Integrates the Moyasar payment gateway.
  • multi_dropdown: Allows users to select multiple options in dropdowns.
  • fl_chart: Provides beautiful charts for displaying ad performance and statistics.
  • flutter_map: Adds location-based features and integrates interactive maps to display businesses near users.
  • onesignal: A service for sending push notifications to engage users with relevant updates about ads or events.

Additionally, melos is used for automating tasks and managing dependencies in a large-scale Flutter project.

Screen shot

User App

Auth Map Profile

Business App

Auth Subscription Add_Ads Setting

Prerequisites

Installation

  1. Clone the Repository:

    git clone https://github.com/Nashruful/Dal
    cd dal-advertising-app
  2. Install Dependencies:

    flutter pub get
  3. Run the Application:

    flutter run

Configuration

Create a .env file in the root directory and add your Supabase and OneSignal credentials:

SUPABASE_URL=https://your-supabase-url.supabase.co
SUPABASE_ANON_KEY=your-anon-key
ONESIGNAL_APP_ID=your-onesignal-app-id

Contributing

We welcome contributions! If you have ideas or bug fixes, please submit a pull request.

Steps to Contribute

  1. Fork the Repository
  2. Create a Branch: Work on your feature or bugfix branch.
  3. Implement Changes: Follow the coding guidelines and document your changes.
  4. Submit a Pull Request: Describe your changes for review.

Dal empowers local businesses to effectively advertise to consumers nearby. With its proximity-based ads, it drives community engagement and supports local economies. We’re excited to see businesses thrive using Dal!

Team Members

Presentation

Demo Video

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 78.3%
  • C++ 10.3%
  • CMake 8.0%
  • Ruby 1.2%
  • Swift 1.0%
  • C 0.6%
  • Other 0.6%