Skip to content

Release v1.4.0#41

Merged
GhDj merged 10 commits into
mainfrom
release/v1.4.0
Apr 29, 2026
Merged

Release v1.4.0#41
GhDj merged 10 commits into
mainfrom
release/v1.4.0

Conversation

@GhDj
Copy link
Copy Markdown
Owner

@GhDj GhDj commented Apr 29, 2026

Summary

v1.4.0 ships first-party visitor analytics for dev-tools.online and adds the
test scaffolding that landed alongside it.

Added

  • Visitor Tracker — integration of ghdj/laravel-visitor-tracker ^1.1:
    • New /tools/visitor-tracker public-facing tool page.
    • TrackVisitor middleware appended to the web group so all web
      requests are recorded.
    • Built-in dashboard at /admin/visitor-tracker, env-driven auth:
      token-based locally, allow_unprotected in production behind
      Cloudflare Access.
    • Geolocation enabled (ip-api) for country breakdowns.
  • Test scaffolding: phpunit.xml, tests/TestCase.php, plus unit and
    feature tests for the Base64, CSV, Markdown, SQL, and YAML services/APIs.

Operations

  • New cron/migrate.php entrypoint for the OVH cron, so package
    migrations apply on shared hosting without shell access.
  • Deploy workflow strips database/*.sqlite* and bootstrap/cache/*.php
    from the build before SFTP — dev artifacts never reach production, and
    the server re-caches config/routes after each deploy.
  • .gitignore now excludes local SQLite databases and cached bootstrap
    files.
  • Tests workflow disables the visitor-tracker dashboard so the package's
    boot-time auth guard doesn't trip in CI.

Operator notes (required on the production server)

  • VISITOR_TRACKER_ALLOW_UNPROTECTED=true (or VISITOR_TRACKER_TOKEN=...)
    must be set, otherwise the package's service provider throws on boot.
  • DB_CONNECTION=sqlite since the host has no DB server.
  • The OVH cron must be wired to cron/migrate.php so package migrations
    run after deploy.

The production .env already has these set, and Cloudflare Access is
gating /admin/*.

Bookkeeping

  • CHANGELOG: 1.4.0 entry plus backfilled 1.3.0 (Sort Lines), which
    shipped without a CHANGELOG entry.
  • Footer version bumped from v1.2.0 (stale) to v1.4.0.

Test plan

  • CI green on PR feat: integrate ghdj/laravel-visitor-tracker #40 (PHP 8.2 / 8.3 / 8.4)
  • After merge: tag v1.4.0 on main, publish GitHub release, deploy
  • Post-deploy: hit /tools/visitor-tracker, confirm a row lands in
    the prod sqlite visits table
  • Post-deploy: hit /admin/visitor-tracker through Cloudflare Access
    and confirm the dashboard renders

GhDj added 10 commits December 15, 2025 10:54
Wire the ghdj/laravel-visitor-tracker package (^1.1) into the app to
provide first-party visitor analytics for dev-tools.online.

Integration:
- Require ghdj/laravel-visitor-tracker ^1.1 (composer.json/lock).
- Append the package's TrackVisitor middleware to the web group in
  bootstrap/app.php so all web requests are recorded.
- Add the /tools/visitor-tracker route and sitemap entry, served by a
  new visitorTracker() action on ToolController plus a public-facing
  Blade view under resources/views/tools/visitor-tracker.blade.php.
- Rely on the package's loadMigrationsFrom for the visitors/visits
  schema; published copies are intentionally not committed.

Dashboard auth (env-driven via config/visitor-tracker.php):
- Local: token-based auth so the dashboard is gated by a shared secret.
- Production: allow_unprotected enabled because the dashboard route is
  fronted by Cloudflare Access, which performs the actual auth.

Operations:
- Add cron/migrate.php as the OVH cron entrypoint that bootstraps
  Laravel and runs migrate --force, so package migrations apply on
  shared hosting without shell access.
- .gitignore: ignore database/*.sqlite, *.sqlite-journal and
  bootstrap/cache/*.php to keep local artifacts out of the repo.
- deploy.yml: strip database/*.sqlite* and bootstrap/cache/*.php from
  the build before SFTP so dev artifacts never reach production.
The package's service provider throws a RuntimeException during
package:discover when the dashboard is enabled but no auth method is
configured. CI has no env vars set, so composer install fails before
tests can run. Disable the dashboard for the tests job — the suite
doesn't exercise it.
feat: integrate ghdj/laravel-visitor-tracker
- CHANGELOG: add 1.4.0 entry (visitor tracker integration, test
  scaffolding, deploy hardening, operator notes for required env vars).
- CHANGELOG: backfill missing 1.3.0 entry (Sort Lines tool, code
  editor PHP parse fix), since the 1.3.0 tag shipped without one.
- Bump footer version in layouts/app.blade.php from v1.2.0 to v1.4.0
  (was stale by one release).
Resolve conflicts from develop missing the v1.3.0 release-prep work
(Sort Lines tool, v1.2.1 PHP-string fix, CHANGELOG entries) that
landed on main via PR #38 but never synced back to develop.

- CHANGELOG: keep new 1.4.0 entry, take main's 1.3.0 + 1.2.1 entries
  (more thorough than the local backfill draft).
- Footer version: kept at v1.4.0.
- routes/web.php: keep both new routes (sort-lines from main, the
  visitor-tracker from this release).
- ToolController: keep both new methods, and add Sort Lines to the
  home tools list (was missing — would have failed feature tests).
- home.blade.php: keep main's @case('sort') icon block.
- code-editor.blade.php: take main's <' + '?php fix (the v1.2.1 fix).
- tests/Feature/WebRoutesTest.php: take main's version (adds
  sort-lines coverage to all the route lists).
@GhDj GhDj merged commit 048e772 into main Apr 29, 2026
3 checks passed
@GhDj GhDj deleted the release/v1.4.0 branch April 29, 2026 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant