Getting Started

Platform Dependencies

NameVersion
NODE^16.15.0
NPM^8.19.2
PHP^8.0

Installation

Step 1: Clone the repository

Clone the repository from Equetronic Dev Repo

Step 2: Setup Env

Rename .env.example to .env if .env does not exist.

Step 3: Composer Install

Run the following command:

composer install --ignore-platform-reqs

Step 4: VaahCMS Setup

Visit the following URL to set up the CMS:

<base-url>/public/vaahcms/setup  

Note: If you need sample data to work on, login to the backend control panel and go to the HRC module:

<base-url>/public/backend#/vaah/modules/?page=1  

And import sample data.

Step 5: Generate Language Files

Publish the language strings by visiting:

<base-url>/public/backend#/vaah/settings/localization  

And clicking Generate Language Files.

Step 6: Sync Roles and Permissions

In the backend, from the sidebar:

  • Go to Users and Access > Roles and click on the sync icon to sync roles.
  • Go to Users and Access > Permissions and click on the sync icon to sync permissions.

Sync

Step 7: Initialize Vaahvue and Equetronic Helpers module

  • In your GIT CLI/GUI tool, initialize the Vaahvue submodule and checkout to its latest develop branch.
  • In your GIT CLI/GUI tool, initialize the equetronic-helpers submodule and checkout to its latest develop branch.

Note: If you are facing an error while initializing, delete the following folder and try again:

<root-directory>\VaahCms\Modules\HRC\Vue\vaahvue

Step 8: NPM Install in HRC module

In your terminal, open the following path:

<root-directory>\VaahCms\Modules\HRC

and run the following command:

npm install

Step 9: Update ENV

Update the following values in your .env file and in .env.<environment-file> :

BROADCAST_DRIVER=pusher
PUSHER_KEY=
PUSHER_SECRET=
PUSHER_APP_ID=
PUSHER_APP_CLUSTER=

Step 10: Serve the Project

In the HRC module, run npm run dev, or if you have enabled HotReload, run npm run hot.

Step 11: Signin

  • Go to backend > Settings > General.
  • Expand Site Settings.
  • Find the field named Redirect after Backend Logout and select Custom.
  • Update the login URL as follows:
<base-url>/signin

Step 12: 'convert' was not found error

If you get an error saying

export 'default' (imported as 'convert') was not found in 'geo-coordinates-parser' (possible exports: convert)

convert error

Then go to the following page

VaahCms/Modules/HRC/Vue/hrcvue/GoogleMap/GoogleMapMarkers.vue

And change the following import line in the script tag from

import convert from "geo-coordinates-parser";

to

const { convert } = require('geo-coordinates-parser');

convert error fix


Environment Variables

The following table provides information about the environment variables used in the application:

VariablePurposeWhere to Find
WALK_UPPER_LIMITDefault walk upper limit for horsesProject Requirement & Discussion Document
TROT_UPPER_LIMITDefault trot upper limit for horsesProject Requirement & Discussion Document
CANTER_UPPER_LIMITDefault canter upper limit for horsesProject Requirement & Discussion Document
WEBRTC_PREDIALPrefixed number for WebRTC connectionProject Requirement & Discussion Document
WEBRTC_DOMAINDomain to connect for WebRTC connectionProject Requirement & Discussion Document
WEBRTC_SIP_PROXYProxy for WebRTC connectionProject Requirement & Discussion Document
SENTRY_LARAVEL_DSNDNS URL for SentryProject Settings in Sentry.com
SENTRY_TRACES_SAMPLE_RATESpecifies the percentage of collected transactions to send to SentryA number between 0 (0% of errors sent) and 1 (100% of errors sent)
HIDE_DEBUG_MESSAGESHides additional data shown for debug purposesNA
TRAINING_DATA_SYNC_DELAY_IN_MINUTESSpecifies the time in minutes to dispatch the job for syncing data from Fauna DB to the databaseNA
TRAINING_DATA_MAX_LIMITSpecifies the maximum number of data shown in Live training view, where the oldest record is deleted after reaching the limitNA
UPPER_LATITUDEUpper latitude of the top-left corner of a race-course map for calculating the angle of curvature of the EarthPlease refer to the "Checkpoint Calculations" section
LOWER_LATITUDELower latitude of the bottom-right corner of a race-course map for calculating the angle of curvature of the EarthPlease refer to the "Checkpoint Calculations" section

Enable HotReload for HRC Module

To enable HotReload for the HRC module, follow these steps:

  1. Edit the applicable env file. In this project, edit .env.<environment-file> and add the following line:
    MODULE_HRC_ENV=DEVELOP  

Improve Editor Performance

To enhance the performance of the editor, follow these steps:

  1. Exclude the following folders from indexing by marking them as excluded in your IDE (Select Folder > Right Click > Mark Directory as > Excluded):
    • <root-folder>/node_modules
    • <root-folder>/storage
    • <root-folder>/vendor
    • <root-folder>/VaahCms/Modules/HRC/node_modules
  2. Make sure the following folders are listed in the .gitignore file to avoid unnecessary tracking:
    .git
    .idea
    node_modules/
    vendor/
    vaahvue/
    
    /public/hot
    
    # Laravel Ignore Files
    composer.lock
    package-lock.json
    
    vendor
    
    /public/vaahcms
    /public/vendor
    /public/storage
    
    /storage/app/public/*
    !/storage/app/public/.gitkeep
    
    /storage/framework/cache/data/*
    !/storage/framework/cache/data/.gitkeep
    
    /storage/framework/sessions/*
    !/storage/framework/sessions/.gitkeep
    
    /storage/framework/testing/*
    !/storage/framework/testing/.gitkeep
    
    /storage/framework/views/*
    !/storage/framework/views/.gitkeep
    
    # End of Laravel Ignore Files
    
    Homestead.json
    Homestead.yaml
    npm-debug.log
    yarn-error.log
    
    yarn.lock
    
    *.log
    *.zip
  3. In <root-folder>/VaahCms/Themes/ThemeRxConnect/webpack.mix.js, make the following adjustments:
    • Comment out the following lines (uncomment them only when you need to compile these resources):
      mix.sass('Resources/assets/sass/site.scss', output_theme_folder+'/css/all.css');
      mix.sass('Resources/assets/sass/custom.scss', output_theme_folder+'/css/custom.css').options({
          processCssUrls: false
      });
    • If all your frontend changes are within the folder <root-folder>/VaahCms/Themes/ThemeRxConnect/Vue/app, comment out the following line:
      mix.js(source_vue_folder+"/public/public.js",  output_theme_folder+'/build/public.js');
    • If all your frontend changes are within the folder <root-folder>/VaahCms/Themes/ThemeRxConnect/Vue/public, comment out the following line:
      mix.js(source_vue_folder+"/public/public.js",  output_theme_folder+'/build/app.js');
  4. Instead of using npm run dev or npm run watch, use the following commands for better performance:
    • To enable HotReload:
      npm run hot
    • To enable automatic rebuilding on file changes:
      npm run watch-poll