Skip to content

Latest commit

 

History

History
48 lines (35 loc) · 1.85 KB

File metadata and controls

48 lines (35 loc) · 1.85 KB

Contributing to vshosting-monitor

Thanks for your interest. This is a small, focused tool — contributions that keep it small and focused are most likely to be merged.

Ground rules

  • GET-only API access. The only mutating call is POST /api/public/auth/login to obtain a bearer token. Do not add any other mutating endpoints without prior discussion.
  • Stateless by design. No on-disk state file, no alert deduplication, no caching. If you need this, open an issue first.
  • Minimal dependencies. Two runtime deps (dotenv, cli-table3). New ones need a strong justification.
  • English-only user-facing output.
  • Strict > thresholds. "More than 70%" means > 70, not >= 70.
  • Always guard nullable stats with value == null before comparing.

Development setup

git clone https://github.com/be-lenka/vshosting-monitor.git
cd vshosting-monitor
npm install
cp .env.example .env
# fill in VSHOSTING_EMAIL, VSHOSTING_PASSWORD (and SLACK_WEBHOOK_URL if testing notify)

Running checks

npm run check                 # syntax check all source files
npm test                      # run unit tests
npm start                     # render the live server table
npm run notify -- --dry-run   # exercise notify without posting to Slack

Project layout

See README.md. Pure functions live in src/filter.js and src/evaluator.js — those are the easiest to add tests for.

Pull request checklist

  • npm run check passes
  • npm test passes
  • Updated .env.example and README if you added a config variable
  • Updated CLAUDE.md if the change affects AI-assistant guidance
  • Commit messages are descriptive

Reporting bugs / security issues

  • Functional bugs: open a GitHub issue.
  • Security issues: see SECURITY.md — do not file a public issue.