Where to go in the Loghound code to change something, how to run the tests and a preview, and the rules every contribution follows.
src/Score/Signals.php (the evidence) and src/Score/Rules.php (weights, reasons); raise Rules::RULE_VERSION when weights change; tests in tests/test_scoring.php for the rule firing and not firing; docs/DETECTION.md.
A controller in src/Panel/, registered in Layout::routes() and Layout::nav(); a module in public/assets/js/views/ imported by app.js; docs/PANEL.md.
The schema in solr/*/conf/schema.xml; fill it in Parser.php (hits) or bin/loghound-score (sessions); allow it in src/Panel/Query.php; SPEC.md and docs/SCHEMA.md. Renaming or removing a field is discussed first.
public/b.js, public/collect.php, src/Beacon.php, src/Beacon/Doc.php; docs/BEACON.md. A test fails if the documented options fall behind the script.
src/LogDetect.php, plus a fixture in tests/fixtures/.
Config::defaults() (and validate()), config/loghound.example.php, the settings page in src/Panel/Settings.php, and its documentation.
A script in bin/ following the existing ones, the bin list in composer.json, and for a schedule a unit and timer in install/ plus install.sh.
public/assets/css/panel.css, the only file where colours are defined.
- A test file is
tests/test_<name>.phpreturning named closures; the runner finds it by itself. - Versions are the headings in
CHANGELOG.mdand the matching git tags.
They are written in CONTRIBUTING.md; in short:
- No dependencies: no Composer packages, no npm, no build step, no CDN.
- Security first: escape at output, user text to Solr only as bound parameters, allowlisted field names, safe paths, CSRF on every change, no secrets in code.
- Honesty: an unknown number is absent, never zero; every verdict carries its reasons; limitations are documented.
- Style: PSR-12, four spaces, single quotes, strict types, and the comment rules in
CONTRIBUTING.md. - One change per pull request, with its documentation and a changelog entry.
Become a contributor
Read SPEC.md and CONTRIBUTING.md in the repository, then write to support@opensolr.com to ask for contributor access to Loghound or any other Opensolr open source project. Issues and pull requests on GitHub are open to everyone.
For developers
- Project structure
- How data moves
- Changing the code