Production readyFinancev1.0.0 · updated Jul 26, 2026
DM

Open Source Drawdown Monitor Template

Know how much room you have left.

A daily loss-limit monitor that shows remaining headroom rather than P&L, escalates through defined states, and latches at the limit until you acknowledge it.

Runnable Agent-ready Install-ready Deploy-ready
foundationbase.app/demo/drawdown-monitorOpen full demo →

This is the real app, not a mockup. Whatever you enter in the demo stays in your browser and belongs to nobody.

What you get

One zip. Everything to own it.

Funded accounts, prop-firm evaluations, and personal trading rules share one failure mode: the limit gets breached because nobody was watching the number. Drawdown Monitor keeps a single figure in front of you — how much you can still lose today — and escalates as it drains. The primary number is headroom, not P&L, because "down $588" needs arithmetic under stress and "$412 left" does not. Two behaviours carry the whole design. Stop latches: once you hit the limit the alert stays until you acknowledge it, even if the number recovers, because an alert that clears itself is one you learn to wait out. And no-link is a state rather than an error toast, because a stale screen that looks calm is the most dangerous thing a risk monitor can show you. Sessions reset on your account's own cutoff in its own timezone — prop firms reset at 5 or 6pm US Eastern, not your local midnight, and getting that wrong makes the app confidently wrong at exactly the wrong moment.

  • Remaining headroom as the primary figure, not P&L
  • Four-state escalation with user-editable thresholds
  • Stop latches until acknowledged, then goes steady rather than off
  • No-link is a first-class state after 45 seconds of adapter silence
  • Session boundary in the account's own timezone, not local midnight
  • Demo and manual adapters, with a documented interface for broker adapters
  • Synthesised alert tones, off by default, and reduced-motion honoured
drawdown-monitor.zipMIT
drawdown-monitor/├── app/the running Next.js app├── agent/START_HERE, PROJECT_MAP, RULES, RECIPES, TESTS, DEPLOY├── CLAUDE.mdread automatically by Claude Code├── AGENTS.mdread automatically by Codex├── .cursor/rules/loaded automatically by Cursor└── README.mdrun it, then make it yours

Inside the app

What the running app actually looks like
Drawdown Monitor: Monitor
MonitorOne number, and how much of the limit is gone.

Customize with AI

Your agent already knows this codebase.

Ships with CLAUDE.md, AGENTS.md, Cursor rules, and a full agent handbook — project map, safety rules, recipes, tests, and deploy notes.

Claude CodeCursorCodex

Prompts written against this app

Change the branding, copy, and layout for my Drawdown Monitor app.
Add or remove fields so it matches my workflow.
Add export and import for my finance data.
Add optional sync later without changing the local-first default.

Run it

5 min to your own copy.

  1. 01Create your editable app copy and unzip it.
  2. 02Run npm install.
  3. 03Run npm run dev and open http://localhost:3000.
  4. 04Set your loss limit, session reset time, and timezone before anything else.
  5. 05Read /agent/START_HERE.md before customizing — several constraints here are deliberate.
Full walkthrough, including deploy and install →
Where your data lives

Drawdown Monitor data stays in this browser by default.

No account, backend, or cloud sync is included in the current package.

An agent can add optional sync later while preserving the local-first default.

Honest limitation

This package is standard-ready for Create My App and AI customization.

A full app-only PWA install route is not enabled yet for this app.

Verification receiptchecked Aug 2, 2026 at c11c184 · v1.0.0
Demo renderscaptured 2026-08-02, 32 KBpassed
Package installs and buildsinstalled, typechecked and built in 61s on node v24.13.0passed
Source package complete31 files, 59 KBpassed
Agent instructions included5 handoff files presentpassed
No network calls in app sourcestatic scan clean: no network calls, eval, or secrets in app sourcepassed
License matches the packageMIT, matching the file in the packagepassed

Questions people ask

Can it close my positions or place orders?

No. It is read-only by design — there is no order placement, position modification, or auto-flatten anywhere in the codebase, and broker adapters should use read-only API scopes. An app that can close your positions is a different product with a different liability profile.

Does it work with my broker?

It ships with a demo adapter and a manual adapter, and the manual one works with every broker on earth — you type the P&L and the app does the rest. No live broker adapter is included, because shipping one that could not be tested here would be a claim rather than a feature. The BrokerAdapter interface is documented in the package and adding one is a well-scoped change.

Where do my credentials and positions go?

Nowhere. There is no server and no account. Settings and session history live in your browser. If you add a broker adapter, its credentials are stored locally and used only for calls from your own machine to your broker.

Why does it show headroom instead of profit and loss?

Because the moment the number matters is the moment you are least able to do arithmetic. "Down $588 against a $1,000 limit" is a subtraction; "$412 left" is not.

Is this financial advice?

No. It reports one number against a limit you set. It does not suggest trades, size positions, or evaluate a strategy, and it is not a substitute for your broker's own risk controls. Trading involves risk of loss.

If this isn’t quite right

All Finance foundations →

Take Drawdown Monitor and make it yours.

Free, MIT, 5 min to running. The demo above is exactly what lands in your folder.