This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
FriendsOfShopware Automation Bot - A Cloudflare Workers application that orchestrates GitHub Actions workflows for Shopware plugin development. It listens to GitHub webhook events (PR issue comments) and dispatches workflows based on bot commands. Includes a Vue 3 SPA dashboard for manual command dispatch.
npm run dev # Start Wrangler dev server (backend)
npm run dev:frontend # Start Vite dev server (frontend, proxies API to :8787)
npm run build # Build frontend (Vite) then backend (Hono/CF Workers)
npm run deploy # Build + deploy to Cloudflare Workers
npm run cf-typegen # Generate Cloudflare Worker environment typesEntry point: src/index.ts — Hono app with route registration.
Public routes (no auth):
POST /webhook— GitHub webhook receiverPOST /api/token/generate/:id— OIDC token exchange for workflowsPOST /api/token/delete/:id— Token cleanupPOST /api/report/:id— Execution report from workflows
Auth routes (session middleware, no auth guard):
GET /auth/login— GitHub OAuth redirectGET /auth/callback— OAuth callbackGET /auth/logout— Session destroy
Protected API routes (session + auth guard):
GET /api/session— Current user infoGET /api/commands— Available commandsGET /api/repos— Repository list (KV-cached)GET /api/repos/:owner/:repo/pulls— Open PRsGET /api/repos/:owner/:repo/branches— BranchesGET /api/executions— Recent executionsPOST /api/dispatch— Dispatch a command (JSON body)
Lib files: src/lib/ — GitHub client, dispatch logic, commands, execution helpers, OIDC auth.
Vue 3 SPA with Vue Router, built with Vite. Uses Tailwind CSS + DaisyUI for styling, vue-select for searchable dropdowns.
frontend/src/pages/Login.vue— Login pagefrontend/src/pages/Dashboard.vue— Dispatch form + execution table with 5s pollingfrontend/src/components/— Navbar, DispatchForm, ExecutionTablefrontend/src/api.ts— Typed fetch wrappers for all API endpoints
/actions/fetch-token/ — Node.js action used by dispatched workflows.
.github/workflows/csfixer.yml— Runs PHP-CS-Fixer on PRs.github/workflows/instance.yml— Creates ephemeral Shopware dev instances
Requires these secrets (configured via Wrangler):
GITHUB_APP_ID,GITHUB_PRIVATE_KEY,GITHUB_INSTALLATION_ID,GITHUB_WEBHOOK_SECRET— GitHub App credentialsGITHUB_OAUTH_CLIENT_ID,GITHUB_OAUTH_CLIENT_SECRET— GitHub OAuth AppAUTH_SECRET— Session encryption key- Cloudflare KV namespace binding (
kv) and D1 database binding (db)
- Tabs for indentation, single quotes, 140 char print width (see
.prettierrc) - TypeScript strict mode, ES2021 target