# Dev Mock Endpoints

This folder contains Vite development-only API mock endpoints for Vue mini-apps.

## What Is Mocked Today

- `GlassBreakerController:verifyProtection`
- `GlassBreakerController:breakTheGlass`

Important: `GlassBreakerController:getProtectedMrnList` is **not** mocked.  
That means the patient list shown in BTG still comes from backend/project data (for example from `bin/generate_btg_mock_data.php`).

## Quick Start

1. Open a terminal in `redcap_v999.0.0/Resources/js/vue/components`
2. Run `npm run dev:mock`
3. Open the Vite dev app and launch `Break the Glass`
4. Edit `dev-mocks/btg-verify-protection.json` to control responses
5. Retry actions in UI (the mock file is read on each request)

## Mock Config File

- Default file: `dev-mocks/btg-verify-protection.json`
- Optional override at startup:
  - `VITE_API_MOCK_FILE=dev-mocks/btg-verify-protection.json npm run dev:mock`

## Docs

- Generic mock framework docs: `Resources/js/vue/components/dev-mocks/docs/mock-endpoints.md`
- BTG-specific test docs: `Resources/js/vue/components/dev-mocks/docs/btg-mock-endpoints.md`
