fahim8401 / hplink-crm
HPLink CRM - Raw PHP CRM for cPanel/shared hosting
dev-main
2026-03-02 21:16 UTC
This package is auto-updated.
Last update: 2026-03-30 21:30:06 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
- Upload the entire
hplinkcrmfolder to your desired location (e.g.,public_html/hplinkcrm). - Set permissions for
storage/exportsandstorage/logsto writable (chmod 755orchmod 775as needed). - Visit
install/index.phpin your browser.- The wizard will check PHP extensions and folder permissions.
- Enter your database credentials, timezone, and currency.
- The wizard will write
config.phpand import the database schema and seed data. - On completion, you will see the default admin login and security reminders.
- Important: Delete the
install/folder after installation for security.
Manual Setup (Advanced):
- Copy
config.php.exampletoconfig.phpand update DB credentials and app settings. - Import
database/schema.sqlanddatabase/seed.sqlusing phpMyAdmin or MySQL CLI. - Set permissions for
storage/exportsandstorage/logsto writable. - Open
index.phpin your browser.
Pending Transaction Reminder:
- Each pending transaction now has a
settle_datefield (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.phpto 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
transactionstable includes asettle_datecolumn 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
hplinkcrmfolder to your desired location (e.g.,public_html/hplinkcrm). - Visit
install/index.phpin your browser to run the installer, or copyconfig.php.exampletoconfig.phpand edit manually. - Create MySQL DB & user, set credentials in
config.php. - Import
database/schema.sqlanddatabase/seed.sqlvia 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-09run 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