netanalyzer/.env.example
Joseph McQueen 0a46d25bd6 chore: project cleanup — dead code, logging, tests, WS hardening
- Delete unused dataMerger, formatter, Device model, dead service exports,
  and the empty agents/ + .gitkeep placeholders.
- Extract STORE_MODES and MDM device-type filters into a shared constants.js.
- Anchor bot regexes (^help|^store|^analyze) so "analyze store 305" no
  longer fires both handlers; replace catch-all noise.
- Hoist inline require() calls in integrations to top-of-file imports.
- Harden WebSocket server: Authorization header support, single-agent
  enforcement, bounded pending requests, server-level error handler,
  coalesced cache refresh in Meraki client.
- Wrap Meraki/MDM network calls with withRetry; add request timeouts.
- Migrate all console.* calls onto utils/logger.js (LOG_LEVEL aware);
  drive Webex framework logLevel from env.
- Refactor storeDetail.js: shared renderClientLine + buildMdmSection
  helpers cut duplication roughly in half.
- Refresh README structure, document LOG_LEVEL, add npm run agent script,
  add jest testMatch + new tests (handlers, HealthReport, Store, ws).

Verified: npm run lint clean, 7 suites / 31 tests passing.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 17:21:22 -04:00

37 lines
1.4 KiB
Text

# =============================================================================
# NetAnalyzer Environment Configuration
# Copy this file to .env and fill in your actual values.
# NEVER commit .env — it is gitignored.
# =============================================================================
# --- Logging ---
# debug | info | warn | error (default: info)
LOG_LEVEL=info
# --- Webex Bot (required for bot functionality) ---
WEBEX_ACCESS_TOKEN=your_webex_bot_access_token_here
BOT_NAME=NetAnalyzer
# --- Meraki (required for network device discovery and client status) ---
MERAKI_API_KEY=your_meraki_api_key_here
MERAKI_ORG_ID=your_meraki_organization_id_here
# --- WebSocket Remote Agent ---
WS_PORT=8080
# Token used to authenticate the remoteAgent.js when connecting to this server
WS_TOKEN=generate_a_strong_random_token_here
# For the remote agent process (remoteAgent.js), point to the main server
WS_URL=ws://localhost:8080?token=generate_a_strong_random_token_here
# --- SIW / Store Information Warehouse (proxied via remote agent) ---
SIW_BASE_URL=https://your-siw-api.example.com/api
SIW_USERNAME=your_siw_username
SIW_PASSWORD=your_siw_password
# --- Workspace ONE (MDM / AirWatch) ---
WS1_BASE_URL=https://your-tenant.awmdm.com
WS1_TOKEN_URL=https://your-tenant.awmdm.com/api/mdm/token
WS1_CLIENT_ID=your_ws1_client_id
WS1_CLIENT_SECRET=your_ws1_client_secret
WS1_TENANT_CODE=your_ws1_tenant_code