A system to track employee attendance across different branches, monthly salary calculations based on dynamic salary structures , best performer ("Employee of the Month") per branch and company-wide.
Clone the repo and follow below steps.
- Run
composer install
- Copy
.env.example
to.env
- Set valid database credentials of env variables
DB_DATABASE
,DB_USERNAME
, andDB_PASSWORD
- Run
php artisan key:generate
to generate application key - Run
php artisan migrate --seed
- Run
php artisan serve
as per your environment
Make sure database is seed before you use these credentials.
User: [email protected]
Password: 123456
If you have any issues please report them here.
Please feel free to make any project-related pull requests. You should give us an email at the following addresses if you wish to propose any new updates or features to the project.
1. Aryan Tyagi - [email protected]
- AWS CLI installed and configured locally (with
aws configure
) (run-instances — AWS CLI 1.40.5 Command Reference) - AWS account with permissions to create EC2 instances, key pairs, and security groups (run-instances — AWS CLI 1.40.5 Command Reference)
- SSH key pair (.pem) for accessing the EC2 instance (run-instances — AWS CLI 1.40.5 Command Reference)
- Git installed on local machine for cloning the repository (Deploy Laravel on AWS EC2 Ubuntu (nginx) - GitHub Gist)
- Ubuntu 20.04+ server (EC2 AMI or any VPS) (How To Install and Configure Laravel with Nginx on Ubuntu 20.04 ...)
- Domain name (optional) with an A-record pointing to the server’s public IP
-
Create a security group:
aws ec2 create-security-group \ --group-name performax-sg \ --description "Security group for PerforMax"
A security group acts as a virtual firewall controlling inbound/outbound traffic
-
Authorize ingress rules:
aws ec2 authorize-security-group-ingress \ --group-name performax-sg \ --protocol tcp --port 22 --cidr 0.0.0.0/0 aws ec2 authorize-security-group-ingress \ --group-name performax-sg \ --protocol tcp --port 80 --cidr 0.0.0.0/0 aws ec2 authorize-security-group-ingress \ --group-name performax-sg \ --protocol tcp --port 443 --cidr 0.0.0.0/0
These commands open SSH (22), HTTP (80), and HTTPS (443) ports
-
Launch the EC2 instance:
aws ec2 run-instances \ --image-id ami-0123456789abcdef0 \ --count 1 \ --instance-type t2.micro \ --key-name MyKeyPair \ --security-groups performax-sg
Replace
ami-0123456789abcdef0
andMyKeyPair
with your AMI ID and key pair name.
-
Connect via SSH:
ssh -i ~/MyKeyPair.pem ubuntu@YOUR_INSTANCE_PUBLIC_IP
Use the
ubuntu
user on Ubuntu AMIs -
Update packages:
sudo apt update && sudo apt upgrade -y
Ensures all system packages are current
-
Install PHP and extensions:
sudo apt install php-cli php-fpm php-mbstring php-xml php-pdo php-mysql unzip -y
Required by Laravel for core functionality
-
Install Composer globally:
curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php HASH=$(curl -sS https://composer.github.io/installer.sig) php -r "if (hash_file('SHA384', '/tmp/composer-setup.php') === '$HASH') { echo 'OK'; } else { echo 'FAIL'; unlink('/tmp/composer-setup.php'); } echo PHP_EOL;" sudo php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer
Composer manages Laravel’s PHP dependencies
-
Install Nginx:
sudo apt install nginx -y
Serves PHP applications efficiently
-
(Optional) Install MySQL:
sudo apt install mysql-server -y
If using a local database rather than a managed service
-
Clone your repository:
sudo mkdir -p /var/www cd /var/www sudo git clone https://github.com/Artyalert/PerforMax.git cd PerforMax
Places code under
/var/www
for web serving -
Set file permissions:
sudo chown -R www-data:www-data /var/www/PerforMax sudo chmod -R 755 /var/www/PerforMax/storage /var/www/PerforMax/bootstrap/cache
Ensures Nginx/PHP-FPM can write to cache and logs
-
Environment file:
cp .env.example .env nano .env
Update
DB_*
,APP_URL
, and other settings as needed -
Install dependencies & generate key:
composer install --no-dev --optimize-autoloader php artisan key:generate
Prepares vendor packages and application key
-
Create site configuration:
sudo tee /etc/nginx/sites-available/performax.conf > /dev/null <<EOF server { listen 80; server_name your-domain.com; root /var/www/PerforMax/public; index index.php index.html; location / { try_files \$uri \$uri/ /index.php?\$query_string; } location ~ \.php$ { fastcgi_pass unix:/run/php/php8.2-fpm.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name; } location ~ /\.ht { deny all; } } EOF
Directs all requests to Laravel’s
public/index.php
-
Enable and test:
sudo ln -s /etc/nginx/sites-available/performax.conf /etc/nginx/sites-enabled/ sudo nginx -t sudo systemctl reload nginx
Activates your site and reloads Nginx
cd /var/www/PerforMax
php artisan migrate --seed
php artisan config:cache
php artisan route:cache
php artisan view:cache
Sets up tables, sample data, and optimizes performance
-
Configure UFW:
sudo ufw allow OpenSSH sudo ufw allow 'Nginx Full' sudo ufw enable
Opens only necessary ports
-
(Optional) Obtain SSL via Certbot:
sudo apt install certbot python3-certbot-nginx -y sudo certbot --nginx -d your-domain.com -d www.your-domain.com
Automates HTTPS setup
Simply skip Step 1 (EC2 provisioning) and execute Steps 2–7 on any Ubuntu VPS via the command line ([How To Install and Configure Laravel with Nginx on Ubuntu 22.04 ...]
Your PerforMax application will now be live, secure, and optimized on AWS EC2 or any Ubuntu-based VPS.