fahim8401/hplink-crm

HPLink CRM - Raw PHP CRM for cPanel/shared hosting

Maintainers

Package info

github.com/fahim8401/crmphp

Type:project

pkg:composer/fahim8401/hplink-crm

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-main 2026-03-02 21:16 UTC

README

Version: 1.0.0

Requirements

  • PHP 8.0+ or 8.1+
  • MySQL (5.7+ recommended)
  • Extensions: pdo_mysql, mbstring, json, fileinfo
  • Shared hosting/cPanel compatible (no Composer or external PHP packages)

Setup & Installation (Local or cPanel)

Recommended: Use the Install Wizard

  1. Upload the entire hplinkcrm folder to your desired location (e.g., public_html/hplinkcrm).
  2. Set permissions for storage/exports and storage/logs to writable (chmod 755 or chmod 775 as needed).
  3. Visit install/index.php in your browser.
    • The wizard will check PHP extensions and folder permissions.
    • Enter your database credentials, timezone, and currency.
    • The wizard will write config.php and import the database schema and seed data.
    • On completion, you will see the default admin login and security reminders.
  4. Important: Delete the install/ folder after installation for security.

Manual Setup (Advanced):

  • Copy config.php.example to config.php and update DB credentials and app settings.
  • Import database/schema.sql and database/seed.sql using phpMyAdmin or MySQL CLI.
  • Set permissions for storage/exports and storage/logs to writable.
  • Open index.php in your browser.

Pending Transaction Reminder:

  • Each pending transaction now has a settle_date field (date to remind for collection).
  • Use this field to track when to follow up for payment.

Cron Example (Month Close):

  • php /home/username/hplinkcrm/close_month.php 2025-09

Security

  • Change the default admin password after first login (admin@example.test / Admin@123).
  • Remove seed users after deployment.
  • All passwords are hashed with password_hash().
  • CSRF protection has been removed at user request.
  • Output escaped with htmlspecialchars().
  • Delete the install/ folder after installation for security.

Troubleshooting

  • DB Connection: Check credentials in config.php.
  • Permission Denied: Ensure storage/ subfolders are writable.
  • Session Path: Ensure PHP session path is writable. Use install/session_test.php to verify session persistence. If sessions do not persist, login will fail.
  • exec() Disabled: Some features (month close via web) require exec().

Manual Test Checklist

  • Login as admin, HR, employee; verify role restrictions.
  • Create transaction as HR with salary deduction; check salary tracker.
  • Mark pending transaction as received; check changed_by/changed_at.
  • Run close_month script; verify CSV and pending moved to next month.

Database Schema Notes

  • The transactions table includes a settle_date column for pending transactions.
  • Use this date to trigger reminders or reports for money collection.

File Structure

hplinkcrm/
├─ index.php
├─ .htaccess
├─ assets/
├─ controllers/
├─ services/
├─ lib/
├─ views/
│  └─ layout/
├─ storage/
│  ├─ exports/
│  └─ logs/
├─ database/
│  ├─ schema.sql
│  └─ seed.sql
├─ install/
│  └─ index.php
├─ config.php.example
├─ config.php
├─ close_month.php
└─ README.md

Deployment (cPanel)

  • Upload the entire hplinkcrm folder to your desired location (e.g., public_html/hplinkcrm).
  • Visit install/index.php in your browser to run the installer, or copy config.php.example to config.php and edit manually.
  • Create MySQL DB & user, set credentials in config.php.
  • Import database/schema.sql and database/seed.sql via phpMyAdmin or MySQL CLI, or use the installer.
  • Set permissions for storage/ to 755/775 as required.
  • Cron example: php /home/username/hplinkcrm/close_month.php 2025-09 run monthly.

Troubleshooting

  • DB Connection: Check credentials in config.php.
  • Permission Denied: Ensure storage/ subfolders are writable.
  • Session Path: Ensure PHP session path is writable.
  • exec() Disabled: Some features (month close via web) require exec().

Manual Test Checklist

  • Run the install wizard and verify all requirements and permissions are checked.
  • Login as admin, HR, employee; verify role restrictions.
  • Create transaction as HR with salary deduction; check salary tracker.
  • Mark pending transaction as received; check changed_by/changed_at.
  • Run close_month script; verify CSV and pending moved to next month.

Changelog

Version 1.1.0 (2024)

  • Added: Complete Clients management system (CRUD)
  • Added: Complete Transactions management system (CRUD) with filtering
  • Added: Reports page with financial summaries
  • Added: Users management (admin only)
  • Added: User profile page
  • Added: Activity logs viewer with filters
  • Added: Month Close web interface
  • Added: Improved dashboard with statistics widgets
  • Added: Mobile responsive navigation menu
  • Added: Developer documentation (DEVELOPERS.md)
  • Added: PHPDoc comments for better code documentation
  • Added: Input validation and error handling
  • Added: Flash messages for user feedback
  • Improved: Security with proper input sanitization
  • Improved: UI/UX with Tailwind CSS enhancements
  • Fixed: Flash message display with proper styling
  • Fixed: Mobile menu functionality

Version 1.0.0 (2024)

  • Fixed: Missing dependencies in lib/helpers.php - added required includes for auth.php and database.php
  • Fixed: Incomplete employee management routing - enabled full employee CRUD functionality
  • Added: Employee management views and interface
  • Added: Version tracking in composer.json
  • Improved: Code structure and dependency management
  • Enhanced: Employee listing with proper table layout and actions