Infinite monitor

From CarlosCaPe/octorato · View interactive version

Infinite monitor is an AI agent skill from the GitHub repository CarlosCaPe/octorato. Builds AI dashboards on Infinite Monitor, an open-source Next.js app where you describe the widget in natural language and an agent writes and deploys it on an infinite canvas. Triggers on 'crea un dashboard para'.

How to use this skill

Skill file

Infinite Monitor — AI-Powered Dashboard Builder

Build dashboards by describing widgets in plain English. An AI agent writes the React code, builds it in a secure V8 sandbox, and renders it live in an iframe on an infinite canvas.

Repo: https://github.com/homanp/infinite-monitor

License: MIT

Stack: Next.js 16 + React 19 + SQLite (Drizzle ORM) + Secure Exec (V8 isolates) + Vercel AI SDK

When to Use This Skill

Architecture

┌─────────────────────────────────────────────────────────┐
│  Next.js App                                            │
│  ┌──────────────────────┐  ┌─────────────────────────┐  │
│  │  Infinite Canvas     │  │  Chat Sidebar           │  │
│  │  (pan / zoom / grid) │  │  (AI conversation)      │  │
│  │  ┌──────┐ ┌──────┐   │  │  User describes widget  │  │
│  │  │iframe│ │iframe│   │  │  Agent writes code       │  │
│  │  │  w1  │ │  w2  │   │  │  Agent builds in sandbox │  │
│  │  └──────┘ └──────┘   │  │  Widget renders live     │  │
│  └──────────────────────┘  └─────────────────────────┘  │
└──────────────────┬──────────────────────────────────────┘
     ┌─────────────┼─────────────────┐
     ▼             ▼                 ▼
┌─────────┐  ┌──────────┐  ┌─────────────────┐
│ SQLite  │  │ Secure   │  │ AI Providers    │
│ (state) │  │ Exec V8  │  │ (BYOK)          │
│ widgets │  │ Vite     │  │ 15+ providers   │
│ layouts │  │ sandbox  │  │ 35+ models      │
└─────────┘  └──────────┘  └─────────────────┘

Components

Prerequisites

Setup Workflow

1. Clone and Configure

git clone https://github.com/homanp/infinite-monitor.git
cd infinite-monitor

2. Create `.env.local`

# Pick one or more providers (or enter keys in the UI later)
ANTHROPIC_API_KEY=sk-ant-...
# OPENAI_API_KEY=sk-...
# GOOGLE_GENERATIVE_AI_API_KEY=...
# XAI_API_KEY=...
# MISTRAL_API_KEY=...
# DEEPSEEK_API_KEY=...
# GROQ_API_KEY=...
# OPENROUTER_API_KEY=...     # Free models available via OpenRouter

# Optional: share/publish
# DURABLE_STREAM_BASE_URL=   # defaults to https://stream.tonbo.dev
# SHARE_ID_SECRET=           # secret for deriving stable share IDs

Full env vars: see .env.example in the repo.

3. Install and Run

npm install
npm run dev
# Open http://localhost:3000

4. Production Build

npm run build
npm start

5. Deploy to Railway (optional)

Configure GitHub Actions secrets:

The deploy workflow at .github/workflows/deploy.yml runs railway up.

How to Build a Dashboard

Step-by-step

  1. Open http://localhost:3000
  2. Click Add Widget
  3. In the chat sidebar, describe what you want in plain English:
  1. The AI agent writes React code, installs dependencies, and builds in sandbox
  2. Widget renders live in an iframe on the canvas
  3. Iterate: chat to refine — the agent rewrites and rebuilds in seconds
  4. Drag, resize, and organize widgets on the infinite canvas

Dashboard-Aware Agents

Each widget's AI agent can see what other widgets exist on the same dashboard and read their source code. This means it builds complementary components — not duplicates.

Example Prompts by Domain

| Domain | Widget Prompt |

|--------|--------------|

| Trading | "Show a candlestick chart for BTC/USDT with RSI indicator and volume bars" |

| Cybersecurity | "Display a threat map showing recent CVEs from NVD API colored by severity" |

| OSINT | "Create a Shodan search widget that queries for open ports on a given IP range" |

| Analytics | "Build a GA4-style metrics card showing users, sessions, and bounce rate" |

| DevOps | "Show server health dashboard with CPU, memory, and disk usage gauges" |

| Crypto | "Display a multi-exchange arbitrage table comparing BTC prices across exchanges" |

| Weather | "Build a 5-day forecast widget with temperature charts and weather icons" |

| Social | "Create a Twitter/X sentiment tracker for a given hashtag" |

| Finance | "Show a portfolio tracker with stock prices, daily change %, and a sparkline" |

| Real Estate | "Display property listings from a JSON API with price, photos, and location map" |

Multiple Dashboards

Create separate dashboards for different domains. Switch between them instantly from the sidebar.

Dashboard Templates

Start from pre-built templates for common domains, or build from scratch.

Key Features

Useful Commands

| Action | Command |

|--------|---------|

| Install deps | npm install |

| Dev server | npm run dev (port 3000) |

| Lint | npm run lint |

| Tests | npm test (vitest) |

| Production build | npm run build |

| Makefile shortcuts | make setup, make dev, make lint, make test |

Non-Obvious Notes

Troubleshooting

| Problem | Solution |

|---------|----------|

| isolated-vm build fails | Ensure Node.js 22+ is installed. Run npm rebuild |

| No AI response | Check that at least one API key is set in .env.local or entered in the UI |

| Widget build fails in sandbox | Check Secure Exec logs. The agent will auto-retry with error context |

| Port 3000 in use | Set PORT=3001 in .env.local or kill the existing process |

Lessons Learned

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.