Add a demo interface for Hackbot#6115
Open
suhaibmujahid wants to merge 1 commit into
Open
Conversation
ec3b845 to
300ed21
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds a new standalone Next.js “Hackbot Launchpad” demo UI under services/hackbot-ui/ that authenticates users via Google OAuth (better-auth) and proxies requests to an external hackbot-api using a server-side API key. It also includes containerization and a Cloud Run deployment script to make the demo easy to build and deploy.
Changes:
- Introduce a new Next.js app (App Router) with pages to trigger runs, view recent runs, and inspect run details/artifacts.
- Add stateless Google OAuth auth (better-auth) plus middleware and server-side session revalidation for
/api/*proxy routes. - Add Dockerfile +
deploy.shfor Cloud Run deployment and the required environment/config scaffolding.
Reviewed changes
Copilot reviewed 31 out of 34 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| services/hackbot-ui/tsconfig.json | TypeScript configuration for the Next.js app (path aliases, strict mode, etc.). |
| services/hackbot-ui/README.md | Usage/architecture/deployment documentation for the demo UI. |
| services/hackbot-ui/public/.gitkeep | Keeps public/ tracked in git. |
| services/hackbot-ui/package.json | App scripts and dependencies (Next/React/better-auth). |
| services/hackbot-ui/package-lock.json | Locked dependency tree for reproducible installs. |
| services/hackbot-ui/next.config.mjs | Next.js config enabling standalone output. |
| services/hackbot-ui/next-env.d.ts | Next.js TypeScript ambient type references. |
| services/hackbot-ui/middleware.ts | Middleware auth gate (redirects to /login, 401 JSON for /api/*). |
| services/hackbot-ui/lib/types.ts | TypeScript models mirroring hackbot-api responses. |
| services/hackbot-ui/lib/store.ts | Client-side localStorage store for tracking runs (since upstream has no list endpoint). |
| services/hackbot-ui/lib/session.ts | Server-side session validation and mozilla.com allowlist enforcement. |
| services/hackbot-ui/lib/hackbot.ts | Server-only hackbot-api client that injects the X-API-Key and handles errors. |
| services/hackbot-ui/lib/auth.ts | better-auth configuration for stateless Google OAuth and domain restriction. |
| services/hackbot-ui/lib/auth-client.ts | Client auth helpers/hooks (signIn, signOut, useSession). |
| services/hackbot-ui/Dockerfile | Multi-stage build producing a small standalone Next.js runtime image. |
| services/hackbot-ui/deploy.sh | Cloud Run deployment script with Secret Manager + Artifact Registry setup. |
| services/hackbot-ui/components/UserMenu.tsx | Signed-in user display and sign-out control. |
| services/hackbot-ui/components/TriggerForm.tsx | Form to trigger a bug-fix run via the proxy API. |
| services/hackbot-ui/components/StatusBadge.tsx | Status display for run state. |
| services/hackbot-ui/components/RunDetail.tsx | Run detail view with polling, findings/log display, and artifact download links. |
| services/hackbot-ui/components/RecentRuns.tsx | Dashboard table of locally tracked runs with polling for active runs. |
| services/hackbot-ui/app/runs/[runId]/page.tsx | Dynamic run details page wiring. |
| services/hackbot-ui/app/page.tsx | Home page with trigger form + recent runs panels. |
| services/hackbot-ui/app/login/page.tsx | Login page initiating Google OAuth flow and showing denial errors. |
| services/hackbot-ui/app/layout.tsx | Root layout (top bar + user menu + container). |
| services/hackbot-ui/app/globals.css | Global styling for the demo UI. |
| services/hackbot-ui/app/api/runs/route.ts | POST proxy endpoint to create a new run. |
| services/hackbot-ui/app/api/runs/[runId]/route.ts | GET proxy endpoint to fetch a run document. |
| services/hackbot-ui/app/api/runs/[runId]/artifacts/[...path]/route.ts | Artifact download proxy endpoint that redirects to a signed URL. |
| services/hackbot-ui/app/api/auth/[...all]/route.ts | better-auth Next.js handler wiring for auth endpoints. |
| services/hackbot-ui/app/api/agents/route.ts | GET proxy endpoint to list available agents. |
| services/hackbot-ui/.gitignore | App-specific ignores + re-include lib/ despite repo-root ignore patterns. |
| services/hackbot-ui/.env.example | Example environment variables for local/dev. |
| services/hackbot-ui/.dockerignore | Build context exclusions for smaller Docker builds. |
Files not reviewed (1)
- services/hackbot-ui/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add a new Next.js based Hackbot web interface under services/hackbot-ui to be used for demonstration.
300ed21 to
e82c720
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a new Next.js based Hackbot web interface under services/hackbot-ui to be used for demonstration.