A workflow builder for automated crypto strategies. Sign up, draw when → then rules on a canvas, save them, and paper-run simulated trades.
Demo video: add your Loom link here
Design a strategy such as:
When SOL < 150
→ LONG 10x on Lighter
→ SHORT 2x on Backpack
→ SHORT 2x on Hyperliquid
Set a demo SOL price, click Test run, and see a history of why the trigger fired and which paper orders would be placed. Enable a workflow and a background poller evaluates it every 10 seconds, with a cooldown so the same price trigger does not spam.
Orders are paper only. StratGrid does not send live orders to exchanges.
| Layer | Choice |
|---|---|
| Frontend | React, TypeScript, Vite, React Flow, Tailwind |
| Backend | Express, TypeScript |
| Database | MongoDB (Mongoose) |
| Auth | JWT, bcrypt |
| Credentials | AES-256-GCM at rest |
Needs: Node.js 20+ and two terminals. MongoDB on 27017 is optional. If it is not running, the API starts an in-memory database (data is wiped when the API restarts).
cd backend
cp .env.example .env
npm install
npm run devAPI: http://localhost:4000/api/health
cd frontend
npm install
npm run devOpen http://localhost:5173 (on this machine, prefer localhost over 127.0.0.1). Vite proxies /api to the backend.
Password must be at least 8 characters.
| Variable | Purpose |
|---|---|
MONGODB_URI |
Mongo connection (defaults to local) |
JWT_SECRET |
Signs login tokens |
CREDENTIALS_KEY |
Encrypts venue API keys |
CORS_ORIGIN |
Frontend origin (default http://localhost:5173) |
POLL_INTERVAL_MS |
Poller interval (default 10000) |
PRICE_COOLDOWN_MS |
Price-trigger cooldown (default 60000) |
Never commit .env.
- Sign up and create a workflow.
- Click SOL dip template, then Save.
- Leave demo SOL at 148 and click Test run. History should show a match and three paper actions.
- Set SOL to 160 and Test run again — No match.
- Set SOL back to 148, click Running, and wait up to 10 seconds for a Poller line. It should not fire again for 60 seconds while the price stays below 150.
Browser (editor, login, history)
│
▼
Express API (JWT)
│
├── MongoDB
│ Users, Workflows, Credentials, DemoPrice, Executions
└── In-process poller
reads enabled workflows + demo SOL
writes paper Executions when a trigger matches
Triggers: price (SOL < 150) or timer (every N minutes).
Actions: Lighter, Backpack, Hyperliquid (side, leverage, size). Edges are trigger → action only.
Test run evaluates now and ignores cooldown.
Poller only runs enabled workflows. Price triggers wait PRICE_COOLDOWN_MS after a fire. Timer triggers wait minutes.
Venue credentials are stored encrypted for a possible later Live mode. Paper runs do not need them.
cd backend
npm testCovers price operators, cooldown, timers, and the SOL dip paper path.
frontend/ editor, auth, credentials, execution timeline
backend/ API, paper executor, poller