Local Setup Guide
Relevant source files
The following files were used as context for generating this wiki page:
The Local Setup Guide provides instructions for configuring and running the GeNCorE Command Center on a local development environment. GeNCorE is an AI Agent Command Center designed to manage GitHub Copilot, Claude, and Codex pull requests and tasks.
The project is built using Next.js 15 with the App Router and utilizes the GitHub REST API v3 for managing repository interactions. Local setup involves cloning the repository, installing dependencies, configuring environment variables, and starting the development server.
Sources: README.md:1-5, package.json:1-15, README.md:65-71
Prerequisites
Before setting up the project locally, ensure your environment meets the following requirements:
- Node.js: Versions
^18.18.0,^19.8.0, or>= 20.0.0are required. - GitHub Account: Necessary for creating a Personal Access Token (PAT).
- Package Manager:
npm(included with Node.js).
Sources: package.json:6-9, README.md:38-41
Installation and Execution
The installation process involves standard Node.js project initialization steps.
- Clone the repository:
git clone https://github.com/marekdkropiewnicki-dotcom/claude-remote-control.git cd claude-remote-control - Install dependencies:
npm install - Configure environment: Create a local environment file based on the example template.
cp .env.example .env.local - Start development server:
npm run dev
Once started, the application is accessible at http://localhost:3000.
Sources: README.md:31-35, README.md:58-63
Environment Configuration
The application requires specific environment variables to interact with GitHub and handle authentication.
Required Variables
| Variable | Description | Source |
|---|---|---|
GITHUB_TOKEN | GitHub Personal Access Token with repo permissions. | README.md:46 |
ADMIN_TOKEN | A password used for panel access and session generation. | README.md:47 |
NEXT_PUBLIC_REPO_OWNER | The GitHub username/organization owning the target repo. | README.md:48 |
NEXT_PUBLIC_REPO_NAME | The name of the target repository (e.g., GentelmeN-CorE). | README.md:49 |
Default Fallbacks
If not explicitly provided in the environment, the following values are used as defaults in API routes:
- Owner:
marekdkropiewnicki-dotcom - Repository:
GentelmeN-CorE
Sources: app/api/task/route.ts:5-6, app/api/prs/route.ts:4-5
System Architecture and Data Flow
The local environment mimics the production flow where Next.js API routes act as a proxy between the frontend and the GitHub REST API.
This diagram illustrates the request lifecycle when interacting with the local development server.
Sources: README.md:73-80, middleware.ts:22-54
Authentication Middleware
During local development, if the ADMIN_TOKEN is not set, the middleware allows requests to pass to help with initial setup, unless running in a production-like environment. When set, it verifies the auth cookie using an HMAC-SHA256 hash of the ADMIN_TOKEN.
Sources: middleware.ts:33-40, README.md:85-88
Available Scripts
The project includes standard Next.js scripts defined in package.json:
npm run dev: Starts the development server with hot-reloading.npm run build: Compiles the application for production.npm run start: Runs the built production application.npm run lint: Executes ESLint for code quality checks.
Sources: package.json:11-14
Development Configuration
The project uses TypeScript and Tailwind CSS. The following configuration files are relevant for local development:
- tsconfig.json: Configures TypeScript with path aliases (
@/*pointing to root). - tailwind.config.js: Defines the dark mode theme and font families.
- next.config.js: Enables React Strict Mode.
Sources: tsconfig.json:1-32, tailwind.config.js:1-20, next.config.js:1-5
GitHub Integration Flow
When a task is submitted locally, the application follows this sequence to create a GitHub Issue:
This sequence shows the interaction between local components and external services during task creation.
Sources: app/api/task/route.ts:8-75, README.md:21
Summary
Setting up GeNCorE Command Center locally requires Node.js and a GitHub Personal Access Token. By configuring .env.local with the necessary repository details and administrative tokens, developers can manage AI agents and pull requests through a local instance of the Next.js application. All sensitive operations, such as GitHub API calls, are handled server-side to ensure GITHUB_TOKEN security.
Sources: README.md:58-63, README.md:90