SchoolTripTrack is a comprehensive multi-vendor school bus tracker system for managing the daily school bus operation that links the school, the guardians and the buses into one powerful system..
SchoolTripTrack consists of two Flutter apps for guardians and drivers along with an Admin panel with a Laravel API system as a back-end and a Vue.js front-end system as a web interface.
Here we present the Admin web panel sub system
To ensure that the admin panel fully operational, some prerequisites need to be installed. In the following, I will list the required prerequisites and show how you can install them on a Ubuntu machine
sudo apt update sudo apt install apache2
sudo apt install mysql-server
#open a mysql terminal sudo mysql -u root #press enter when prompted for a password #write the following in mysql terminal ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'YOUR PASSWORD HERE'; #exit the mysql terminal exit;
sudo apt install software-properties-common sudo add-apt-repository ppa:ondrej/php sudo apt update sudo apt install php8.1
sudo apt install php8.1-common php8.1-mysql php8.1-xml php8.1-xmlrpc php8.1-curl php8.1-gd php8.1-imagick php8.1-cli php8.1-dev php8.1-imap php8.1-mbstring php8.1-opcache php8.1-soap php8.1-zip php8.1-intl -y
sudo apt-get install php-curl php-xml php-mbstring -y
sudo a2enmod rewrite sudo systemctl restart apache2
sudo apt-get install libapache2-mod-php8.1 sudo a2enmod php8.1 sudo systemctl restart apache2
sudo apt-get update
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
sudo apt-get install curl php-cli php-mbstring git unzip
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
Please record them as we will use them later.
Please record the file name as we will use it later.
Please record email, password, and UID as we will use them later.
Please record them as we will use them later.
Please record them as we will use them later.
Please record them as we will use them later.
Please record them as we will use them later.
Please record them as we will use them later.
Please record them as we will use them later.
As we indicated, the admin panel composed of a Laravel API system as a back-end and a Vue.js front-end system as a web interface. We indicate the installation steps for each of them separately.
I assume that the purchased admin web panel is located in the folder "SchoolTripTrack" at "/home/SchoolTripTrack". You can modify this path if you download the folder in a different path. Please follow the following steps for installation
cd /home/SchoolTripTrack
sudo update-alternatives --config php
composer install
ln -s ../../storage/app/public public/backend/storage
cp .env.example .env
APP_URL = your web site url, for example www.mydomain.com DB_USERNAME = root DB_PASSWORD = password of root user of mysql database FIREBASE_CREDENTIALS=Write the downloaded name in step (C)-5 and pre-append it with ./ (for example, ./SchoolTripTrack-demo-firebase-adminsdk-jm2jc-c057abcdef.json) Note: Use Score based (v3) Recaptcha keys in the following RECAPTCHA_SITE_KEY= your Recaptcha site key RECAPTCHA_SECRET_KEY= your Recaptcha secret key If you want to use Braintree, then set the following BRAINTREE_ENV=sandbox or live BRAINTREE_MERCHANT_ID= your Braintree merchant ID from step (D)-1 BRAINTREE_PUBLIC_KEY= your Braintree public key from step (D)-1 BRAINTREE_PRIVATE_KEY= your Braintree private key from step (D)-1 If you want to use RazorPay, then set the following RAZORPAY_KEY= your RazorPay key id from step (D)-2 RAZORPAY_SECRET= your RazorPay key secret from step (D)-2 If you want to use FlutterWave, then set the following FLW_PUBLIC_KEY= your FlutterWave public key from step (D)-3 FLW_SECRET_KEY= your FlutterWave secret key from step (D)-3 If you want to use PayStack, then set the following PAYSTACK_PUBLIC_KEY= your PayStack public key from step (D)-4 PAYSTACK_SECRET_KEY= your PayStack secret key from step (D)-4 If you want to use Stripe, then set the following STRIPE_KEY= your Stripe publishable key from step (D)-5 STRIPE_SECRET= your Stripe secret key from step (D)-5
GOOGLE_MAPS_API_KEY= Your Google Maps API key
MAIL_USERNAME MAIL_PASSWORD MAIL_FROM_ADDRESSPlease note that, if you are using gmail, you need to get the app password from your gmail account. You can get it from the following link https://myaccount.google.com/apppasswords. Do not use your gmail password here. Use the app password instead. You can find more details here.
php artisan key:generate
chmod -R 777 storage bootstrap/cache
sudo chown -R $USER:$USER public sudo chown -R $USER:$USER storage/app/public/avatars/
sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/SchoolTripTrack.conf
<VirtualHost *:80>
ServerName SchoolTripTrack
DocumentRoot /home/SchoolTripTrack/public
<Directory /home/SchoolTripTrack/public>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
sudo a2dissite 000-default.conf sudo a2ensite SchoolTripTrack.conf sudo systemctl restart apache2
mysql -u root -p #enter the root password when prompted create database SchoolTripTrack_db; #then exit the mysql terminal
Database migration will fail if you did not do this
chmod -R 777 storage bootstrap/cache
Database migration will fail if you did not do this
sudo chown -R $USER:$USER public sudo chown -R $USER:$USER storage/app/public/avatars/
Database migration will fail if you did not do this
$user = User::create([
'name' => 'SuperAdmin',
'email' => 'admin@yourdomain.com',
'password' => Hash::make('admin123456'),
'role' => 0,
'status_id' => 1,
'uid' => "l8nIta8bjOVLifjV0uktyUu5iF53"
]);
php artisan migrate:fresh --seed
sudo apt-get install redis-server sudo systemctl enable redis-server.service sudo apt-get install php-redis
sudo apt-get install nodejs sudo apt-get install npm
sudo npm install -g laravel-echo-server sudo laravel-echo-server init #I recommend to press enter to choose the default answer for every question (except if you have https instead of http) sudo nohup laravel-echo-server start & #start the laravel-echo-server in background and make it permanently alive
chmod 777 public/privacy.html chmod 777 public/privacy_local.html chmod 777 public/terms.html chmod 777 public/terms_local.htmlNow, the Laravel API system is ready to be used. You can verify that by opening the url "your domain and append it with /backend (for example www.mydomain.com/backend) in a browser. You should see the following image
In the following, we show how to install the Vue.js front end that will be used as a web interface for the admin panel
cd /home/SchoolTripTrack
cd front-end
cp .env.production.example .env.production
Edit the file ".env.production" and set the following
# API Config VUE_APP_API_URL=your web site url, for example www.mydomain.com and append it with /backend. For example, www.mydomain.com/backend # Firebase Config VUE_APP_API_KEY=AIzaSy..... (from step (C)-4) VUE_APP_AUTH_DOMAIN=SchoolTripTrack.... (from step (C)-4) VUE_APP_PROJECT_ID=SchoolTripTrack.... (from step (C)-4) VUE_APP_STORAGE_BUCKET=SchoolTripTrack.... (from step (C)-4) VUE_APP_MESSAGING_SENDER_ID=544..... (from step (C)-4) VUE_APP_APP_ID=1:544.......:web:01b......... (from step (C)-4) # Google Maps Config VUE_APP_GOOGLE_MAPS_API_KEY=Your Google Maps API key. # System Name VUE_APP_SYSTEM_NAME= Your System Name (instead of SchoolTripTrack) # RECAPTCHA Config VUE_APP_RECAPTCHA_SITE_KEY= Your Recaptcha site key
Edit the file "front-end/public/index.html" and set the title to your system name (instead of SchoolTripTrack)
<title>Your System Name</title>
npm install
npm run build
cp -r dist/* ../public/Now, the Vue.js front end is ready to be used. You can verify that by opening the url "your domain (for example www.mydomain.com) in a browser. You should see the login page of the admin panel
Once you installed SchoolTripTrack as indicated above, login with the super admin account credentials to set the different keys used by SchoolTripTrack
Go to this link and enter your purchase key. Please enter your complete website URL, for example https://www.mydomain.com and append it with /backend. For example,https:// www.mydomain.com/backend You can get the purchase key from your CodeCanyon download section. More information is here. domain (or localhost). You will get two secure keys. One for your web site url and the other for localhost. Copy your secure keys and keep it in a safe place as you will not be able to generate them again.
Open your web site and login with the super admin credentials.
You will see "Activate your account" button. Click on it and you will be redirected to the activation page
Enter your secure key and click "Activate"
crontab -e
* * * * * cd /home/SchoolTripTrack && php artisan schedule:run >> /dev/null 2>&1
Change the timezone in config/app.php. Select one from here
Make sure that you write the crontab command correctly. Please see step (F)-5 above
Note that the apps are working on a copied version from the trips table. This means that any change in the trips table will not be reflected immediately in the apps, but will reflected in future trips.
Configure your firewall and make sure that you allow traffic through the port 6001
Go to the url of the admin panel and append it with 6001, i.e., open http://YOUR_WEBSERVER_URL:6001 and check if it gives OK
chmod -R 777 storage bootstrap/cache
The .env file is used by the Laravel API system, while the .env.production file is used by the Vue.js front end. Both systems require the Google Maps API key. The Laravel API system uses it for server-side calls with the Routes API, which cannot be accessed from the client side. Meanwhile, the Vue.js front end uses it for client-side calls with other Google Maps APIs. Therefore, the API key must be configured in both systems.
It is recommended to use two different API keys, one for the server-side in the .env file and the other for the client-side in the .env.production file. This way, you can restrict the usage of the API key to the specific system. For the server-side API key, you can restrict the usage to the server's IP address, while for the client-side API key, you can restrict the usage to your website domain. This will help prevent unauthorized usage of your API key. You can find more information on securing your API key in the Google Maps Platform documentation here.
Once again, thank you so much for using SchoolTripTrack. As I said at the beginning, I'd be glad to help you if you have any questions. I'll do my best to assist. If you have a more general question relating to the items on CodeCanyon, you might consider visiting the forums and asking your question in the "Item Discussion" section.
CreativeAppsDev Team