GitClone Docs

Repository platform documentation for builders and operators.

Use this guide to run GitClone locally, connect the dashboard to the API, publish the API service, and ship the production interface.

Search documentationCtrl K
APIAuthDeploy

Get started

Run the full stack

GitClone uses a Next.js interface and a separate Fastify API service. Start both processes locally when you need the dashboard to read and write repository records.

npm install
npm run api:install
npm run api:build
npm run api:start

# In another terminal
npm run dev

Create repository

Register a project with owner, visibility, language, default branch, and storage metadata.

Open review lane

Track pull request status, reviewers, branch names, check totals, and merge readiness.

Ship preview

Attach deployments to repositories with environment, branch, commit SHA, and URL state.

Repository workflow

Model repositories like an operations surface

Repository records carry owner, slug, category, language, visibility, default branch, storage, stars, forks, and timestamps. The dashboard reads the same shape from/api/repositories and renders it without mock-only state.

Recommended flow

  1. 1. Create a repository from the dashboard or API.
  2. 2. Attach issues, pull requests, and deployments to that repository ID.
  3. 3. Use stats and health checks to verify the production API service.

Issues and pull requests

Keep planning and review data connected

Issues

Issues store title, status, priority, assignee, repository ID, and timestamps. Status updates use a dedicated PATCH endpoint.

Pull requests

Pull requests store source and target branches, reviewers, check totals, review state, and merge readiness.

Deploy previews

Track deployments from branch to URL

Deployment records connect a repository to an environment, branch, preview URL, commit SHA, status, and timestamps. Use them to make the dashboard show real release state instead of static marketing copy.

API reference

API endpoints

MethodPathPurpose
GET/healthRuntime status and environment signal.
GET/api/statsRepository, issue, pull request, deployment, and storage totals.
GET/api/repositoriesRepository records used by the dashboard.
POST/api/repositoriesCreate a repository and seed its default branch.
GET/api/repositories/:idRepository detail with branches, issues, pull requests, and deployments.
POST/api/issuesCreate an issue for an existing repository.
POST/api/pull-requestsCreate a pull request review record.
POST/api/deploymentsCreate a deployment preview record.

Authentication

Protect write operations with an API key

If API_KEY is configured, every POST and PATCH route must send the same value through x-api-key. Read endpoints remain public for dashboard rendering and health checks.

curl -X POST "$GITCLONE_API_BASE_URL/api/repositories" \
  -H "content-type: application/json" \
  -H "x-api-key: $API_KEY" \
  -d '{"name":"portal","owner":"gitclone-labs","description":"Customer portal","category":"SaaS","language":"TypeScript","visibility":"private"}'

Environment variables

Production configuration

NEXT_PUBLIC_SITE_URLFrontend canonical URL used by metadata.
NEXT_PUBLIC_API_BASE_URLBrowser-visible API service URL.
GITCLONE_API_BASE_URLServer-side API override for Next.js dashboard rendering.
FRONTEND_ORIGINComma-separated origins allowed by API CORS.
DATABASE_FILEJSON database file path for the API runtime.
API_KEYOptional write-protection key for POST and PATCH routes.

Production checklist

Verify the release end to end

API health endpoint returns status ok.

Dashboard can read repository and stats data from the production API URL.

CORS includes the production application domain.

Production environment variables point to the API service URL.

Systemd service restarts automatically after reboot.

Production page has no broken navigation links.