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)getNextApprover) - Default workflow orders, roles, fund-type and funder gates, category shortcuts, and how ApprovalService picks the next WorkflowDefinition.env template (.env.example), setup steps, and variable referenceHELPDESK_* URLs, mail failover / Exchange OAuth alignment with the Helpdesk API (helpdesk/backend/). See also the Helpdesk documentation hub, User Guide, and Developer Guide.notifications:test-fcm-pending-approvals, notifications:send-pending-approvals-fcm)weekly-briefing:* commands; scheduler in bootstrap/app.php)apm:fix-single-memo-promoted-approval-trails, approver timing jobs, apm:backfill-approver-document-timings)# 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)
- WEEKLY_BRIEFING.md — routes, DivisionWeeklyBriefGate, settings, lifecycle, PDFs, mail, and weekly-briefing:* scheduler
- CHILD_SERVICE_REQUESTS.md — parent link, allow_child_service_requests, eligibility, budget cap, UI/PDF
- 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
- Weekly brief reminders and compiled sends: WEEKLY_BRIEFING.md (requires schedule:run in cron)
- 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
- See WEEKLY_BRIEFING.md (scheduler, --force, settings times)
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../../helpdesk/documentation/ - Laravel + Vue IT Service Desk / ITSM- User Guide — requesters, agents & admins; includes step-by-step ticket creation
- Developer Guide — stack, schema, REST API, extension points, runbooks
- Architecture — one-page overview
- Integration — Staff portal SSO, Staff Share API, WhatsApp & Teams webhooks
- APM ↔ Helpdesk integration notes
- Environment Variables - Configuration guide
- Auth Module Improvements - Authentication features
- Shared Header Usage - Component documentation
For issues or questions:
storage/logs/laravel.logLast Updated: 2026
Version: 1.1.0