- Python 50%
- TypeScript 45.2%
- CSS 3.9%
- Dockerfile 0.5%
- Shell 0.2%
- Other 0.2%
| .forgejo/workflows | ||
| backend | ||
| data | ||
| frontend | ||
| tests | ||
| .dockerignore | ||
| .gitignore | ||
| dev.sh | ||
| Dockerfile | ||
| LICENSE | ||
| pyproject.toml | ||
| README.md | ||
| sonar-project.properties | ||
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
- SPA: http://127.0.0.1:5180 (proxies
/apiand/ws) - BFF: http://127.0.0.1:8787
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, vitestSonarQube— coverage, sonar-scanner, quality gateOWASP— 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).