FoodFeast · Admin App

Admin & Web Application Environment Configuration

Explore detailed guidance and instructions of 6amMart environment configuration, ensuring seamless operation and performance of your eCommerce platform.

Version: 1.0 Php version: 8.3 Laravel version: 12 Mysql version: 5.7+ Setup time: ≈ 60–90 min
1 Section

Introduction & Requirements

This guide walks you through the step-by-step setup and configuration of the 6amMart Admin Panel and Web application. Ensure your environment matches the required specifications before beginning.

Component Requirements
Admin & Web (V4.0) PHP 8.3 or higher, MySQL 5.7 or higher, Laravel 12
Mobile App (V4.0) Android Studio latest, Flutter SDK (version 3.44.2 Stable), JDK 17, Xcode 26.2 for IPA build
For React (V4.0) Node.js v16.8 or higher, Npm / Yarn, VS Code / WebStorm
For Rental Module (V2.0) Minimum code version 4.0

2 Section

Local Development Setup

Choose the right development environment for your local machine based on the operating system. Follow the instructions below for a smooth setup:

1

Windows (XAMPP)

Download and install XAMPP to set up a comprehensive local development environment on Windows.

2

Linux (LAMP)

Configure the LAMP stack on your Linux distribution for the local development environment.

3

MacOS (MAMP)

Install MAMP to establish a compatible local development environment on MacOS.

Each choice gives you a flexible setup that fits well with your computer's system. Watch the official tutorial videos for step-by-step help while installing.

3 Section

cPanel Configuration

Before starting the admin installation, the database must be configured for the application. Follow these database setup guidelines:

1

Create a database

Navigate to the MySQL Databases section and create a new database for the application.

2

Create a user for the database

Create a new database user and assign a secure password.

Avoid using the hash character ("#") in your database password.
3

Add user to the database

Associate the user with the database and assign all privileges.

From one hosting provider to the next, the interface or steps may differ. Speak with your server provider if you are having trouble configuring the database.
4

Domain Configuration

Navigate to your cPanel and locate the domain configuration. For 6amMart, it is essential to have two domains or subdomains. Use your main domain to host the customer web panel. Create a subdomain for the admin panel (e.g. if your domain is example.com, generate a subdomain like admin.example.com).


4 Section

VPS Droplet & LAMP Stack Setup

To host your application on a VPS (like Digital Ocean), configure a droplet with at least 2 cores CPU and 4GB RAM. Set up the LAMP stack (Linux, Apache2, MySQL, PHP) on Ubuntu by running these commands:

1

Update Package Lists

Ensure package repositories are up to date.

sudo apt update
2

Install Apache Server

Install Apache2 web server.

sudo apt install apache2 -y
3

Install MySQL Server

Install MySQL package.

sudo apt install mysql-server -y
4

Install PHP

Install PHP and core apache bindings.

sudo apt install php libapache2-mod-php php-mysql -y
5

Test PHP Processing

Verify PHP is rendering by placing an info.php page.

/var/www/html/info.php
echo "<?php phpinfo(); ?>" | sudo tee /var/www/html/info.php
6

Install Additional PHP Extensions

Install all required PHP packages for Laravel 12.

sudo apt install php-bcmath php-ctype php-json php-mbstring php-openssl php-pdo php-tokenizer php-xml php-zip php-fileinfo php-gd php-sodium php-mysql php-curl -y

5 Section

Apache Virtual Host Configuration

Configure a virtual host (vhost) file to point Apache to your project's public directory.

1

Create a Configuration File

Navigate to sites-available and create your configuration file.

Terminal Command
cd /etc/apache2/sites-available/
sudo nano your_domain.com.conf
2

Virtual Host Template

Paste the virtual host template, updating the DocumentRoot and server names to your domain.

your_domain.com.conf
<VirtualHost *:80>
    ServerAdmin webmaster@your_domain.com
    ServerAlias www.your_domain.com
    ServerName your_domain.com
    DocumentRoot /var/www/your_domain.com/public_html

    <Directory /var/www/your_domain.com/public_html>
        Options -Indexes +FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
3

Enable Site & Reload

Enable the site in Apache and restart the web server.

sudo a2ensite your_domain.com.conf
sudo systemctl reload apache2
Domain Propagation: Configure an A record for your domain pointing to your server IP. Global propagation can take up to 48 hours. Check status using dnschecker.org.

6 Section

SSL Configuration with Certbot

Set up a free, auto-renewing Let's Encrypt SSL certificate using Certbot.

1

Remove legacy Certbot packages

Avoid version conflicts by removing system-packaged Certbot versions.

sudo apt-get remove certbot
2

Install Certbot and Link Command

Install Certbot using snap and link the executable.

sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
3

Get and Install SSL Certificate

Run the Certbot Apache plugin to verify your domain and configure HTTPS.

sudo certbot --apache
4

Test Automatic Renewal

Verify that the renewal systemd timer works.

sudo certbot renew --dry-run

7 Section

MySQL Database Console Setup

If setting up the database via SSH, run the following SQL queries in the MySQL command console:

1

Login & Database creation queries

Log in to MySQL and initialize the database schema and credentials.

MySQL Shell Commands
sudo mysql

CREATE DATABASE your_database_name;
CREATE USER 'your_username'@'localhost' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON your_database_name.* TO 'your_username'@'localhost';
FLUSH PRIVILEGES;
EXIT;
2

Install phpMyAdmin (Optional)

Optionally install phpMyAdmin to manage tables graphically.

sudo apt update
sudo apt install phpmyadmin php-mbstring php-zip php-gd php-json php-curl -y
sudo systemctl restart apache2
When installing phpMyAdmin, when prompted for the web server selection, ensure apache2 is selected using the [SPACE] key, then press [TAB] and [ENTER]. If space is not pressed, the installer will skip configuring phpMyAdmin for Apache!

8 Section

Project Deployment & Permissions

1

Upload and Extract Files

Upload the ZIP file to /var/www/your_domain.com/public_html and unzip the contents.

apt install unzip -y
unzip your_file_name.zip
2

Configure file permissions

Apply standard file and folder permissions so Laravel can execute write operations.

chmod commands
sudo chmod 755 .env
sudo chmod 777 modules_statuses.json
sudo chmod 777 app/Providers/RouteServiceProvider.php
sudo chmod -R 777 storage
sudo chmod -R 777 bootstrap/cache
sudo chmod -R 777 resources/lang