Welcome to the APM (Approvals Management) documentation. This directory contains comprehensive guides for the Laravel-based Approvals Management System.
/docs in the browser (e.g. http://localhost/staff/apm/docs).apm:fix-single-memo-promoted-approval-trails).env template (.env.example), setup steps, and variable referencenotifications:test-fcm-pending-approvals, notifications:send-pending-approvals-fcm)apm:fix-single-memo-promoted-approval-trails)# Start queue worker
php artisan queue:work
# Process specific queue
php artisan queue:work --queue=high,default
# Restart queue workers
php artisan queue:restart
See Cron Setup Guide for complete cron configuration.
Key cron entries:
* * * * * cd /path-to-project && php artisan schedule:run >> /dev/null 2>&1
# Run migrations
php artisan migrate
# Run seeders
php artisan db:seed
# Clear cache
php artisan cache:clear
php artisan config:clear
php artisan route:clear
php artisan view:clear
From the apm/ directory. Repairs approval_trails for activities already converted to single memos (action labels and timestamps from activity_approval_trails). Full detail: Jobs and Commands → apm:fix-single-memo-promoted-approval-trails.
php artisan apm:fix-single-memo-promoted-approval-trails --dry-run
php artisan apm:fix-single-memo-promoted-approval-trails
php artisan apm:fix-single-memo-promoted-approval-trails --activity-id=118 --dry-run
From the apm/ directory. Full guide: FIREBASE_PUSH_NOTIFICATIONS.md.
# Test: list users with tokens + pending counts (no send)
php artisan notifications:test-fcm-pending-approvals --dry-run
# Test: send pending-approval FCM immediately (no queue worker required)
php artisan notifications:test-fcm-pending-approvals
# Production batch (queues jobs unless --sync)
php artisan notifications:send-pending-approvals-fcm
php artisan notifications:send-pending-approvals-fcm --sync
- API Documentation - Auth, endpoints, approval trails, actions, and curl examples
- OpenAPI spec: APM_API_OPENAPI.yaml
- Interactive Swagger UI: visit /docs when the app is running (e.g. http://localhost/staff/apm/docs)
- See System Updates for API summary and changelog
- Start with Approval Trail Management
- Review Document Numbering System
- Check Change Tracking Feasibility
- Read Queue Setup Guide
- Troubleshoot with Queue Troubleshooting
- Configure Supervisor Setup
- Review Approval Trail Archiving
- Check Sync Improvements
- See System Updates for recent features (including APM API and users sync)
- Start with Deployment Guide
- Configure Cron Setup
- Set up Queue Workers
- Review Approval Trail Archiving
- Check Queue Troubleshooting
- Set up Database Backup System - Configure automatic backups and retention policies
- Configure Daily Notifications
- Set up Session Expiry
- Configure Database Backups - Automatic backup scheduling and cleanup
See the Queue Setup Guide for detailed instructions.
Quick setup:
sudo apt-get install supervisorSee Cron Setup Guide for complete configuration.
Key points:
See Approval Trail Archiving for complete guide.
Quick reference:
- Check Queue Troubleshooting
- Verify Supervisor is running
- Check queue connection configuration
- Verify crontab entry
- Check file permissions
- Review cron logs
- Review Document Numbering System
- Check database configuration
- Verify sequence tables
- Check Daily Notifications Setup
- Verify queue is processing
- Review notification logs
apm/
├── documentation/ # All documentation (this directory)
├── app/
│ ├── Http/
│ │ └── Controllers/ # Laravel controllers
│ ├── Models/ # Eloquent models
│ ├── Jobs/ # Queue jobs
│ └── Console/
│ └── Commands/ # Artisan commands
├── database/
│ ├── migrations/ # Database migrations
│ └── seeders/ # Database seeders
├── resources/
│ └── views/ # Blade templates
└── routes/ # Route definitions
../README.md../../documentation/README.md - Central documentation for the entire CBP platform../../finance/documentation/ - Node.js/React Finance Management System documentation- Environment Variables - Configuration guide
- Auth Module Improvements - Authentication features
- Shared Header Usage - Component documentation
For issues or questions:
storage/logs/laravel.logLast Updated: 2025
Version: 1.1.0