Browser UI for Grok Bot cloud agents (FastAPI BFF + Vite SPA)
  • Python 50%
  • TypeScript 45.2%
  • CSS 3.9%
  • Dockerfile 0.5%
  • Shell 0.2%
  • Other 0.2%
Find a file
Kenzi Marcel ad0f31a770
All checks were successful
OWASP / dependency-check (push) Successful in 38s
ci / test (push) Successful in 1m18s
Container Build / build (push) Successful in 1m18s
SonarQube / sonarqube (push) Successful in 8m14s
fix: abort stalled Sonar plugin downloads and fail the prefetch loop
2026-09-19 11:25:38 +00:00
.forgejo/workflows fix: abort stalled Sonar plugin downloads and fail the prefetch loop 2026-09-19 11:25:38 +00:00
backend feat: add Settings Cursor login and instance password 2026-09-18 19:01:48 +00:00
data feat: ship grok-web with Forgejo CI, SonarQube, OWASP, and Docker 2026-09-18 17:40:40 +00:00
frontend feat: add Settings Cursor login and instance password 2026-09-18 19:01:48 +00:00
tests feat: add Settings Cursor login and instance password 2026-09-18 19:01:48 +00:00
.dockerignore feat: ship grok-web with Forgejo CI, SonarQube, OWASP, and Docker 2026-09-18 17:40:40 +00:00
.gitignore feat: add Settings Cursor login and instance password 2026-09-18 19:01:48 +00:00
dev.sh feat: ship grok-web with Forgejo CI, SonarQube, OWASP, and Docker 2026-09-18 17:40:40 +00:00
Dockerfile feat: ship grok-web with Forgejo CI, SonarQube, OWASP, and Docker 2026-09-18 17:40:40 +00:00
LICENSE feat: ship grok-web with Forgejo CI, SonarQube, OWASP, and Docker 2026-09-18 17:40:40 +00:00
pyproject.toml feat: add Settings Cursor login and instance password 2026-09-18 19:01:48 +00:00
README.md feat: add Settings Cursor login and instance password 2026-09-18 19:01:48 +00:00
sonar-project.properties feat: ship grok-web with Forgejo CI, SonarQube, OWASP, and Docker 2026-09-18 17:40:40 +00:00

grok-web

Browser UI for Grok Bot cloud agents. A FastAPI BFF imports grokbot and a Vite SPA talks only to the BFF. Cursor tokens stay on the host (grokbot.auth.auto() / HostFiles). The browser never sees them.

Run

Needs a Cursor login. Open Settings and use Sign in with Cursor (browser PKCE; tokens stay on the server), paste a dashboard API key, or keep using host files (~/.config/cursor/auth.json / GROKBOT_TOKEN).

Optional instance password: Settings → Instance password. When enabled, every /api/* and /ws/* route except /api/health and /api/auth/login|status requires a session cookie.

python3 -m venv .venv
.venv/bin/pip install -e /path/to/grokbot-client
.venv/bin/pip install -e ".[dev]"
cd frontend && npm ci && cd ..
./dev.sh

Tests

Automated tests must not send to live agents.

.venv/bin/pytest
cd frontend && npm test

Docker

docker build -t grok-web .
# override the grokbot-client git URL if needed:
docker build --build-arg GROKBOT_CLIENT_GIT=https://git.stackken.com/kenzim/grokbot-client.git -t grok-web .
docker run --rm -p 8787:8787 \
  -v grok-web-data:/app/data \
  -v ~/.config/cursor:/root/.config/cursor:ro \
  grok-web

The image serves the built SPA from FastAPI on port 8787.

CI

Forgejo Actions:

  • ci — ruff, pytest, tsc, vitest
  • SonarQube — coverage, sonar-scanner, quality gate
  • OWASP — Dependency-Check JSON (not imported into Sonar)
  • Container Build — image to the Forgejo package registry

Repo secrets: SONAR_HOST_URL, SONAR_TOKEN, and for image push REGISTRY_USER + REGISTRY_TOKEN (or PACKAGE_WRITABLE_TOKEN).