{"id":50791347,"url":"https://github.com/andreapollastri/boogle","last_synced_at":"2026-06-12T11:02:36.460Z","repository":{"id":354041698,"uuid":"1220831532","full_name":"andreapollastri/boogle","owner":"andreapollastri","description":"Laravel Bug \u0026 Uptime monitor","archived":false,"fork":false,"pushed_at":"2026-06-04T21:29:23.000Z","size":186,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-04T23:11:45.690Z","etag":null,"topics":["errors","framework","laravel","logging","monitoring","php","tools","uptime","uptime-monitor","watch"],"latest_commit_sha":null,"homepage":"https://boogle.web.ap.it","language":"Blade","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andreapollastri.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-25T11:49:27.000Z","updated_at":"2026-06-04T21:29:28.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/andreapollastri/boogle","commit_stats":null,"previous_names":["andreapollastri/boogle"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/andreapollastri/boogle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreapollastri%2Fboogle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreapollastri%2Fboogle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreapollastri%2Fboogle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreapollastri%2Fboogle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andreapollastri","download_url":"https://codeload.github.com/andreapollastri/boogle/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreapollastri%2Fboogle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34240817,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["errors","framework","laravel","logging","monitoring","php","tools","uptime","uptime-monitor","watch"],"created_at":"2026-06-12T11:02:35.696Z","updated_at":"2026-06-12T11:02:36.454Z","avatar_url":"https://github.com/andreapollastri.png","language":"Blade","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Boogle\n\nBoogle is a Laravel platform to monitor application exceptions and track uptime.\n\n## Main Features\n\n- Authenticated dashboard and panel for projects, groups, users, and profile management.\n- Exception ingestion through `POST /api/log` (full client `exception` payload, including `http` and `user`).\n- Per-project uptime monitoring with:\n    - optional dedicated ping URL (`uptime_url`),\n    - `ProjectOfflineException` when the project is unreachable,\n    - automatic transition to `DONE` when the service is back online,\n    - email notifications for both outage and recovery.\n- Sanctum-protected Admin API for project/group CRUD and exception management.\n- OpenAPI documentation available in-app at `/api/docs`.\n\n## Requirements\n\n- PHP `^8.3`\n- Composer\n- Node.js + npm\n- SQL database supported by Laravel (for example: MySQL/MariaDB/PostgreSQL/SQLite)\n\n## Quick Installation\n\n1. Clone the repository and enter the project folder.\n2. Run the full setup:\n\n```bash\ncomposer run setup\n```\n\nThis command automatically runs:\n\n- `composer install`\n- `.env` creation from `.env.example` (if missing)\n- `php artisan key:generate`\n- `php artisan migrate --force`\n- `npm install --ignore-scripts`\n- `npm run build`\n\n## Cosa riceve e salva Boogle (app / API)\n\nSe usi `andreapollastri/boogle-client` aggiornato, il corpo di `POST /api/log` è `key` + `token` + `exception` (oggetto completo). Boogle in questa app:\n\n- **Ingestion** — persiste l’intero array `exception` in `raw_exception` (nascosto dalle risposte JSON in lista, incluso su `GET /api/admin/projects/{project}/exceptions/{id}`) e mappa in colonne: `http` (JSON), `user` (oggetto utente lato app), oltre a `host` / `method` / `fullUrl` in retro-compatibilità.\n- **Codici issue** — assegna automaticamente un codice tipo `#BUG42` o `#OUT3` in base al gruppo (prefisso opzionale) o al tipo (outage → sempre `OUT`).\n- **Pannello** — scheda dettaglio con blocco *HTTP request*, utente sotto *User (from client)*; niente “feedback” utente.\n- **Privacy (opzionale)** — in `config/boogle.php` / `.env` puoi disattivare la visualizzazione di `headers` e `session` nel dettaglio.\n\nDopo un `php artisan vendor:publish --tag=boogle-config` nelle app monitorate, allinea la sezione `http` con il client.\n\n## Client app integration (monitored Laravel apps)\n\nTo send exceptions from another Laravel application into this Boogle instance, install the client package and wire the exception reporter.\n\n1. Install and configure the client (see also **Installation** in the Boogle panel for project-specific keys):\n\n```bash\ncomposer require andreapollastri/boogle-client\nphp artisan boogle:install\n```\n\n2. Set environment variables for the project you are monitoring (values from the Boogle project **Installation** page):\n\n```env\nBOOGLE_KEY=\u003cproject_api_token\u003e\nBOOGLE_PROJECT_KEY=\u003cproject_key\u003e\nBOOGLE_SERVER=https://your-boogle-host.example/api/log\n```\n\n3. Register the reporter — the approach depends on your Laravel version:\n\n### Laravel 11+ (`bootstrap/app.php`)\n\n`-\u003ewithExceptions()` and `Illuminate\\Foundation\\Configuration\\Exceptions` are available from Laravel 11 onwards.\n\n```php\n\u003c?php\n\nuse Boogle\\Facade as Boogle;\nuse Illuminate\\Foundation\\Application;\nuse Illuminate\\Foundation\\Configuration\\Exceptions;\nuse Illuminate\\Foundation\\Configuration\\Middleware;\n\nreturn Application::configure(basePath: dirname(__DIR__))\n    -\u003ewithRouting(\n        // web, api, commands, health, …\n    )\n    -\u003ewithMiddleware(function (Middleware $middleware): void {\n        // middleware aliases, …\n    })\n    -\u003ewithExceptions(function (Exceptions $exceptions): void {\n        $exceptions-\u003ereportable(function (\\Throwable $e) {\n            Boogle::handle($e);\n        });\n    })-\u003ecreate();\n```\n\nOr using the shorthand helper:\n\n```php\n-\u003ewithExceptions(function (Exceptions $exceptions) {\n    Boogle::registerExceptionHandler($exceptions);\n})\n```\n\n### Laravel 9 / 10 (`app/Exceptions/Handler.php`)\n\nUse the classic `Handler` class. In the `register()` method:\n\n```php\nuse Boogle\\Facade as Boogle;\nuse Throwable;\n\npublic function register(): void\n{\n    $this-\u003ereportable(function (Throwable $e) {\n        Boogle::handle($e);\n    });\n}\n```\n\n\u003e **Note:** `registerExceptionHandler` is not needed here — pass the `Throwable` directly to `Boogle::handle($e)`.\n\n### Summary\n\n| Laravel version | Where to configure |\n|---|---|\n| 11+ | `bootstrap/app.php` → `-\u003ewithExceptions(fn($e) =\u003e Boogle::registerExceptionHandler($e))` |\n| 9 / 10 | `app/Exceptions/Handler.php` → `register()` → `$this-\u003ereportable(fn($e) =\u003e Boogle::handle($e))` |\n\n4. Verify connectivity:\n\n```bash\nphp artisan boogle:test\n```\n\n## Environment Configuration\n\nUpdate `.env` with:\n\n- database connection (`DB_*`)\n- mailer settings (`MAIL_*`) for notifications\n- queue driver (`QUEUE_CONNECTION`)\n\nIf you need a clean reset after migration changes:\n\n```bash\nphp artisan migrate:fresh --seed\n```\n\n## Running Locally\n\n### Recommended mode (single command)\n\n```bash\ncomposer run dev\n```\n\nThis starts:\n\n- web server (`php artisan serve`)\n- queue listener\n- log tail (`php artisan pail`)\n- Vite dev server\n\n### Manual mode (separate terminals)\n\n```bash\nphp artisan serve\nphp artisan queue:listen --tries=1 --timeout=0\nphp artisan schedule:work\nnpm run dev\n```\n\n## First Login\n\nThe default seeder creates an admin user:\n\n- Email: `admin@users.test`\n- Password: `password`\n\nAfter login:\n\n- Panel: `/`\n- API docs UI: `/api/docs`\n\n## Uptime Monitoring\n\nEach project can configure:\n\n- `uptime_enabled` (enable/disable ping)\n- `uptime_url` (optional, fallback to project `url`)\n\nScheduled commands:\n\n- `exceptions:send-digests` every minute\n- `projects:check-uptime` every minute\n- `exceptions:prune-old` daily at `02:30` (deletes exceptions older than 24 months)\n\nNotes:\n\n- uptime incidents are retained for 30 days\n- the uptime chart in project overview shows the last 30 days\n\nManual testing:\n\n```bash\nphp artisan projects:check-uptime\nphp artisan exceptions:send-digests\nphp artisan exceptions:prune-old\n```\n\n## Data Pruning Policy\n\n- Exception retention: 24 months\n- Prune command: `php artisan exceptions:prune-old`\n- Schedule: daily at `02:30` via Laravel scheduler\n\nTo run pruning manually:\n\n```bash\nphp artisan exceptions:prune-old\n```\n\n## Admin API\n\nBase path: `/api/admin`  \nAuth: `Bearer \u003csanctum-token\u003e` + admin user\n\nMain endpoints:\n\n- Projects: list/create/show/update/delete\n- Groups: list/create/show/update/delete\n- Exceptions: global list, list by project, show, update status\n\nOpenAPI spec:\n\n- static file: `public/openapi.json`\n- rendered docs: `/api/docs`\n\n## Quick Troubleshooting\n\n- No email notifications:\n    - verify `MAIL_*` in `.env`\n    - verify the queue worker is running\n- Uptime not updating:\n    - verify scheduler (`php artisan schedule:work` or cron)\n    - run `php artisan projects:check-uptime` manually\n- Invalid API token:\n    - regenerate project token from panel (`Project settings`)\n\n## Tech Stack\n\n- Laravel 13\n- Sanctum\n- Tailwind/Vite for frontend assets\n\n## Production Deploy\n\nBelow is a minimal production setup for scheduler and queue workers.\n\n### 1) Cron for Laravel scheduler\n\nAdd this cron entry on your server (usually with `crontab -e`):\n\n```cron\n* * * * * cd /var/www/boogle \u0026\u0026 php artisan schedule:run \u003e\u003e /dev/null 2\u003e\u00261\n```\n\nThis ensures scheduled commands (including uptime checks and digest jobs) run on time.\n\n### 2) Queue worker with Supervisor\n\nCreate `/etc/supervisor/conf.d/boogle-worker.conf`:\n\n```ini\n[program:boogle-worker]\nprocess_name=%(program_name)s_%(process_num)02d\ncommand=php /var/www/boogle/artisan queue:work --sleep=3 --tries=3 --timeout=120\nautostart=true\nautorestart=true\nstopasgroup=true\nkillasgroup=true\nuser=www-data\nnumprocs=2\nredirect_stderr=true\nstdout_logfile=/var/www/boogle/storage/logs/worker.log\nstopwaitsecs=3600\n```\n\nThen apply:\n\n```bash\nsudo supervisorctl reread\nsudo supervisorctl update\nsudo supervisorctl start boogle-worker:*\n```\n\n### 3) Queue worker with systemd (alternative)\n\nCreate `/etc/systemd/system/boogle-queue.service`:\n\n```ini\n[Unit]\nDescription=Boogle Laravel Queue Worker\nAfter=network.target\n\n[Service]\nUser=www-data\nGroup=www-data\nRestart=always\nExecStart=/usr/bin/php /var/www/boogle/artisan queue:work --sleep=3 --tries=3 --timeout=120\nWorkingDirectory=/var/www/boogle\nStandardOutput=append:/var/www/boogle/storage/logs/worker.log\nStandardError=append:/var/www/boogle/storage/logs/worker-error.log\n\n[Install]\nWantedBy=multi-user.target\n```\n\nThen apply:\n\n```bash\nsudo systemctl daemon-reload\nsudo systemctl enable boogle-queue\nsudo systemctl start boogle-queue\nsudo systemctl status boogle-queue\n```\n\n### 4) Post-deploy checklist\n\n- Run migrations: `php artisan migrate --force`\n- Clear/rebuild caches:\n    - `php artisan config:cache`\n    - `php artisan route:cache`\n    - `php artisan view:cache`\n- Ensure writable permissions for `storage` and `bootstrap/cache`\n- Verify:\n    - scheduler executes every minute\n    - queue workers are online\n    - mails are delivered correctly\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreapollastri%2Fboogle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreapollastri%2Fboogle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreapollastri%2Fboogle/lists"}