Mighty Taxi Booking

Documentation Version 1.0


Introduction


First of all, Thank you so much for purchasing this application and for being our loyal customer.

This documentation is to help you regarding set up.

Requirement

This project have required following depandency

Flutter/iOS Requirements

  1. Android Studio Giraffe
  2. Flutter: 3.13.x

Laravel Requirements (Server Requirements)

  1. PHP 7.4, 8.0
  2. OpenSSL PHP Extension
  3. PDO PHP Extension
  4. Mbstring PHP Extension
  5. Tokenizer PHP Extension
  6. XML PHP Extension
  7. Ctype PHP Extension
  8. JSON PHP Extension
  9. GD PHP Extension (or Imagick PHP Extension)
  10. PHP Fileinfo extension
  11. PHP Zip Archive
  12. Rewrite Module (Apache or Nginx)
  13. MQTT Broker

PHP.INI Requirements

  1. open_basedir must be disabled

File and folder permissions

  1. /bootstrap 775
  2. /storage 775 (recursively)

File Structure

Here is the general File structure of the application:

  • app
  • lang
  • lib
    • models
    • network
    • screens
    • store
    • utils
      • Colors.dart
      • Common.dart
      • Constant.dart
  • pubspec.yaml

Here is the general File structure of the laravel:

    laravel
    • app
      • Console
      • Exceptions
      • Helper
      • Http
        • Controllers
          • Auth
            • API
        • Middleware
        • Requests
        • Resources
      • Model
      • Notifications
      • Providers
    • bootstrap
    • config
    • database
    • node_modelus
    • public
      • css
      • js
      • images
    • resources
      • css
      • js
      • lang
      • views
    • routes
    • storage
    • tests
    • .editorconfig
    • .env.example
    • .styleci.yml
    • .htaccess
    • artisan
    • composer.json
    • package.json
    • phpunit.xml
    • README.md
    • server.php
    • tailwind.config.js
    • webpack.config.js
    • webpack.mix.js

Installation

Install flutter on windows

  • Download Android Studio

    Click here
  • Get the Flutter SDK

    1. Install https://flutter.dev/docs/get-started/install flutter_sdk

      Extract the zip file and copy flutter folder into your desired installation location for the Flutter SDK (eg. C:\src\flutter; do not install Flutter in a directory like C:\Program Files\).

    2. Update your path flutter_sdk
    3. Now set your enviournment variable
    4. From the Start search bar in , type ‘env’ and select Edit environment variables for your account
    5. Under User variables check if there is an entry called Path:
    6. Click on Edit. New Dialog open from it click on new and copy full path to flutter\bin as its value
    7. Now Restart your pc for changes to take effect
    8. flutter_win2
    9. Now check everything is ok or not
    10. open cmd and run flutter doctor as shown the below picture
    11. flutter_win3
    12. Now open Android Studio and create new flutter project then select your flutter sdk file to the location where we have downloaded earlier and that's it
    13. flutter_sdk_path
  • Learn more about Android Studio - Click here

Install flutter on mac

  • Download Android Studio - Click here
  • Download Xcode - Click here
  • Get the Flutter SDK - Click here
    1. Install Click here flutter_sdk

      Extract downloaded file, just double click on that. and just copy extracted folder and paste it to your desired location (for example, Documents\flutter).

    2. Update your path

      Warning

      Path variable needs to be updated to access “flutter” command from terminal. you can just update path variable for current terminal window only. and if you want to access flutter commands from anywhere in terminal, we need to update SDK path permanently.

      To update PATH variable, we need to open terminal.

      To update PATH variable for current terminal window only, then enter this command "export PATH="$PATH:`pwd`/flutter/bin"" and hit enter key.

      To update PATH variable permanently, then Open or create .bash_profile file. to open or create that file, then enter "sudo open -e $HOME/.bash_profile" and hit enter key.

      Append below line to bash_profile file at bottom of all other content. "export PATH="$PATH:[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin"" as [PATH_TO_FLUTTER_GIT_DIRECTORY] is actual path of SDK folder.

      Run this command on terminal "source $HOME/.bash_profile" to refresh PATH variables.

      Then check whether our SDK is successfully installed or not.

      You are now ready to run Flutter commands in the Flutter Console!

      Run "flutter doctor" into terminal, If you are getting check list of flutter sdk requirements, it means SDK is successfully installed on your machine. and you can start building flutter apps on your machine.

      If you find any issue during environment setup in macos, please go online Click here

Install flutter on linux

  • Download Android Studio - Click here
  • Get the Flutter SDK - Click here
    1. Install Click here

      Extract downloaded file, just double click on that. and just copy extracted folder and paste it to your desired location (for example, Documents\flutter).

    2. Update your path

      Warning

      Path variable needs to be updated to access “flutter” command from terminal. you can just update path variable for current terminal window only. and if you want to access flutter commands from anywhere in terminal, we need to update SDK path permanently.

      You’ll probably want to update this variable permanently, so you can run flutter commands in any terminal session. To update PATH variable, we need to open terminal.

      export PATH="$PATH:[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin"

      1. Run source $HOME/. to refresh the current window, or open a new terminal window to automatically source the file.
      2. Verify that the flutter/bin directory is now in your PATH by running:

      echo $PATH

      Verify that the flutter command is available by running:

      which flutter

      You are now ready to run Flutter commands in the Flutter Console!

Laravel Configuration (Backend API)

  1. Create Database
  2. Upload the Codes in below directory based on your server
    In Linux
    Path: var/www/html/
    In cPanel:
    Inside File manager -> Path: public_html/
  3. For database settings, open the .env file with a text editor and set your database settings.
    Note: .env is a hidden file, you can see it by opening directory to a text editor.

Steps to be follow for getting started with the template:

Laravel Configuration

App Configuration

                                                            APP_NAME="your app name"
                                                            APP_ENV=production
                                                            APP_KEY=yourkey
                                                            APP_DEBUG=false
                                                            APP_URL=yourappurl
  1. Open and edit the /.env file and provide following details:
  2. Enter App name, App env, App debug and App url
    Run in terminal or CMD: php artisan key:generate

Database Configuration

  1. Create the database on your server
  2. Open and edit the /.env file and provide your server details:
  3.                                                         DB_CONNECTION=mysql
                                                            DB_HOST=127.0.0.1
                                                            DB_PORT=3306
                                                            DB_DATABASE=laravel
                                                            DB_USERNAME=root
                                                            DB_PASSWORD=
  4. Open and edit the /.env file and provide following details:
  5. After that run in terminal or CMD,
    Note: Only necessary for those, who is setup project first time.
     php artisan migrate --seed

    Note: When you update new code then run in terminal or CMD for new table migration,

    php artisan migrate

  6. If you are facing problem to migrate database using command then, import the mightytaxi.sql file in your database. You will find the sql file in mightytaxi/mightytaxi.sql.
    Already imported mightytaxi.sql

    If you have already imported mightytaxi.sql file than you need to import alter-mightytaxi.sql file. ( Note : Not Necessary for those,who is setup project first time. )

Mail Configuration

  1. Open and edit the /.env file and provide following details:
  2.                                                       MAIL_MAILER=your mail mailer
                                                          MAIL_HOST=your mail host
                                                          MAIL_PORT=your mail port
                                                          MAIL_USERNAME=your mail id
                                                          MAIL_PASSWORD=your mail password
                                                          MAIL_ENCRYPTION=your mail encryption
  3. Enter mail host name, mail port, mail username( Mail ID ), mail password and mail encryption type.
  4. Note If you configure Gmail SMTP then, you have to Generate App Password. Follow this link: Click Here

Onesignal Configuration

  1. In Admin Panel Go to Setting -> Mobile Configuration -> ONESIGNAL
  2. Open and edit the /.env file and provide following details:
  3. 
                                                        ONESIGNAL_APP_ID=
                                                        ONESIGNAL_REST_API_KEY=
                                                
                                                        ONESIGNAL_DRIVER_APP_ID=
                                                        ONESIGNAL_DRIVER_REST_API_KEY=
    
                                                    
  4. If you want to enable onesignal notifications you have set,
    ONESIGNAL_APP_ID, ONESIGNAL_REST_API_KEY.
    You have to add this below line in .env file. ONESIGNAL_DRIVER_APP_ID, ONESIGNAL_DRIVER_REST_API_KEY

MQTT Configuration

  1. Open and edit the /.env file and provide following details:
  2.                                                     MQTT_HOST="your.broker"
                                                        MQTT_PORT=1883
                                                        MQTT_ENABLE_LOGGING=false
                                                        MQTT_UNIQUE_TOPIC_NAME="your unique topic name"
                                                    
  3. Note: Set MQTT_UNIQUE_TOPIC_NAME in .env file and also set in application lib/utils/Constants.dart
  4. MQTT Broker: You can find out documentation on broker website.

  5. Eclipse Mosquitto
  6. Hive

    Public HiveMQ MQTT broker Link

                                                            MQTT_HOST="broker.hivemq.com"
                                                            MQTT_PORT=1883
                                                            MQTT_ENABLE_LOGGING=false
                                                            MQTT_UNIQUE_TOPIC_NAME="mightytaxi"
                                                        

Google Map Configuration

  1. Open and edit the /.env file and provide following details:
  2.                                                     GOOGLE_MAP_KEY="your key"
                                                    
  1. Link your storage folder to public folder. Run in your project root directory (where you uploaded code) terminal or CMD:
    php artisan storage:link

    After this if you are facing a problem storage link using command please follow the below steps: ln -s

                                                            ln -s /home/your_application/storage/app/public /home/your_application/public/storage
                                                        

    Also set your APP_URL=yourappurl

                                                            APP_URL=https://your-website-url.com
                                                        

Admin Credentials

                                                        Email    : [email protected]
                                                        Password : 12345678
                                                    

App Configuration

Android Configuration

Change Application Name

Open android/app/src/main/AndroidManifest.xml and specify your application name.

change_app_label

Change Application Icon

    1. Open Android Asset Studio Click here
    2. Then Select Image and Click on Download button to download launcher icons
    3. set_app_ico

    4. Open android/app/src/main/res and replace following folders
    5. app_logo_dir

Change Application ID

    1. Open Android studio. Select File -> open -> select root folder -> android
    2. Wait for indexing
    3. Open android/app/build.gradle file and change YOUR_APP_ID
    4. after making changes sync your Project
    5. change_app_id

Setup Firebase

    1. For Firebase setup, you just need to change the android/app/google-services.json file.
    2. Create a new firebase account, register your application with your package name.
    3. Now download the google-services.json file and replace with current.
    4. Refer to Link
    5. update_google_json

Generate Signed APK & AAB

  1. Go to your project -> File -> Open -> Select your project-> Open Android Module
  2. logo
  3. Open Project in New Window
  4. Wait for while until project synchronization. After that Go to Build -> GenerateSigned Bundle/APK...
  5. logo
  6. Select Android App Bundle or APK Option as per your need. (Android App Bundle is best solution) and click Next button.
  7. logo
  8. Select Create new.. option to generate new Signed key (When you release your app First Time) and Fill all options. Refer this link
  9. logo

  10. Click Next button and you will get following screen...
  11. logo

    Select Build variants - release and Signature versions both V1 and V2 respectively as shown above screen shot and click Finish button.

  12. Wait for a while until Gradle Build Running process complete.and finally you will get the Generate Signed APK : (APKs) generated successfully. from that click on Locate option to get Location of your Generate Signed APK Key.

iOS Configuration

Open Project in Android Studio

  1. Open android studio in your project.
  2. Open terminal in android studio.
  3. flutter pub get
  4. Open terminal cd ios.
  5. pod install.
  6. run project in xcode.

Open Project in Xcode

  1. Open Xcode.
  2. Select Open another Project.
  3. Open the iOS directory within your app.
  4. Now, click on Done button.

Change Bundle Name

  1. Select your project file icon in Group and files panel.
  2. Then Select Target -> Info Tab.
  3. At last change Bundle Name.

logo

Change Bundle Identifier

Bundle Id is a unique Identifier of your of app on iOS and MacOS. iOS and MacOS use it to recognise updates to your app. The identifier must be unique for your app.

  1. Select your project file icon in Group and files panel.
  2. Select General Tab.
  3. After Select General tab you can see the details of your application.
  4. In Identity section, rename your Bundle identifier.

logo

Change App Icons

  1. see How to Generate App Icons?
  2. In Group and files panel find “Assets.xcassets” folder.
  3. In Assets.xcassets folder replace AppIcon.

logo

How to create firebase on iOS

  1. Open firebase console with login your account
  2. Firebase Link
logo
  1. Here you need to add bundle id (Apple Unique Identifier for your application.) Whatever bundle identifier you put here, you need to put the same in the iOS application.
  2. Click Register App button
  3. logo
  1. Click Download Plist file and store it in your computer, because we will need it in a second.
  2. logo
  1. Go to your project you downloaded and navigate to project folder
  2. Find folder iOS and go inside
  3. Find folder Runner and go inside
  4. Replace the GoogleService-Info.plist file with the one you just downloaded
  5. logo

Google Map iOS

  1. Open "AppDelegate.swift" file and add your api key
logo

Flutter Configuration For Rider App & Driver App

Change Base URL

  • Go to lib/utils/Constants.dart and change DOMAIN_URL
    1.                                                             DOMAIN_URL="ADD_YOUR_DOMAIN_URL"
                                                              
    logo

    Change MQTT URL

  • Go to lib/utils/Constants.dart-> change Mqtt url and port number and also set your mqtt unic topic name same as .env file
  •                                                             final client = MqttServerClient.withPort("ADD HERE YOUR URL", "", YOUR PORT NUMBER);
                                                                const MQTT_UNIQUE_TOPIC_NAME = 'ADD YOUR MQTT UNIQUE TOPIC NAME';
                                                            
    logo

    Change Primary Color

  • Go to lib/utils/Colors.dart
  • logo

    Change One Signal Key

  • Go to lib/utils/Constants.dart
  • Note: Generate two onesignal account one for rider and one for driver
  •                                                             const mOneSignalAppIdDriver = 'ADD YOUR ONESIGNAL DRIVER APP ID';
                                                                const mOneSignalRestKeyDriver = 'ADD YOUR ONESIGNAL DRIVER REST API KEY';
                                                                
                                                                const mOneSignalAppIdRider = 'ADD ONESIGNAL RIDER APP ID';
                                                                const mOneSignalRestKeyRider = 'ADD ONESIGNAL RIDER REST API KEY';
                                                            
    logo

    OneSignal Configuration

    • Create onesignal project in your account Choose android platform
    • logo
    • Go to your Firebase Console -> Project Settings -> Service account and generate New private key
    • logo
    • Now upload json file here
    • logo
    • Choose Target SDK as Flutter
    • logo
    • Now copy App ID as shown below
    • logo
    • Go to lib/utils/Constants.dart and change mOneSignalAppId
    • logo
    • Go to Setting -> Keys & IDs in OneSignal project and copy 'Rest API Key'
    • logo
    • To generate OneSignal channel id Refer this link
    • You have connected android application to your Onesignal account successfully

    How to integrate firebase

    • Create new project to your firebase console
    • logo

      logo

      logo

      Add android application to your firebase project

      logo

    • Add package name and sha-1 key (sha-1 optional for now)
    • logo

      logo

      logo

    • You have connected andorid application to your firebase project successfully
    • Now download the google-services.json file and replace with current.
    • update_google_json


      Add ios application to your firebase project

      logo
    • Get your bundle id from \ios\Runner.xcodeproj\project.pbxproj file or search for PRODUCT_BUNDLE_IDENTIFIER and you will get following result
    • logo
    • Enter your ios bundle id
    • logo
      logo
      logo
    • You have connected ios application to your firebase project successfully
    • Now download the GoogleService-Info.plist file and replace with current.
    • update_google_json
    • Go to Project setting and Add your debug and release SHA1 Key. Refer link
    • logo



      Create Firestore Database

    • Go to Firestore Database -> click on create database
    • logo

    • Select Start in test mode and click on Next button.
    • logo

    • Click on Enable button and create your collection
    • logo


    How to integrate googlemap Key

    Google Map Key Documentation

    Enable below listed apis

    logo

    Change Google Map API Key

    • Configuare for Rider App & Driver App
      • Open lib/utils/constants.dart and change googleMapAPIKey.
                                                  const GOOGLE_MAP_API_KEY = 'ADD YOUR GOOGLE MAP KEY';
                                              
      logo

        Open android/app/src/main/AndroidManifest.xml and change googleMapAPIKey.
                                                  
                                              
      logo

    Common error

    No matching client found for package name

    • The error is "package_name" in google-services.json is not matching with your "applicationId" in app gradle.
    • Just make sure the package_name and applicationId both are same.
    logo

    Flutter SDK Not Available

    Download the SDK and point the SDK folder path in your future projects.

    There are different sources you can try

    1. You can clone it from the Github Repository
    2. Download SDK zip file + extract it after downloading
    3. You can also Download any version(including older) from here (For Mac, Windows, Linux)
    Use the SDK path in your future projects
    logo

    FAQ

    Migrate Database issue?

    • If you are facing a problem migrating database using command the please follow the below steps.
      Go to the main directory of download project then find mightytaxi.sql file and import to the database.

    symlink() has been disabled for security reasons?

    When you get an error while run php artisan storage:link, please follow the below steps :

    Second way, just fire this command

    ln -s /home/your_application/storage/app/public /home/your_application/public/storage

    Update the existing code with new release


    Special Notes

    As per envato policy installation, setup and configurations or modification are not included in free support. Free support is only for any bug/ error in original code. we do not provide installation and customization support in FREE SUPPORT.
    Still, We are providing steps for How to update future release code to existing source code for your knowledge purpose.

    PLEASE DO NOT CREATE TICKETS IF YOU FACE ANY ISSUE DURING UPDATE YOUR CODE. WE WILL NOT PROVIDE ANY SUPPORT ON THAT.


    How to update future release code to existing source code

    If you want which file changes are on the latest updated version then you have to manage the git repository by yourself.

    For First time: Initial project downloaded from codecanyon server.

    Step 1: Create or login with gitlab

    Login or register your account with gitlab: https://gitlab.com/users/sign_in

    Step 2: Create a new project in GitLab
    • In your dashboard, click the green New project button or use the plus icon in the navigation bar. This opens the New project page.
    • On the New project page -> Create a blank project.

    • logo
      logo
    Step 3: Clone your project to your local system
    • 1. Once project is created on your gitlab server. You have to clone the project to your local system. You can clone it with the command line.
    • 2. git clone “repository path”
    • 3. Copy your project url and clone into your exiting system

    • logo
      logo
    • 4. Once successfully clone then system will create a folder on your system

    • logo
    Step 4: Download project from codecanyon server Step 5: Copy/paste your initial downloaded project to clone directories.

    Once successfully downloaded project from codecanyon, copy/paste your downloaded project into clone directories

    • Note
    • Only orignal source code is put here.
    logo
    Step 6: Commit and push to gitlab server

    Onces copy/paste your changes to clone directres, you have to push all files to your gitlab server. For that use the following commands.

    Before commit to server directores, you have to remove below folder from your project

    • 1. build
    • 2. .idea
    • 3. .gradle

    After That follow below steps

    • 1. Goto inside your clone directory project
    • logo
    • 2. Add your all files with “git add .” command
    • 3. Now commit your changes with below command
    • 4. git commit -m ‘initial commit’
      • Note
      • Write your latest version message instead of “initial commit”.
      logo
    • 5. Push your changes to server with below command
    • “git push” And provide you gitlab credential details

      logo
    • 6. Check your all changes to gitlab server
    logo

    For Update existing code (If Already have old version of project)

    Note

    If you remove the project from the local system then clone the project again from your gitlab server. Follow the same above Step 3: Clone your project to your local system

    Step 1: Download the latest version from codecanyon server.

    Once you will received mail for updates. Just download latest code from codecanyon server.

    Step 2: Copy/paste your initial downloaded project to clone directories.

    Once successfully downloaded project from codecanyon, copy/paste your downloaded project into clone directories

    Note

    Only orignal source code is put here.

    Step 3: Commit and push to gitlab server

    Follow same Step 6: Commit and push to gitlab server

    Step 4: Check updated files

    After committing your latest changes. Goto the gitlab project dashboard and click on the commit link.

    logo

    Click on link which you have commit message on above steps 3

    logo

    Now check the all changed file.

    logo

    Click on “XYZ changed file” to see which file has been changed.

    logo

    Change Log

    Mighty Taxi Change Log

    Version 11.0 – 17 Nov 2023
      Update:
    • Update all libraries to the latest flutter sdk 3.13.x
    • Migrade to OneSignal 5.0.x
    • Migrade MQTT Unique topic
    • Added:

      Admin

    • Ride Book From Admin
    • Driver App
    • Open trip route on Google map
    • Chnages:
    • Ui Enhancement In Rider and driver app
    • Code Enhancement
    • Remove:
    • Payment gateway is temporarily removed
    • Fixed:
    • Map Loading issue.
    • Bug Fixed
    Version 10.0 – 18 Jul 2023
    • Added : Russian, Chinese, Korean, Japanese, Bengali, Armenian Languages
    • Bug Fixed
    Version 9.0 – 26 June 2023
    • Upgrade all library to sdk version 3.10.x
    • Added: Notification redirection
    • Bug fixed
    Version 8.0 – 06 June 2023
    • Driver alert ring tone when there is an order coming in
    • Google sign in in Driver
    • Apple login in Driver & Rider
    • Comment box added when cancel Ride
    • Give camera option when upload image
    • Chat redirection when click on notification
    • Search address restricted in current country only
    • Bug fixed
    Version 7.0 – 20 March 2023
    • Upgraded to the Latest Flutter 3.7.7 SDK
    • Bug fixed
    Version 6.0 – 11 Feb 2023
    • Notification bug fixed
    • Bug fixed
    Version 5.0 – 25 Jan 2023
    • Show all nearby taxi based on user's current location
    • Booking a ride for others
    • Show live location of all drivers into admin panel
    • Show more driver information for secure ride
    • Download transaction receipt
    • Show all earning history by drivers
    • Google signIn in rider app
    • Show driver earning in driver app
    • Bug fixed
    Version 4.0 – 28 Dec 2022
    • Added Reply on complaints section
    • Chat Notification bug fixed
    • Bug fixed
    Version 3.0 – 19 Dec 2022
    • Added: Rider Track Driver Location
    • Bug fixed
    Version 2.0 – 19 Nov 2022
    • Payment Gateway added
      1. Flutterwave
      2. PayPal
      3. PayTabs
      4. Mercado Pago
      5. Paytm
      6. MyFatoorah
    • Language support
      1. Urdu
      2. Tamil
      3. Panjabi
    • Bug fixed
    Version 1.0 – 10 Nov 2022
    • Initial Release

    Meet Mighty Help & Support

    We like to hear you out when you get stuck or encounter difficulty with our products. As soon as you buy one of our products – you can open a support ticket and share your concern right away.

    Submit support ticket: https://support.meetmighty.com/


    Support Policy:

    It is recommended that before submitting a ticket you take a close look at product documentation (Docs folder in the archive you have downloaded from Themeforest/Codecanyon). To get technical support and assistance, you need to have a valid purchase code. You will find this when you SignIn your Codecanyon/Themeforest “Download” page. Click on the product’s download link.

    Please Note:

    Free support policy includes troubleshooting, technical assistance with the product only. It does not include any customization, additional features integration or concerns about third-party plugins compatibility. But, support is applied to plugin(s) we have developed and integrated ourselves. We appreciate your understanding!

    If you need assistance and information on purchased product that is not covered in documentation, post them on our support portal at https://support.meetmighty.com/ You can expect answer within 24-48 hours, usually as soon as possible in the order they were received.

    Additionally, if any support ticket has no response from the item owner for more than 7 days, that support ticket will be closed by default. However, if you need further assistance, you can create a new ticket.

    All support requests are being processed on business days (Monday to Saturday) from 9:00 to 18:00 (GMT +05.30). We are in GMT+5:30 time zone. We address all the support queries 6 days weekly on the first-come, first-solve basis (Sundays off).

    Do you have any pre-sales questions or concerns, please write to us via our website contact page or email us at [email protected]. We like getting positive feedback from our customers, and this is why we do our best to earn it! Write a review: https://codecanyon.net/downloads