Buy

Admin Panel Setup

1.Connect to FTP and Setup Application

Follow these instructions to connect to your Ubuntu server using FTP and complete the application setup:

  1. Connect to the server using FTP: Use an FTP client like FileZilla to connect to your server. Enter the server's IP address, username, and password. Use port 21 for FTP or port 22 for SFTP.
  2. Transfer the ZIP file: Upload your application’s ZIP file to the server’s local path (e.g., /var/www/html).
  3. Unzip the file: Navigate to the file's location on the server and run the following command to extract the ZIP file: "sudo unzip your-application.zip"
  4. Rename the .env-example file to .env: Ensure you rename the environment configuration file after unzipping the project.
  5. Update the .env file with your configuration: Modify the database and application settings in the .env file. Below is an example configuration:
    
    APP_NAME=Restart-tagxi
    APP_ENV=local
    APP_KEY=base64:mnQvTJAlzNknS4lqVmprl9XOSm2BVE0ceeXdFzSyQDU=
    APP_DEBUG=true
    APP_URL=https://restart.ondemandappz.com/
    LOG_CHANNEL=daily
    SYSTEM_DEFAULT_TIMEZONE=Asia/Kolkata
    SYSTEM_DEFAULT_CURRENCY=INR
    APP_FOR=production
    DB_CONNECTION=mysql
    DB_HOST=127.0.0.1
    DB_PORT=3306
    DB_DATABASE=your_db_name
    DB_USERNAME=your_user_name
    DB_PASSWORD=your_user_password
    BROADCAST_DRIVER=log
    CACHE_DRIVER=array
    FILESYSTEM_DRIVER=local
    QUEUE_CONNECTION=database
    SESSION_DRIVER=file
    SESSION_LIFETIME=120
    MAIL_MAILER=smtp
    MAIL_HOST=smtp.sendgrid.net
    MAIL_PORT=587
    MAIL_USERNAME=apikey
    MAIL_PASSWORD=your_mail_password
    MAIL_ENCRYPTION=tls
    MAIL_FROM_ADDRESS=support@tagxi.com
    MAIL_FROM_NAME="tagxi"
    PUSHER_APP_ID=
    PUSHER_APP_KEY=
    PUSHER_APP_SECRET=
    PUSHER_APP_CLUSTER=mt1
    STRIPE_KEY=your-stripe-key
    STRIPE_SECRET=your-stripe-secret
                        
  6. Run composer & npm install commands: Navigate to the application folder and execute the following commands to set up the node & composer packages:
    • "composer install"
    • "npm install"
  7. Run database migrations: Navigate to the application folder and execute the following commands to set up the database and seed data:
    • "php artisan migrate --seed"
    • "php artisan storage:link"
  8. Update permissions: Ensure the application has the correct permissions by running: "sudo chmod -R 777 storage/ resources/ public/ bootstrap/"
  9. Set up SSL using Certbot: Install and configure SSL to secure your application:
    • Navigate to the Apache configuration directory: "cd /etc/apache2/sites-available/"
    • Set up your virtual host configuration file with your domain name and document root path. For example, create a file named your_domain.conf and specify the configuration:
      
      
          ServerName your_domain.com
          ServerAlias www.your_domain.com
          DocumentRoot /var/www/your_domain
          ErrorLog ${APACHE_LOG_DIR}/error.log
          CustomLog ${APACHE_LOG_DIR}/access.log combined
      
                          
    • Enable your configuration file: "sudo a2ensite your_file_name.conf"
    • Restart Apache to apply changes: "sudo systemctl restart apache2"
    • Run Certbot to obtain and configure the SSL certificate: "sudo certbot --apache"
    • Verify SSL setup: "sudo certbot renew --dry-run"
  10. Run build for front end: Run the following command to build, the build folder will be replaced in following path "public/build": "npm run build"

2.Setup Laravel Supervisor

Follow the steps below to set up the Laravel Supervisor:

  1. "sudo apt-get install supervisor"
  2. "sudo nano /etc/supervisor/conf.d/laravel-worker.conf"
  3. Paste the following lines into that file:
  4. 
    [program:laravel-worker]
    process_name=%(program_name)s_%(process_num)02d
    command=php /var/www/html/project-name/artisan queue:work --sleep=3 --tries=3
    autostart=true
    autorestart=true
    user=ubuntu
    numprocs=8
    redirect_stderr=true
    stdout_logfile=/var/www/html/project-name/worker.log
    stopwaitsecs=3600
                    

    Note: Replace "ubuntu" with your user and "project-name" with your project’s name.
  5. "sudo supervisorctl reread"
  6. "sudo supervisorctl update"
  7. "sudo supervisorctl start laravel-worker:*"

Reference Link: https://laravel.com/docs/8.x/queues#supervisor-configuration


3.Verify Purchase

You're just a few steps away from setting up the backend of your application! After you have uploaded the Laravel files to the appropriate path using FTP, follow the steps below to get your server app running smoothly.

Purchase code verification


  • First, hit your site URL, and it will automatically take you to the purchase code verification section.
  • Provide required 777 file permissions for RouteServiceProvider & .env file
  • Fill the form with your purchase code informations & get verified

Once you got verified, you could see the landing website.

Accessing the Admin and Dispatcher Apps


2.Map Configuration

To enable zone creation and access various map functionalities, you'll need to add your Google Maps API key. Follow these steps:

  1. Navigate to the Admin App.
  2. Go to the Third Party Settings.
  3. Locate the Map API Settings section.
  4. Enter your Google Maps API key in the designated field.

Once the API key is configured, you will be able to create zones and utilize all map-related features seamlessly.

3.Firebase Configuration

  • After creating your account on Firebase, you need to set up a Realtime Database. Refer to the Android setup documentation for detailed instructions.
  • Once the Realtime Database is created, you will need to update the Firebase credentials directly in the Admin App. Navigate to Third Party Settings and then to Firebase Settings to enter your credentials.
  • Ensure the following JSON file is correctly configured:
    • public/push-configurations/firebase.json
  • To access real-time driver data from Firebase, ensure that you have configured the web app in Firebase. Follow the steps in the documentation to create the web app.

4.Queue Setup


  • For sending notifications and other tasks, we need to configure the Supervisor setup to run the queue jobs on the server by following the documentation here.
  • sample laraver-worker file
  • 
    [program:laravel-worker]
    process_name=%(program_name)s_%(process_num)02d
    command=php /var/www/html/project-name/artisan queue:work --sleep=3 --tries=3
    autostart=true
    autorestart=true
    user=ubuntu
    numprocs=8
    redirect_stderr=true
    stdout_logfile=/var/www/html/project-name/worker.log
    stopwaitsecs=3600
    

  • We need to run cron jobs so that please open the cronjob file and enter the below line with your projrvt name.
  • to open cronjob file please use the following command "crontab -e"
  • 
    * * * * * cd /path/to/your/project && php artisan schedule:run >> /dev/null 2>&1
    



5. Translation

  • We are using Google’s Auto-Translate API for translations, allowing you to automatically translate content as well as manually update translations when needed.
  • To set up translation for the mobile app, enable the Google Translation API in the Google Cloud Console, obtain the API key, and set it in the `.env` file as shown below.

You can also update translations manually. If you want to update translations in bulk, download the translation file for the group you want to update. After making changes, replace the file in `project-path/storage/lang/` with your updated translation file (`file.json`).