Skip to main content
This guide walks you through a full production deployment of Tripfy Africa. Follow each step in order.

Prerequisites

Before you begin, make sure your server meets these requirements:
RequirementMinimum version
PHP8.1+
MySQL8.0+
ComposerLatest stable
Node.js16.x+
SSL certificateRequired for production
Redis is strongly recommended for caching and queue processing. See the environment variables section for Redis configuration.

Installation

1

Upload files to server

Upload the entire project to your hosting server. Set the document root to point at the public/ folder.
/var/www/tripfy.africa/
├── public/          ← document root
├── app/
├── routes/
└── ...
2

Configure .env

Copy .env.example to .env in your project root, then update these values for your live server:
cp .env.example .env
APP_NAME="Tripfy Africa"
APP_ENV=production
APP_DEBUG=false
APP_URL=https://tripfy.africa

DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=your_database_name
DB_USERNAME=your_db_user
DB_PASSWORD=your_db_password

[email protected]
MAIL_FROM_NAME="Tripfy Africa"
Set APP_DEBUG=false in production. Leaving debug mode enabled exposes stack traces and environment variables to end users.
See the full environment variables reference below for all available options.
3

Import the database

Import the provided tripfy_africa.sql file into your MySQL database:
mysql -u root -p your_database_name < tripfy_africa.sql
4

Run migrations

Apply any pending migrations. This adds notification templates and other post-release fixes:
php artisan migrate
5

Install dependencies

Install PHP packages optimised for production. Generate an application key only if APP_KEY is currently empty in your .env:
composer install --optimize-autoloader --no-dev
If you run into a memory limit error, prefix the command with COMPOSER_MEMORY_LIMIT=-1.
6

Copy modified files

Replace the following files in your project with the versions from the release ZIP. These contain security fixes and Tripfy-specific customisations:Controllers (app/Http/Controllers/)
  • CheckoutController.php — security fixes, ownership checks
  • User/BookingController.php — bug fix, booking email to guide
  • User/ReviewController.php — correct rating formula
  • Admin/BasicControlController.php — live colour + dynamic CSS generation
Routes
  • routes/web.php — HTTP method fixes, security patches
  • routes/admin.php — removed dangerous /trans route, protected utilities
Views (resources/views/)
  • themes/adventra/layouts/app.blade.php
  • themes/adventra/layouts/user.blade.php
  • themes/adventra/partials/header.blade.php
  • themes/adventra/partials/pwa.blade.php
  • themes/adventra/frontend/package/list.blade.php
  • themes/adventra/frontend/checkout/userInfo.blade.php
  • admin/layouts/app.blade.php
  • admin/control_panel/basic_control.blade.php
CSS / JS (public/assets/)
  • themes/adventra/css/tripfy.css — light/dark theme system
  • themes/adventra/js/tripfy.js — theme toggle, scroll reveal
  • admin/css/tripfy-admin.css — admin panel branding
Seeders (database/seeders/)
7

Generate dynamic colours CSS

Run this once after deployment so the frontend picks up theme colours from the database:
php artisan tinker
app(\App\Http\Controllers\Admin\BasicControlController::class)
    ->generateDynamicCssPublic();
You can also trigger this by visiting Admin → Settings → Basic Control and clicking Save. The file is regenerated automatically on every save.
8

Set file permissions

The web server process must be able to write to storage/ and bootstrap/cache/:
chmod -R 775 storage/ bootstrap/cache/
chown -R www-data:www-data storage/ bootstrap/cache/
9

Optimise for production

Cache configuration, routes, and views to maximise performance:
php artisan optimize
php artisan config:cache
php artisan route:cache
php artisan view:cache
10

Set up the cron job

Add the Laravel scheduler to your server crontab so scheduled tasks run every minute:
crontab -e
* * * * * cd /path/to/tripfy.africa && php artisan schedule:run >> /dev/null 2>&1
Replace /path/to/tripfy.africa with the absolute path to your project root.

Admin panel access

Once installation is complete, access the admin panel at:
https://tripfy.africa/admin
FieldValue
Email[email protected]
PasswordSet during initial setup, or check AdminSeeder.php
Change the default admin password immediately after your first login. The seed password is not secure for production use.
From the admin panel you can control:
  • Basic Control — site title, currency, primary and secondary colours with live preview
  • Appearance — home page variation, tour listing layout, page themes
  • KYC Management — approve or reject guide identity verifications
  • Packages — review, approve, hold, or reject tour packages
  • Bookings — view all bookings across all guides
  • Payment Gateways — configure and enable payment methods
  • Email / SMS Config — SMTP, Twilio, and Infobip settings
  • Notification Templates — edit all email, SMS, and push templates
  • Languages — add and edit translation keys

Environment variables

The following table covers all variables in .env.example. Update each section for your environment.

Application

VariableDescriptionDefault
APP_NAMEApplication nameTripVendor
APP_ENVEnvironment (local, production)local
APP_KEYEncryption key — generate with php artisan key:generate
APP_DEBUGShow debug info (true/false)true
APP_URLFull application URLhttp://localhost
APP_TIMEZONEServer timezoneAfrica/Addis_Ababa

Database

VariableDescriptionDefault
DB_CONNECTIONDatabase drivermysql
DB_HOSTDatabase host127.0.0.1
DB_PORTDatabase port3306
DB_DATABASEDatabase nametrip_vendor
DB_USERNAMEDatabase userroot
DB_PASSWORDDatabase password(empty)

Cache, queue, and session

VariableDescriptionDefault
BROADCAST_DRIVERBroadcasting driverpusher
CACHE_DRIVERCache driver (file, redis)file
QUEUE_CONNECTIONQueue driver (database, redis)database
SESSION_DRIVERSession driverfile
SESSION_LIFETIMESession lifetime in minutes120

Redis

VariableDescriptionDefault
REDIS_HOSTRedis host127.0.0.1
REDIS_PASSWORDRedis passwordnull
REDIS_PORTRedis port6379

Mail

VariableDescription
MAIL_MAILERMail driver (smtp, mailgun, sendgrid, etc.)
MAIL_HOSTSMTP host
MAIL_PORTSMTP port
MAIL_USERNAMESMTP username
MAIL_PASSWORDSMTP password
MAIL_FROM_ADDRESSSender address
MAIL_FROM_NAMESender name
MAILGUN_DOMAIN / MAILGUN_SECRETMailgun credentials
SENDGRID_API_KEYSendGrid API key
MAILERSEND_API_KEYMailerSend API key
SENDINBLUE_API_KEYSendinblue API key
POSTMARK_TOKENPostmark token

Storage

VariableDescriptionDefault
FILESYSTEM_DISKDefault disk driverlocal
AWS_ACCESS_KEY_IDAWS access key
AWS_SECRET_ACCESS_KEYAWS secret
AWS_DEFAULT_REGIONAWS region
AWS_BUCKETS3 bucket name
DIGITALOCEAN_SPACES_KEYDigitalOcean Spaces key
DIGITALOCEAN_SPACES_SECRETDigitalOcean Spaces secret
DIGITALOCEAN_SPACES_BUCKETSpaces bucket name

SMS

VariableDescriptionDefault
SMS_METHODActive SMS provider (twilio, infobip, plivo, vonage)twilio
TWILIO_ACCOUNT_SIDTwilio account SID
TWILIO_AUTH_TOKENTwilio auth token
TWILIO_PHONE_NUMBERTwilio sender number
INFOBIP_API_KEYInfobip API key
INFOBIP_URL_BASE_PATHInfobip base URL
PLIVO_AUTH_IDPlivo auth ID
PLIVO_AUTH_TOKENPlivo auth token
VONAGE_API_KEYVonage API key
VONAGE_API_SECRETVonage API secret

Firebase (push notifications)

VariableDescription
FIREBASE_SERVER_KEYFirebase server key
FIREBASE_VAPID_KEYWeb push VAPID key
FIREBASE_API_KEYFirebase project API key
FIREBASE_AUTH_DOMAINFirebase auth domain
FIREBASE_PROJECT_IDFirebase project ID
FIREBASE_STORAGE_BUCKETFirebase storage bucket
FIREBASE_MESSAGING_SENDER_IDMessaging sender ID

Pusher (real-time broadcasting)

VariableDescription
PUSHER_APP_IDPusher app ID
PUSHER_APP_KEYPusher app key
PUSHER_APP_SECRETPusher app secret
PUSHER_APP_CLUSTERPusher cluster (e.g. ap2)

Social authentication

VariableDescription
GOOGLE_CLIENT_IDGoogle OAuth client ID
GOOGLE_CLIENT_SECRETGoogle OAuth client secret
GOOGLE_REDIRECT_URLGoogle OAuth callback URL
FACEBOOK_CLIENT_IDFacebook app ID
FACEBOOK_CLIENT_SECRETFacebook app secret
FACEBOOK_REDIRECT_URLFacebook OAuth callback URL

Maps and AI

VariableDescription
GOOGLE_MAPS_API_KEYGoogle Maps API key
GOOGLE_GEMINI_API_KEYGemini AI API key (used for package content generation)
TRANSLATE_METHODTranslation provider (azure)
SUBSCRIPTION_KEYAzure Cognitive Services subscription key
SUBSCRIPTION_REGIONAzure region

reCAPTCHA

VariableDescription
GOOGLE_RECAPTCHA_SITE_KEYreCAPTCHA site key
GOOGLE_RECAPTCHA_SECRET_KEYreCAPTCHA secret key

Build docs developers (and LLMs) love