Admin-only configuration. Changes take effect immediately.
The editor PIN is stored server-side in the Vercel environment variable PROCEDURE_EDIT_PIN. There is no hardcoded fallback and no client-side storage. To rotate the PIN, update the env var in Vercel β a redeploy is automatic.
When editing a formula or procedure, the editor prompts you for the PIN. The PIN is sent as an X-Procedure-Pin header and verified server-side. After 5 wrong attempts in 15 minutes, the user is rate-limited.
Who can edit: only users with role admin or manager, and with the correct PIN.
For your eyes only. Every reveal is logged with your email, timestamp, IP, and browser. Close this panel when you're done.
Original formula factors from v1 (pre-clean-model). For reference only β active formulas are managed in the Formula Editor.
Salt Base| Material | Factor | Base | Unit |
|---|---|---|---|
| Sodium Carbonate | 0.3 | Active MIT | g |
| Water for Sod. Carb. | 1.42 | Active MIT | ml |
| Material | Factor | Base | Unit |
|---|---|---|---|
| Sodium Carbonate | 0.03 | Active MIT | g |
| Water for Sod. Carb. | 0.1714 | Active MIT | ml |
| Material | Factor | Base | Unit |
|---|---|---|---|
| THF | 14 | Powder Weight | ml |
| Sat. Sodium Bicarb 1 | 6 | Powder Weight | ml |
| Oxone (total) | 0.72 | Active MIT | g |
| Water for Oxone | 3.43 | Active MIT | ml |
| Sodium Bicarbonate 2 | 0.281 | Active MIT | g |
| Sodium Bicarbonate 3 | 1.25 | Active MIT | g |
| STP | 0.39 | Active MIT | g |
| THF 2 | 2 | Fixed | L |
| EAC 2/3 | 3 | Fixed | L |
| Brine 3 | 2 | Fixed | L |
Shows the actual DB state for a batch β what procedure_steps look like now vs what batch_steps are linked to. Paste a Batch ID to diagnose wrong instructions or ingredient mismatches.
Fixes corrupted procedure_steps caused by the 0-based vs 1-based step_order mismatch bug.
This renumbers step_orders to 1-based sequential and re-links any orphaned batch_steps.
Run Diagnose first to confirm which procedure is broken, then use this to fix it.
⚠️ This will UPDATE procedure_steps content in the database.
Run pending schema migrations. Each migration is idempotent (safe to run multiple times). Run 014 first to add the ingredient_id column to batch_steps β this fixes the missing THF/ingredient issue permanently for new batches.
Re-links batch_steps to the correct procedure_step rows. Use this if batch execution shows wrong instructions, ingredients, or missing fields after a procedure was re-saved (step_order shift). Dry-run first to preview changes.