Xavid Ahmed — X4V1D

Web Developer • PHP / MySQL • JavaScript • DataTables

About Skills Projects Code Contact Toggle Theme
Hi, I'm

I build secure, scalable, and high-performance web applications using modern standards. I specialise in PHP, MySQL, JavaScript, and advanced table-driven interfaces like DataTables.

Freelance Bangladesh Open Source

Core skills

PHP (7.4 / 8.x)
MySQL / MariaDB
HTML5 & CSS3
JavaScript & jQuery
Bootstrap / Responsive UI
DataTables / CRUD UIs
APIs / Integrations
Security & AES encryption
Responsive Web Design

Short bio

Xavid Ahmed (X4V1D) is a Bangladeshi web developer focused on building clean, maintainable code and delightful user experiences. Available for freelance and contract work.

Featured Projects

Customer Management System

Custom CRUD application with modal editing, CSV export, and user management with role-based permissions.

PHP MySQL Bootstrap DataTables

Telegram WebApp Coin System

Secure webhook & WebApp integration for user onboarding, rewards and transaction management for community engagement.

PHP MySQL Telegram API WebApp

Google Sheets Automation

Apps Script + PHP bridge for live spreadsheet workflows with real-time synchronization and data visualization.

Google Apps Script PHP REST API JavaScript

Code Examples

Here are some code snippets showcasing my coding style and expertise:

PHP
JavaScript
MySQL
/**
 * Secure AES-256 encryption/decryption helper class
 */
class Encryption {
    private $key;
    private $cipher = 'aes-256-cbc';
    
    public function __construct($key) {
        $this->key = hash('sha256', $key, true);
    }
    
    public function encrypt($data) {
        $ivSize = openssl_cipher_iv_length($this->cipher);
        $iv = openssl_random_pseudo_bytes($ivSize);
        
        $encrypted = openssl_encrypt(
            $data,
            $this->cipher,
            $this->key,
            OPENSSL_RAW_DATA,
            $iv
        );
        
        // Return IV + encrypted data in base64
        return base64_encode($iv . $encrypted);
    }
    
    public function decrypt($data) {
        $data = base64_decode($data);
        $ivSize = openssl_cipher_iv_length($this->cipher);
        $iv = substr($data, 0, $ivSize);
        $encrypted = substr($data, $ivSize);
        
        return openssl_decrypt(
            $encrypted,
            $this->cipher,
            $this->key,
            OPENSSL_RAW_DATA,
            $iv
        );
    }
}
/**
 * DataTables enhanced initialization with AJAX support
 */
class DataTableManager {
  constructor(tableId, options = {}) {
    this.tableId = tableId;
    this.options = {
      processing: true,
      serverSide: true,
      responsive: true,
      ...options
    };
    this.table = null;
    this.init();
  }
  
  init() {
    this.table = $(`#${this.tableId}`).DataTable(this.options);
    this.attachEventHandlers();
    return this;
  }
  
  attachEventHandlers() {
    // Handle row selection
    $(`#${this.tableId} tbody`).on('click', 'tr', (e) => {
      const $row = $(e.currentTarget);
      $row.toggleClass('selected');
      
      // Trigger custom event
      const rowData = this.table.row($row).data();
      $(document).trigger('dt:rowSelect', [rowData, $row.hasClass('selected')]);
    });
    
    // Handle refresh
    $(document).on('dt:refresh', () => this.refresh());
    
    return this;
  }
  
  refresh() {
    this.table.ajax.reload();
    return this;
  }
  
  getData() {
    return this.table.rows().data().toArray();
  }
  
  getSelectedRows() {
    return this.table.rows('.selected').data().toArray();
  }
}
-- Advanced query for reporting with multiple joins
SELECT 
    u.id AS user_id,
    CONCAT(u.first_name, ' ', u.last_name) AS user_name,
    COUNT(DISTINCT o.id) AS total_orders,
    SUM(oi.quantity * p.price) AS total_spent,
    AVG(oi.quantity * p.price) AS avg_order_value,
    MAX(o.created_at) AS last_order_date,
    GROUP_CONCAT(DISTINCT c.name ORDER BY c.name SEPARATOR ', ') AS categories_purchased
FROM 
    users u
LEFT JOIN 
    orders o ON u.id = o.user_id
LEFT JOIN 
    order_items oi ON o.id = oi.order_id
LEFT JOIN 
    products p ON oi.product_id = p.id
LEFT JOIN 
    product_categories pc ON p.id = pc.product_id
LEFT JOIN 
    categories c ON pc.category_id = c.id
WHERE 
    u.status = 'active'
    AND o.created_at >= DATE_SUB(NOW(), INTERVAL 6 MONTH)
GROUP BY 
    u.id
HAVING 
    total_orders > 0
ORDER BY 
    total_spent DESC
LIMIT 100;