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

37 lines
1.2 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 🧪 Mock Mode Development
Develop Pulse without real infrastructure using the mock data pipeline.
## 🚀 Quick Start
```bash
# 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).