Feature Overview
Relevant source files
The following files were used as context for generating this wiki page:
Introduction
GeNCorE Command Center is a web-based management interface designed to control AI agents (GitHub Copilot, Claude, and Codex) through GitHub integrations. It provides a centralized dashboard for monitoring agent status, a task assignment system that converts user prompts into GitHub Issues, and a pull request (PR) review module for managing agent-generated code. Sources: README.md:1-5
The system is built with Next.js 15 and leverages the GitHub REST API v3 to facilitate remote interaction with a target repository (GentelmeN-CorE). It emphasizes a mobile-first design, specifically optimized for iPhone use, and implements a secure authentication layer to protect administrative actions. Sources: README.md:45-55, app/layout.tsx:4-10
Core System Architecture
The application follows a client-server architecture using the Next.js App Router. The frontend interacts with custom API routes which act as a secure proxy to the GitHub API, ensuring sensitive tokens like the GITHUB_TOKEN remain server-side. Sources: README.md:65-70
Application Flow Diagram
The following diagram illustrates how a user interacts with the system to manage AI agents and their outputs.
Sources: README.md:10-25, app/page.tsx:21-30
Dashboard and Agent Monitoring
The Dashboard (/) serves as the primary entry point, displaying real-time status of AI agents and a list of active Pull Requests. It automatically refreshes data every 60 seconds. Sources: app/page.tsx:38-42
Agent Status Logic
Agents are identified by parsing branch names and PR authors. Status is categorized into three states:
- Online: Agent is ready for new tasks.
- Busy: Agent has at least one active PR associated with its identity.
- Offline: Connection or configuration issues.
Sources: app/page.tsx:45-65, components/AgentCard.tsx:20-30
| Agent | Visual Identifier | GitHub Role/Ref |
|---|---|---|
| Copilot | Purple (purple-400) | Identifiable by head ref or login |
| Claude | Orange (orange-400) | Identifiable by head ref or login |
| Codex | Blue (blue-400) | Identifiable by head ref or login |
Sources: README.md:58-62, app/page.tsx:50-60
Task Assignment System
The Task Panel (/task) allows users to delegate work to specific AI agents by creating GitHub Issues. The system supports local history tracking via localStorage, limited to the last 20 entries. Sources: app/task/page.tsx:35-45
Task Creation Sequence
Issue Configuration
When a task is created, the system automatically assigns specific GitHub attributes:
- Labels: Uses
agentConfig.issueLabel(e.g., specific labels for Claude or Copilot). - Assignees: Automatically assigns the issue to the agent's specific GitHub login.
- Body: Formatted Markdown including a timestamp and agent-specific header.
Sources: app/api/task/route.ts:45-65
Pull Request Management
The Review module (/review) facilitates the lifecycle of code changes proposed by agents. Users can approve, request changes, or merge PRs directly from the interface. Sources: app/review/page.tsx:15-20
Review Actions and Endpoints
| Endpoint | Method | Action | Implementation Details |
|---|---|---|---|
/api/prs | GET | Fetch Open PRs | Fetches top 20 open PRs; disables caching. |
/api/review | POST | Approve/Request Changes | Validates PR number (SSRF protection) and submits review event. |
/api/merge | POST | Merge PR | Default method is squash. Validates number and method. |
Sources: app/api/prs/route.ts:12-30, app/api/review/route.ts:25-50, app/api/merge/route.ts:28-45
PR Selection and Safety
The system includes validation to prevent Server-Side Request Forgery (SSRF) by ensuring prNumber is a positive integer within safe bounds (up to 2,147,483,647) before constructing GitHub API URLs. Sources: app/api/review/route.ts:31-35, app/api/merge/route.ts:31-35
Security and Authentication
Security is enforced through a combination of environment variables, middleware, and cryptographic hashing. Sources: README.md:72-80
Authentication Flow
The system uses a custom session management strategy:
- ADMIN_TOKEN: A master password set in environment variables.
- HMAC-SHA256: Instead of storing the raw token in cookies, the system stores an HMAC-SHA256 hash of the
ADMIN_TOKEN. - Middleware: All routes (except
/loginand/api/auth) are intercepted. The middleware performs atimingSafeEqualcomparison between the cookie and the expected hash.
Sources: middleware.ts:28-55, lib/auth.ts:14-25
Summary
The GeNCorE Command Center acts as a high-level orchestration layer for GitHub-integrated AI agents. By abstracting GitHub's Issue and Pull Request APIs into a streamlined, mobile-optimized interface, it allows for rapid task delegation and code review. The architecture ensures security by proxying all GitHub interactions through server-side routes and protecting access via a robust HMAC-based authentication system. Sources: README.md:4-10, app/page.tsx:110-120