How to Use MWS Observatory

Quick Start

MWS Observatory is your developer dashboard. It shows every app you build, how they connect, and what's healthy or broken — without asking an agent.

Three Ways to Add Data

1Automatic (after every agent session)

The post-session hook auto-scans your project files and pushes a snapshot. No action needed — just build stuff and the dashboard stays current.

# Already configured in scripts/hooks/post-session-visualize.js
2Manual (on demand)

Run /visualize in any project to capture a snapshot right now. Use this before investor demos or after major refactors.

/visualize                    # current project /visualize --app a1_dotsai-in # specific app
3API (from any tool or script)

POST a JSON snapshot directly to the API. Works from CI/CD, cron jobs, or any automation.

curl -X POST https://mws.dotsai.cloud/api/snapshot \
  -H "Content-Type: application/json" \
  -d '{
    "app_id": "a1_dotsai-in",
    "timestamp": "2026-04-05T10:00:00Z",
    "source": "manual",
    "files": [
      {"path": "src/app/page.tsx", "importance": 9.5, "deps": []}
    ],
    "metadata": {"trigger": "manual"}
  }'

Dashboard Pages

/ (Ecosystem)Interactive graph of all apps, services, databases, and their connections. Click any node to see details. Click 'View Details' to drill into an app.
/healthLive health checks for all your domains. Auto-refreshes every 30 seconds. Green = up, Red = down, with latency in milliseconds.
/app/[id]Per-app detail page. Shows file importance scores (copy-paste paths for agent context), architecture diagrams, and snapshot history.
/snapshotsList of all apps with their latest snapshot status. Quick way to see which apps have been recently scanned.

Copy-Paste References for Agents

Every file in the app drill-down page has a Copy button. Click it to copy the file path to your clipboard. Then paste it into Claude Code:

# In Claude Code, paste the path:
"Look at src/components/Hero.tsx — the importance score is 7.5,
it's a dependency of page.tsx. Fix the layout issue there."

Importance scores help you prioritize: files scored 8+ are critical entry points. Files scored 3-4 are config. Focus debugging on high-importance files first.

Reading the Ecosystem Graph

Teal rectanglesYour apps (Next.js, React projects)
Purple circlesServices (Nginx, Sync Receiver, WhatsApp Bot)
Amber barrelsDatabases (PostgreSQL)
Blue octagonsExternal services (Convex Cloud)
Green borderHealthy — responding normally
Red borderDown — not responding
Gray borderUnknown — hasn't been checked

Adding a New App

When you build a new app and want it in the observatory:

  1. Add its node to src/lib/ecosystem-data.ts
  2. Add edges showing its connections (which DB, which services)
  3. Rebuild and redeploy the dashboard
  4. Run /visualize in the new app to push the first snapshot

Redeploying the Dashboard

cd ~/Desktop/mws.dotsai.cloud
bun run build
rsync -avz --exclude node_modules --exclude .git --exclude .next \
  ./ root@72.62.229.16:/opt/services/observatory/
ssh root@72.62.229.16 "cd /opt/services/observatory && \
  docker build -t observatory:latest . && \
  docker stop observatory && docker rm observatory && \
  docker run -d --name observatory --restart unless-stopped \
  --network services_services \
  -v /opt/services/observatory/data:/app/data \
  -e SNAPSHOTS_DIR=/app/data/snapshots \
  observatory:latest"