Gateway Mobile


Gateway Mobile is an application that allows the promotion of Dealers and products.

Incorporating a custom widget to ​your​ web pages that ​allows​ them to receive sms from ​your​ customers. It also has the administration of VCards, which you can share with your customers.


Design of ui and ux

For the design of "Gateway Mobile" we used a simple flat UI. With an easy to use experience and simple admin dashboard we went for solid colors with big orange buttons for easy recognition and consistency.


Development

This app was developed using Ruby on Rails. Integrated with AvidMobile as a platform for text messaging.

An essential part of this app was the creation and implementation of the Plug-in. Dealers can add this Plug-in into their web page, and this would allow us to send text to the application, to inform the dealer has a visitor on their web page.

class Lead < ActiveRecord::Base
  belongs_to :dealer

  validates :dealer_id, :source_url, presence: true
  validates :phone_number, presence: true, length: { in: 10..11 }

  scope :all_this_week, -> { where(["created_at >= ?", 7.days.ago]) }
  scope :all_this_month, -> { where(["created_at >= ?", 30.days.ago]) }
  scope :all_this_year, -> { where(["created_at >= ?", 365.days.ago]) }

  default_scope { order('created_at DESC') }

  after_create :sent_mail_to_dealer, :send_sms_from_the_api

  def get_formatted_date
    date = self.created_at
    date.strftime("%b #{date.day.ordinalize}. %Y - %I:%M %P")
  end

  def get_textword
    self.textword.blank? ? '-' : self.textword.upcase
  end

  private
    def sent_mail_to_dealer
      if self.dealer && self.dealer.email
        DealerMailer.dealer_lead_email(self).deliver_now
      end
    end

    def send_sms_from_the_api
      @gwm = GatewayMobile.new
      @gwm.send_message(self)
    end
end
#REGISTRATION FEATURE
Then(/^the user created should be of type Dealer$/) do
  expect(@user.class).to be(Dealer)
end

Then(/^I should be directed to the "([^"]*)"\.$/) do |url|
  build_url = url.downcase.split(' ')
  path = "/#{build_url[0]}s/#{@user.id}/#{build_url[1]}"

  expect(path).to eq(dashboard_dealer_path(@user.id))
end

Then(/^a error message should appear$/) do |table|
  values = table.rows_hash
  expect(page).to have_content(values[:message])
end

Then(/^the user must remain on the "([^"]*)" registration page$/) do |user_type|
  visit new_user_registration_path(user_type)
end

#SESSION FEATURE
Then(/^the user must be logged$/) do
  visit dashboard_dealer_path(@user.id)
end

Then(/^the user must remain on the login page$/) do
  visit new_user_session_path
end
class Api::LeadsController < ApiController
  skip_before_action :verify_authenticity_token, if: :json_request?, only: [:create]
  skip_before_action :verify_authenticity_token, only: [:test_keywords, :check_keyword_mo]

  def create
    lead = Lead.new(lead_params)
    if lead.save
      render_success({ :success => true, :info => "Lead Created", :lead => LeadSerializer.new(lead).serializable_hash })
    else
      warden.custom_failure!
      render :status => 442, :json => { :success => false, :info => lead.errors}, :callback => params[:callback]
    end
  end

  def check_keyword_mo
    puts params.inspect
    respon = find_recent_mo_for_originating_number_api(params[:originating_number])
    if respon['code'] == 200
      source_address = respon['data'].first['source_address']
      keyword_id = respon['data'].first['keyword_id']

      @vanity = find_vanity_textword(keyword_id)
      keyword = @vanity.keyword.blank? ? 'N/A' : @vanity.keyword.upcase

      lead = Lead.new(dealer_id: params[:dealer_id], phone_number: source_address, source_url: "N/A", textword: keyword)
      puts lead.inspect
      if lead.save
        render :status => 200, :json => {:success => true, :info => "Lead Created"}
      else
        puts lead.errors.inspect
        render :status => 442, :json => {:success => false, :info => "Lead not Created"}
      end
    else
      render :status => respon[:code]
    end
  end

  private
    def lead_params
      params.require(:lead).permit(:dealer_id, :phone_number, :source_url)
    end

  protected
    def json_request?
      request.format.json?
    end

    def find_dealer
      @dealer = Dealer.find_by_id(params[:dealer_id])
    end

    def find_vanity_textword(keyword_id)
      VanityTextword.find_by(keyword_id: keyword_id)
    end

    def find_recent_mo_for_originating_number_api(orig_number)
      @gwm = GatewayMobile.new
      @gwm.mo_for_originating_number(orig_number)
    end
end

Our Process

Meetings

We have weekly calls where we discuss progress. We use Skype, Google Hangouts or GotoMeeting.

We agreed on a day and time that worked for everyone.

Planning

In the beginning we send a timeline specifying the planning and tasks for that week.

These tasks are the same cards we have planned in Trello.

Trello

We translate all requirements into stories in Trello Cards.

Trello is the place to add any specification, ask questions or comments to the team.

Deliveries

Once the tasks are done they go through a testing process and we pass them for your approval.

Every week we will pass cards onto the client list for you to give us feedback.

Quality Assurance

Once the functionality is completed one of our functional testers will try to break the feature.

We either move it to Needs Improvement or pass it to you for feedback.

Feedback

We need the support from you to review the cards and Approve them or tell us how to improve it.

This is key to meet goals and being on time in the development of the application.