Platform Installation & Setup Guide
End-to-end technical guide for deploying the FoodFeast Laravel backend on cPanel or VPS, importing the MySQL database, configuring task schedulers and background workers, and compiling the Flutter mobile customer application.
Platform Installation & Setup Guide
End-to-end technical guide for deploying the FoodFeast Laravel backend on cPanel or VPS, importing the MySQL database, configuring task schedulers and background workers, and compiling the Flutter mobile customer application.
Table of Contents
- 1. What's in Your Download Package
- 2. System & Hosting Requirements
- 3. Domain & Document Root Mapping
- 4. Upload & Extract Laravel Backend
- 5. Database Creation & SQL Import
- 6. Configure Environment Variables (.env)
- 7. Task Scheduler & Cron Job Setup
- 8. Queue Workers & Background Processing
- 9. Storage Symlink & Permissions
- 10. Connect Flutter Mobile App to Backend
- 11. Post-Installation Verification Checklist
What's in Your Download Package#
When you extract the main FoodFeast archive from CodeCanyon, you will find three primary components organized cleanly inside the Source_Code directory:
| Directory / File Path | Component Description | Target Environment |
|---|---|---|
Source_Code/Foodfeast-Laravel-Dashboard-v1/ |
Complete Laravel REST Backend Powers the Admin Portal, Restaurant Vendor Dashboard, Rider Dispatching, Customer Web Storefront, and REST API endpoints. |
Web Server (cPanel / Apache / Nginx) |
Source_Code/Foodfeast_user_app/ |
Flutter Mobile Customer Application Cross-platform mobile application supporting restaurant discovery, interactive ordering, table reservations, and live GPS delivery tracking. |
iOS & Android (Flutter SDK) |
Source_Code/database/foodfeast_db.sql |
Pre-Configured MySQL Database Snapshot Production-ready schema dump containing all database tables, roles, system settings, and demo restaurant fixtures. |
MySQL 8.0+ / MariaDB 10.5+ |
Documentation/ |
Full Offline HTML Documentation Interactive guides, architecture diagrams, and release notes viewable in any browser without internet access. |
Web Browser (Offline) |
System & Hosting Requirements#
Before beginning deployment, ensure your server and local workstation satisfy these technical prerequisites:
| Component | Minimum Requirement | Recommended Specification |
|---|---|---|
| Web Server | Apache 2.4+ (with mod_rewrite) or Nginx |
LiteSpeed or Nginx with HTTP/2 enabled |
| PHP Runtime | PHP 8.2 | PHP 8.2 or 8.3 (64-bit) |
| Required PHP Extensions |
BCMath, Ctype, cURL, DOM, Fileinfo, Filter, Hash, JSON, Mbstring, OpenSSL, PCRE, PDO, PDO_MySQL, Session, Tokenizer, XML, GD or Imagick
|
|
| Database Engine | MySQL 8.0+ or MariaDB 10.5+ | MySQL 8.0 with InnoDB engine & utf8mb4 collation |
| Mobile SDK | Flutter 3.24+ | Flutter 3.27+ with Dart SDK 3.5+ |
| Workstation Tools | VS Code or Android Studio, Git | Xcode 15+ (for macOS iOS builds), Android SDK 34+ |
HTTPS with a valid SSL certificate (e.g., free Let's Encrypt or Cloudflare SSL).
Domain & Document Root Mapping#
Laravel applications use a dedicated public/ subdirectory as their web root for security. Never expose the root directory containing .env or app/ directly to the internet.
Configure Your Web Server Document Root
In your cPanel or Nginx vhost, set the Document Root of your primary domain or subdomain directly to the Laravel public directory:
# Correct cPanel Document Root Path:
/home/username/public_html/public
# Correct Nginx Server Block root directive:
root /var/www/foodfeast/public;
index index.php index.html;
| Service Surface | URL Structure Example | Served By |
|---|---|---|
| Web Storefront | https://yourdomain.com/ |
Inertia.js / Blade Customer Frontend |
| Admin & Vendor Portal | https://yourdomain.com/login |
Laravel Backend Management Panel |
| Mobile REST API Base | https://yourdomain.com/api/ |
Sanctum Authenticated REST Endpoints |
| Public Uploaded Media | https://yourdomain.com/storage/ |
Laravel Storage Symlink (Images, Menus) |
Upload & Extract Laravel Backend#
Compress the Backend Folder
On your local computer, navigate to Source_Code/Foodfeast-Laravel-Dashboard-v1/. Create a ZIP archive of its contents (e.g., foodfeast-backend.zip).
Upload to Hosting via cPanel File Manager or SFTP
Log in to your cPanel dashboard, open File Manager, navigate to your domain's folder (e.g. public_html/), and click Upload.
Extract the Archive
Right-click the uploaded ZIP file in File Manager and select Extract. Ensure all folders (app, bootstrap, config, public, routes, storage, vendor) are extracted cleanly.
Database Creation & SQL Import#
FoodFeast provides a tested, ready-to-use database snapshot located at Source_Code/database/foodfeast_db.sql.
Create a MySQL Database & User in cPanel
Go to cPanel > MySQL Database Wizard. Create a database (e.g., user_foodfeast) and create a database user with a strong password. Assign ALL PRIVILEGES to this user.
Import the SQL Snapshot via phpMyAdmin
Open phpMyAdmin from cPanel, select your newly created database in the left sidebar, click the Import tab at the top, select Source_Code/database/foodfeast_db.sql, and click Go / Import.
mysql -u your_db_user -p your_db_name < Source_Code/database/foodfeast_db.sql
Configure Environment Variables (.env)#
In your extracted backend directory, locate the file named .env (if hidden, enable "Show Hidden Files" in cPanel File Manager, or copy .env.example to .env). Edit the file and update the following critical parameters:
# --- Application Environment ---
APP_NAME="FoodFeast"
APP_ENV=production
APP_DEBUG=false
APP_URL=https://yourdomain.com
# --- Database Credentials ---
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=your_database_name
DB_USERNAME=your_database_username
DB_PASSWORD=your_database_password
# --- Caching & Sessions ---
CACHE_STORE=file
SESSION_DRIVER=file
QUEUE_CONNECTION=database
# --- Filesystem Storage ---
FILESYSTEM_DISK=public
APP_DEBUG=false in production. Leaving debug enabled exposes internal stack traces and database credentials to visitors.
Task Scheduler & Cron Job Setup#
CRITICAL STEP: FoodFeast uses Laravel's task scheduler to automate mission-critical delivery workflows:
- Automatic Rider Order Dispatch: Scans for unaccepted orders and broadcasts them to the nearest available riders.
- Order Escalation: Automatically alerts operators or escalates if a restaurant does not accept an order within timeout.
- Vendor Subscription Expiry: Checks restaurant vendor plan expirations and updates their portal visibility daily.
Add Cron Job in cPanel
Log in to cPanel, navigate to the Advanced section, and click Cron Jobs.
Under Add New Cron Job, set the schedule to Once Per Minute (* * * * *).
Enter the following exact command (replace /home/username/public_html with your actual server directory):
* * * * * cd /home/username/public_html && php artisan schedule:run >> /dev/null 2>&1
Linux Crontab Setup (VPS / Cloud Dedicated)
If managing your own Ubuntu/Debian/CentOS server via SSH, open crontab with:
crontab -e
Add this line at the bottom of the file:
* * * * * cd /var/www/foodfeast && php artisan schedule:run >> /dev/null 2>&1
php artisan schedule:list via SSH or terminal. It will list all registered recurring tasks with their next execution times.
Queue Workers & Background Processing#
FoodFeast processes real-time push notifications (Firebase FCM), transactional order receipts, and payment webhook verification through an asynchronous database queue.
Start the Queue Worker
On your server, run the worker command to process queued tasks continuously:
php artisan queue:work --daemon --tries=3 --timeout=90
Supervisor Daemon Configuration (Linux VPS)
To ensure the queue worker restarts automatically if it crashes or the server reboots, create a Supervisor configuration file at /etc/supervisor/conf.d/foodfeast-worker.conf:
[program:foodfeast-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/foodfeast/artisan queue:work --sleep=3 --tries=3 --max-time=3600
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
user=www-data
numprocs=2
redirect_stderr=true
stdout_logfile=/var/www/foodfeast/storage/logs/worker.log
Enable and start the worker with:
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl start foodfeast-worker:*
Storage Symlink & Permissions#
Uploaded restaurant logos, food photos, banner graphics, and customer profile avatars are stored inside storage/app/public/. You must create the public symlink to make them accessible via web URLs.
Create the Storage Symlink
Execute this Artisan command via cPanel Terminal or SSH:
php artisan storage:link
(In cPanel without SSH access, you can also trigger this command by visiting the installer route or creating a temporary route in routes/web.php).
Set Writable Directory Permissions
Ensure your web server has write access to the following directories:
chmod -R 775 storage
chmod -R 775 bootstrap/cache
Connect Flutter Mobile App to Backend#
Now that your backend server is live, point the Flutter customer mobile application to your domain endpoint.
Open the Application Constants File
In VS Code or Android Studio, open the customer app folder: Source_Code/Foodfeast_user_app/.
Navigate to: lib/app/constants/app_constants.dart
class AppConstants {
// Replace with your live backend domain (MUST end with /api/ and use HTTPS)
static const String baseUrl = "https://yourdomain.com/api/";
// Media Base URL for uploaded images
static const String baseImageUrl = "https://yourdomain.com/storage/";
// Application metadata
static const String appName = "FoodFeast";
static const String appVersion = "1.0.0";
...
}
Restore Dependencies & Generate Code
Run the following terminal commands in the Foodfeast_user_app directory:
# Download Flutter packages matching the lockfile
flutter pub get
# Generate AutoRoute route files and serialization code
dart run build_runner build --delete-conflicting-outputs
Test in Emulator or Physical Device
flutter run
The app will launch, connect to your backend, and fetch active restaurant listings from your database.
Post-Installation Verification Checklist#
Confirm each of these 5 checkpoints before taking your platform live to customers:
| Verification Check | How to Test | Expected Result |
|---|---|---|
| 1. Storefront Loading | Open https://yourdomain.com in a web browser |
FoodFeast customer landing page renders with search bar and active restaurants. |
| 2. Admin Login | Visit https://yourdomain.com/login |
Login page loads; sign in with SuperAdmin credentials (superadmin@foodfeast.com / 12345678). |
| 3. REST API Health | Open https://yourdomain.com/api/web/business-settings |
Returns valid JSON with status code 200 OK. |
| 4. Media Storage Link | Upload a test restaurant banner in the Admin Panel | Image preview displays properly and serves from /storage/ without a 404 error. |
| 5. Task Scheduler Running | Run php artisan schedule:list or check cPanel cron log |
Shows registered order dispatch and subscription tasks executing on schedule. |
Next Step: Setup Firebase & Payment Gateways
Connect real-time push alerts and merchant payment processing for Stripe and PayPal.