mirror of
https://github.com/skysyaz/timesheet-staging.git
synced 2026-07-14 08:40:51 +00:00
composer install needs full app source for post-autoload-dump scripts. Use --no-scripts in the cached layer, run dump-autoload after full copy. Build verified locally.
Quatriz TimeSheet
Admin-facing weekly timesheet application built with Laravel 13, Filament 5, and PostgreSQL.
- Production: https://timesheet.quatriz-sd.my
- Staging (VPS IP): http://194.233.86.248/admin/login
- Admin panel:
/admin - PHP: ^8.3 (8.4 on VPS)
- Hosting: VPS with Caddy + PHP-FPM (
/var/www/timesheet)
Local setup
composer install
cp .env.example .env
php artisan key:generate
php artisan migrate
npm install && npm run build
php artisan serve
Run the scheduler and queue in separate terminals for full parity with production:
php artisan schedule:work
php artisan queue:work
Testing
php artisan test
composer audit
Observability
This app integrates three production monitoring tools:
| Tool | Purpose |
|---|---|
| Flare | Exception and error tracking |
| spatie/laravel-activitylog | Admin audit trail |
| Better Uptime | Uptime + scheduler/queue heartbeats |
Full setup, env vars, monitor URLs, and ops runbook: docs/OBSERVABILITY.md
Quick start (observability)
- Copy observability vars from
.env.example php artisan migrate(createsactivity_logtable)- Flare: set
FLARE_KEY+FLARE_REPORT=true, thenphp artisan flare:test --errors - Better Uptime: set
BETTER_UPTIME_ENABLED=true, generateUPTIME_HEARTBEAT_TOKEN, create monitors (see runbook) - Audit log: log in as admin → Administration → Audit Log
Troubleshooting
| Symptom | Check |
|---|---|
| No Flare events | FLARE_KEY set, FLARE_REPORT=true, php artisan config:clear |
| Heartbeat 503 | Cron running? php artisan schedule:run · Queue worker up? |
| Heartbeat 403 | UPTIME_HEARTBEAT_TOKEN matches monitor URL query string |
| Audit log empty | ACTIVITYLOG_ENABLED=true, migration applied |
/up fails from monitor |
Add probe IP to HEALTH_CHECK_ALLOWED_IPS |
Security
- Security contact: see
/.well-known/security.txt - Production:
APP_DEBUG=false,SESSION_ENCRYPT=true, CSP enforcement after verification
License
MIT
Description
Languages
PHP
52.1%
HTML
15%
Blade
14.6%
JavaScript
13.7%
CSS
2.8%
Other
1.8%