Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .ci/coverage/monitoring
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
100.00% of lines, 0 not covered
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ All notable changes are listed here. The format follows [Keep a Changelog](https

### Added
- Error tracking (`alveby/atrium-errors`, `atrium:module:install alveby/atrium-errors`), kept in the site's own database: PHP exceptions, queue jobs that failed for good, failed scheduled tasks and, when switched on, JavaScript errors of the site and the admin (a small script the module adds to the pages itself, reported to a rate-limited endpoint). Grouped by class and the first five frames of the app's own code, line numbers and changing values left out. **Site health → Errors**: the list with status buttons, search and filters by site, release, level, source and address; an error's page with its trace and code, the request, what happened before, a chart by hour or by day with the number on every bar, the addresses and releases it happens in, every event; resolve, **resolve in next release** (comes back only in another release), ignore, reopen. An **Errors in 24 hours** dashboard tile. E-mail and Telegram alerts for new errors, errors that came back and spikes, once per reason and ten in ten minutes at most. Secrets and personal data scrubbed before anything is stored (no headers, cookies, body or IP; filtered keys, e-mails, cards checked with Luhn, phones). Sampling, a per-minute cap, writing after the response or through a queue, a fallback log when the database is down, 90 days kept (`atrium:errors:prune`). Drivers: `database`, `sentry` (Sentry, self-hosted Sentry or GlitchTip with only a DSN, no SDK), `log`, and your own through `Atrium\Errors\Contracts\ErrorReporter` (Bugsnag, Rollbar, a webhook). Rights `errors.view` and `errors.settings`; an administrator of some sites sees only their errors. `atrium:errors:test` sends a test error everywhere. Guide in `docs/errors.md`. Labels in 15 languages; the chart's colours measured in all five themes.
- Monitoring (`alveby/atrium-monitoring`, `atrium:module:install alveby/atrium-monitoring`), on the site's own server with no outside service. Server timings of every request (time to the first byte, database queries and their time, cache hits and misses, peak memory, 5xx share) by route, site and language, slow queries kept with their values replaced by `?`; written to a file after the response and to the database once a minute in one transaction, with a sample rate and an early flush through a queue; about 0.15 ms added to a request with 20 queries, checked by `atrium:monitoring:benchmark`. Visitors' Web Vitals (LCP, INP, CLS, TTFB, FCP) from a script under 2 KB sent with `sendBeacon`: no cookies, no IP stored, no query strings, Do Not Track and Global Privacy Control respected, a sample rate, 30 beacons a minute from one address, malformed or oversized beacons refused. Uptime checks of every site's front page and added addresses every minute; an incident after N failures in a row (a setting), e-mail and Telegram alerts (token in the settings or `.env`), hooks `atrium.monitoring.incident.opened` / `.resolved`. **Site health → Speed and uptime**: p50, p75 and p95 by day, week or month from mergeable daily histograms, filters by site, language and device, the slowest routes, queries (each with its own page) and pages, links to the error log of a page, checks and incidents; a **Speed and uptime** dashboard tile; charts told apart without colour (markers, dashes, labels, a table of the numbers), colours measured in every theme. Raw data 7 days, daily aggregates 13 months (`atrium:monitoring:prune`). Right `monitoring.view`. Guide in `docs/monitoring.md`. Labels in 15 languages.
- Custom fields (`alveby/atrium-custom-fields`, `atrium:module:install alveby/atrium-custom-fields`): editors add fields to any module from a **Fields** button on its list, with no migration: line, text, integer, decimal, yes/no, date, list, multiple choice, link to a record, file and image, with a name and hint per content language, a tab of the module's form, and the flags required, show in the list, filterable, sortable, searchable, translatable and per site (or shown on one site only). Values live in a JSON column `custom` added with the first field; the filterable and sortable ones are also kept in a typed index table (`custom_field_index`), updated on every save and delete and rebuilt by `atrium:custom-fields:reindex`. `whereCustom()`, `whereCustomBetween()`, `whereCustomFilters()` and `orderByCustom()` on every Eloquent query, and `CustomFacets::for(Product::class, $query)->filters($filters)->counts([...])` / `->ranges([...])` for a filter panel (each field counted with every filter but its own). `atrium:custom-fields:promote` moves a hot field into a real indexed column of the module's table. The fields are in the API (`filter[code]=`, `sort=`, `search=`), its documentation and the MCP tool `describe_module`. On 100 000 records a filtered page of 24 takes 54–185 ms and its three facets 76–374 ms (SQLite, PostgreSQL 17, MySQL 8.4). With `atrium:install --demo` the catalog's products get five filterable fields (weight, battery life, waterproof, connectivity, warranty), named in all 15 languages and weighed in pounds for an English (US) shop, in kilograms elsewhere. Guide in `docs/custom-fields.md`. Admin labels in 15 languages.
- Ready-made sites (`alveby/atrium-solutions`): `php artisan atrium:solution:install law` turns a fresh project into a whole site: the modules it needs on and the others off (their data kept), the migrations, its content languages, the brand as the site name, its names for the modules in the admin and on the site, their addresses and the site menu, and its content in English, German and Russian; a second run doubles nothing. `atrium:solution:list` lists the solutions and the modules each still lacks; `--json` is the catalogue (texts in every language, modules, palette, fonts, screenshots, pages, install command). A solution is a folder with a `solution.json` and a seeder extending `SolutionSeeder`; other packages add their folders to `atrium-solutions.paths`. The first one is `law`: Vellmar Oake, a made-up law firm with six practice areas, six lawyers in two departments, insights, two offices, a consultation form, a fees FAQ and client reviews.
- Backup module (`alveby/atrium-backup`, on spatie/laravel-backup): the databases (MySQL, MariaDB, PostgreSQL, SQLite) in a consistent dump and the chosen disks and folders in one zip, encrypted with `ATRIUM_BACKUP_PASSWORD`, copied to a local folder, S3 or S3-compatible storage, FTP, SFTP or Google Drive, daily or weekly, with daily/weekly/monthly/yearly retention and a size cap. An e-mail to superadmins when a backup or a destination fails, the newest archive is too old or its size jumps. A **Backups** screen for superadmins only: the archives on every destination, **Back up now**, download, delete, destination health, and a restore that first shows what the archive will change (dumps, target databases, new/changed/extra files, warnings), asks for the archive's name and makes a safety backup; the same from `atrium:backup:restore` with `--dry-run`. Runs after the response or on a queue, one at a time, logged with who did it. See [docs/backup.md](docs/backup.md).
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ The Bitrix database is only read. The tabs, field order and list columns come ou
- [Moving from 1C-Bitrix, step by step](docs/bitrix.md)
- [Backups: databases and files to several places, schedules, health checks, restore](docs/backup.md)
- [Errors: PHP, queue and JavaScript errors in the site's database, alerts, Sentry and your own drivers](docs/errors.md)
- [Speed and uptime: server timings, visitors' Web Vitals, uptime checks with alerts](docs/monitoring.md)
- [CDN: pictures, resized copies and WebP/AVIF, cache purge, uploads to S3](docs/cdn.md)
- [Two-factor sign-in: authenticator apps, passkeys, codes, the sign-in log](docs/two-factor.md)
- [Social sign-in: providers, app registration, redirect URLs](docs/social-login.md)
Expand All @@ -140,6 +141,7 @@ The Bitrix database is only read. The tabs, field order and list columns come ou
| [`alveby/atrium-docs`](packages/docs/README.md) | Documentation pages from Markdown, with versions and search |
| [`alveby/atrium-backup`](packages/backup/README.md) | Backups of the databases and files, restore from the admin |
| [`alveby/atrium-errors`](packages/errors/README.md) | Error tracking in the site's database, alerts, Sentry |
| [`alveby/atrium-monitoring`](packages/monitoring/README.md) | Server and visitor speed, uptime and alerts, with no outside service |
| [`alveby/atrium-news`](packages/news/README.md) | News |
| [`alveby/atrium-pages`](packages/pages/README.md) | Static pages, with an import of 1C-Bitrix pages |
| [`alveby/atrium-catalog`](packages/catalog/README.md) | Product catalog with nested sections |
Expand Down
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"alveby/atrium-errors": "@dev",
"alveby/atrium-faq": "@dev",
"alveby/atrium-forms": "@dev",
"alveby/atrium-monitoring": "@dev",
"alveby/atrium-news": "@dev",
"alveby/atrium-pages": "@dev",
"alveby/atrium-reviews": "@dev",
Expand Down Expand Up @@ -77,6 +78,7 @@
"Atrium\\Errors\\Tests\\": "packages/errors/tests/",
"Atrium\\Faq\\Tests\\": "packages/faq/tests/",
"Atrium\\Forms\\Tests\\": "packages/forms/tests/",
"Atrium\\Monitoring\\Tests\\": "packages/monitoring/tests/",
"Atrium\\News\\Tests\\": "packages/news/tests/",
"Atrium\\Pages\\Tests\\": "packages/pages/tests/",
"Atrium\\Reviews\\Tests\\": "packages/reviews/tests/",
Expand Down Expand Up @@ -169,6 +171,7 @@
"alveby/atrium-errors": "0.1.x-dev",
"alveby/atrium-faq": "0.1.x-dev",
"alveby/atrium-forms": "0.1.x-dev",
"alveby/atrium-monitoring": "0.1.x-dev",
"alveby/atrium-news": "0.1.x-dev",
"alveby/atrium-pages": "0.1.x-dev",
"alveby/atrium-reviews": "0.1.x-dev",
Expand Down
Loading
Loading