Files
Pulse/docs/development/MOCK_MODE.md
courtmanr@gmail.com fd39196166 refactor: finalize documentation overhaul
- Refactor specialized docs for conciseness and clarity
- Rename files to UPPER_CASE.md convention
- Verify accuracy against codebase
- Fix broken links
2025-11-25 00:45:20 +00:00

1.2 KiB
Raw Blame History

🧪 Mock Mode Development

Develop Pulse without real infrastructure using the mock data pipeline.

🚀 Quick Start

# Start dev stack
./scripts/hot-dev.sh

# Toggle mock mode
npm run mock:on     # Enable
npm run mock:off    # Disable
npm run mock:status # Check status

⚙️ Configuration

Edit mock.env (or mock.env.local for overrides):

Variable Default Description
PULSE_MOCK_MODE false Enable mock mode.
PULSE_MOCK_NODES 7 Number of synthetic nodes.
PULSE_MOCK_VMS_PER_NODE 5 VMs per node.
PULSE_MOCK_LXCS_PER_NODE 8 Containers per node.
PULSE_MOCK_RANDOM_METRICS true Jitter metrics.
PULSE_MOCK_STOPPED_PERCENT 20 % of offline guests.

How it Works

  • Data: Swaps PULSE_DATA_DIR to /opt/pulse/tmp/mock-data.
  • Restart: Backend restarts automatically; Frontend hot-reloads.
  • Reset: To regenerate data, delete /opt/pulse/tmp/mock-data and toggle mock mode on.

⚠️ Limitations

  • Happy Path: Focuses on standard flows; use real infrastructure for complex edge cases.
  • Webhooks: Synthetic payloads only.
  • Encryption: Uses local crypto stack (not a sandbox for auth).