Skip to main content

Contributing

Log Lens is developed in a private monorepo and published as two read-only mirrors, so there is nowhere to send a pull request. Bug reports and feature requests are welcome as issues; this page documents the layout and the checks, so a report can point straight at the code.

Dev setup

# Backend (no runtime deps; a fallback autoloader ships in packages/core/src/bootstrap.php)
composer install # optional

# Frontend
cd frontend && npm install

Run the checks

From the repo root:

composer test # PHPUnit suite: Unit/ (isolated) + Integration/EndToEndTest (full pipeline)
composer lint # php -l across packages/core

Lint the Laravel package too (Illuminate isn't installed in the monorepo, so static analyzers flag its classes - php -l still validates syntax):

find packages/laravel/src packages/laravel/config -name '*.php' -print0 | xargs -0 -n1 php -l

CI (.github/workflows/ci.yml) runs composer test/composer lint on PHP 8.2/8.3/8.4 and builds the frontend.

Build the frontend

cd frontend
npm run build # standalone to packages/core/public/ui
npm run build:laravel # adapter to packages/laravel/resources/dist

Both built outputs are committed (so consumers need no Node). Rebuild and commit when you change the frontend.

Conventions

  • Keep cliqthemes/log-lens-core dependency-free (standard PHP extensions only) and preserve the streaming, byte-range storage model - never load whole logs into memory.
  • Keep the HTTP layer transport-agnostic: controllers return LogLensResponse, never emit output or read superglobals. See Architecture.
  • Add a test under packages/core/tests/phpunit/ for any parsing, ingestion, dedup, or maintenance change (a focused Unit/ test, or extend the Integration/EndToEndTest for pipeline-level behavior).
  • Database changes: add the column/index in Database::runMigration() and bump Database::SCHEMA_VERSION so the migration re-runs on existing DBs.
  • Preserve strict per-application isolation - no endpoint may aggregate across applications.
  • Never transmit log content, stacks, context, or credentials to external services.

Repo layout

packages/core (engine) / packages/laravel (adapter) / frontend (shared UI) · skills (agent skills) / docs (API reference) / docs (this). See Architecture.