Vercel Deployment Guide
Relevant source files
The following files were used as context for generating this wiki page:
Introduction
The GeNCorE Command Center is a web-based management interface designed to control AI agents (GitHub Copilot, Claude, Codex) and manage repository workflows via the GitHub REST API. This guide outlines the technical requirements, configuration steps, and architecture for deploying the application to the Vercel platform.
The application is built using Next.js 15 (App Router) and is optimized for the Vercel Edge Runtime and Serverless Functions. It leverages Vercel's environment variable management to secure sensitive GitHub credentials and internal administrative tokens.
Sources: README.md:1-5, README.md:73-81, package.json:13
Deployment Prerequisites and Configuration
Successful deployment on Vercel requires specific environment variables and configuration files to ensure the Next.js framework correctly interfaces with GitHub and Anthropic SDKs.
Environment Variables
Vercel's Dashboard must be configured with the following variables under Settings → Environment Variables:
| Variable | Requirement | Description |
|---|---|---|
GITHUB_TOKEN | Required | Personal Access Token (PAT) with repo scope. |
ADMIN_TOKEN | Required | Secret string used for panel access authentication. |
NEXT_PUBLIC_REPO_OWNER | Optional | GitHub username or organization (Default: marekdkropiewnicki-dotcom). |
NEXT_PUBLIC_REPO_NAME | Optional | Target repository name (Default: GentelmeN-CorE). |
Sources: README.md:43-52, app/api/task/route.ts:4-6, app/api/prs/route.ts:4-6
Configuration Files
The project includes a vercel.json file that explicitly defines the framework for the Vercel build pipeline.
{"framework": "nextjs"}
Sources: vercel.json:1
Deployment Architecture and Workflow
The deployment follows a standard Vercel CI/CD pipeline where pushes to the connected GitHub repository trigger automatic builds and deployments.
Deployment Flow
The following diagram illustrates the lifecycle of a deployment from code push to production availability.
The application requires Node.js versions ^18.18.0, ^19.8.0, or >= 20.0.0 for the build environment.
Sources: README.md:58, package.json:6-9
Security and Runtime Middleware
When deployed on Vercel, the application utilizes middleware.ts to enforce security policies at the edge. This ensures that unauthorized requests are intercepted before they reach serverless API routes or page components.
Security Logic
- Authentication: The middleware verifies an
authcookie containing an HMAC-SHA256 hash of theADMIN_TOKEN. - Production Guard: If
ADMIN_TOKENis missing in a production environment, the deployment will return an HTTP 500 error to prevent public access. - API Protection: Requests to
/api/*that fail authentication return a JSON unauthorized error instead of a redirect.
Sources: middleware.ts:22-60, README.md:85-94
API and Backend Integration
API routes are deployed as Vercel Serverless Functions. These functions act as a proxy to the GitHub REST API v3 and Anthropic SDK, ensuring that tokens (like GITHUB_TOKEN) are never exposed to the client-side browser.
Integrated Services
- GitHub API: Handles issue creation (
/api/task), PR listing (/api/prs), and reviews (/api/review). - Anthropic SDK: Powers the Claude integration via
/api/chat. - Authentication API: Manages session cookies through
/api/auth.
Sources: app/api/task/route.ts:1-10, app/api/auth/route.ts:1-10, app/api/prs/route.ts:1-10
Conclusion
Deploying GeNCorE to Vercel provides a scalable, mobile-first command center for AI agents. By strictly managing environment variables and leveraging Next.js middleware, the system maintains a secure bridge between the user interface and sensitive GitHub repository operations.
Sources: README.md:1-5, README.md:73-81