Installation

GridArena ships as a single TanStack Start application backed by Lovable Cloud (Postgres + Auth + Edge Functions). The optional pandapower simulation service runs as a separate FastAPI container.

1. Prerequisites

  • Node.js ≥ 20 and bun (or npm) for local development.
  • A Lovable account — Cloud is provisioned automatically when you fork this project.
  • (Optional) Docker for the pandapower simulation container.

2. Local development

bash
bun install
bun run dev

The app starts at http://localhost:3000. Database, auth, and the LLM gateway are wired automatically through Lovable Cloud — no .env editing required.

3. Deploying the simulation service (optional)

If you want physics-accurate evaluation via PyPSA (pure Python, no native binaries), deploy the FastAPI container under simulation-service/ to any host that exposes an HTTPS URL (e.g. Fly.io, Railway, Render).

bash
cd simulation-service
docker build -t gridarena-sim .
docker run -p 8000:8000 gridarena-sim

4. Configuration secrets

Two secrets are managed inside Lovable Cloud — set them once in the platform's Connectors panel:

  • SIMULATION_SERVICE_URL — the deployed simulation service URL (optional; falls back to the in-Worker DC solver).
  • SIMULATION_SERVICE_TOKEN — bearer token used to authenticate to the simulation service.

When neither is configured, GridArena automatically uses the deterministic DC powerflow solver bundled in the Edge Worker.

5. Verifying the install

  • Sign in, then visit /system-status — the queue should report 0 active jobs.
  • Visit /health — engines and providers should report green.
  • Run the validation suite from /validation — all categories should pass.
  • (Admin only) Visit /simulation-health — runs /version, /health, and parallel /simulate self-tests across IEEE case5/14/30 and persists each probe to history for later review.