What is ProGit?

ProGit is an ultra-fast, single-binary, self-hosted Git collaboration platform engineered in pure Go with zero CGO dependencies and an embedded modern React frontend.

Core Mission & Philosophy

ProGit provides development teams and enterprises with an ultra-lightweight, resilient, and beautiful alternative to bloated Git platforms. It runs on any machine with less than 50 MB of RAM, boots in under 50 milliseconds, and operates without external database servers like PostgreSQL or MySQL.

Single Binary Simplicity
Everything — the HTTP REST engine, the Smart Git protocol handler, the built-in SSH server (port 2222), the SQLite WAL database engine, and the production React single-page frontend — is embedded into a single, compact, static binary.

Key Capabilities at a Glance

  • Pure Go & Zero CGO: Cross-compiles instantaneously to Linux, macOS, and Alpine containers without native GCC toolchains.
  • High-Concurrency SQLite WAL: Uses modernc.org/sqlite with Write-Ahead Logging (WAL) and automated checkpoint maintenance.
  • GitHub-Class Developer Experience: Complete with Pull Request line-by-line review comments, native Git merge engine, fork mechanics, and Kanban project boards.
  • Built-in ProGit Pages: Host static websites, documentation, and Jekyll/Markdown sites directly from your repository branches with zero setup.
  • Dual-Interface Wiki Engine: Edit documentation through the web interface or clone and push directly as a Git bare repository (<repo>.wiki.git).
  • In-Browser Code Editor & Prettier: Create files, edit code online, upload entire folder structures, and format with 8 built-in themes.

5-Minute Quickstart Guide

Get your own private ProGit instance running with Podman or Docker in less than five minutes.

Step 1: Launch Container

Run the following command in your terminal to start ProGit with persistent volumes:

podman run -d --name progit \
  -p 3000:3000 -p 3443:3443 -p 2222:2222 \
  -v progit-data:/data \
  localhost/progit:latest
docker run -d --name progit \
  -p 3000:3000 -p 3443:3443 -p 2222:2222 \
  -v progit-data:/data \
  progit/progit:latest

Step 2: Complete Setup Wizard

  1. Open your browser and navigate to http://localhost:3000.
  2. Fill in your desired Super Administrator username, email, and password.
  3. Click Complete Installation & Create Super Admin. ProGit will lock the setup and redirect you to the main dashboard.

Step 3: Create & Push to Your First Repository

# Create test directory and initialize git
mkdir my-project && cd my-project
git init
echo "# Hello ProGit" > README.md
git add README.md
git commit -m "Initial commit"

# Push over Smart HTTP
git remote add origin http://localhost:3000/<your-username>/my-project.git
git push -u origin main
SSH Support Out of the Box
You can also push over SSH at ssh://git@localhost:2222/<your-username>/my-project.git once you add your public key in User Settings > SSH Keys.

Architecture & Pure Go Engine

Understand how ProGit achieves maximum portability, concurrency, and security with zero CGO dependencies.

Pure Go SQLite WAL Engine

Traditional Git web applications that use SQLite rely on CGO bindings to the C SQLite library (such as mattn/go-sqlite3). This causes several critical operational headaches: slow cross-compilation, reliance on host GCC/Clang toolchains, and complex multi-architecture container setups.

ProGit completely eliminates CGO by using modernc.org/sqlite — a 100% pure Go translation of SQLite. Features include:

  • Zero CGO (CGO_ENABLED=0): Single static Go binary without libc/musl dependency conflicts.
  • Write-Ahead Logging (WAL) Mode: Allows concurrent readers without blocking write transactions.
  • Busy Timeout & Mutex Protections: Configured with 5000ms busy timeout to prevent database is locked errors during high-volume Git pushes.

Technology Stack

ComponentTechnologyPurpose
Backend EngineGo 1.24+ (Zero CGO)High concurrency HTTP, SSH, Git Smart Protocol
Databasemodernc.org/sqlite (WAL)Embedded, fast relational storage with zero external DBMS
Frontend UIReact 19 + Vite + TailwindGitHub-class SPA embedded directly in Go binary
Code HighlightingPrismJSOnline file view and Prettier syntax editing
Container RuntimePodman / Docker (Alpine 3.21)Compact ~37 MB production image

Project Credits & Attributions

Recognizing the sponsors, creators, and open-source foundations behind ProGit.

ProGit Official Attribution Statement

Supported by Prodevans and created by Sanjeev Senapati.
This software is built on top of the Gogs source code and architecture.

Acknowledgments

  • Prodevans: For enterprise platform sponsorship, infrastructure support, and continued cloud-native stewardship.
  • Sanjeev Senapati: Architect, primary creator, and maintainer of the modern ProGit codebase.
  • The Gogs Project: Special appreciation to Jiahua Chen (Unknwon) and the Gogs community for pioneering lightweight Git services in Go.

Podman & Docker Deployment

Deploying ProGit with production-grade container isolation and persistent volumes.

Automated Deployment Script

ProGit includes dedicated scripts for one-click building and deployment using Podman or Docker:

# Build the lightweight Alpine container image (~37 MB)
bash podman/build.sh

# Deploy with persistent volumes and healthcheck validation
bash podman/deploy.sh

Volume Persistence

ProGit stores all state in /data inside the container. We recommend mapping named volumes to ensure seamless data persistence across container updates:

Internal PathVolume Purpose
/data/dbSQLite database file (progit.db) and WAL journal
/data/repositoriesBare Git repositories (.git)
/data/configCustom app.ini configuration overrides and SSL certs
/data/sshHost SSH keys for built-in port 2222 server

Docker Compose Example

version: '3.8'
services:
  progit:
    image: localhost/progit:latest
    container_name: progit
    restart: always
    ports:
      - "3000:3000"
      - "3443:3443"
      - "2222:2222"
    environment:
      - PROGIT_APP_NAME=ProGit
      - PROGIT_DOMAIN=git.example.com
      - PROGIT_ROOT_URL=https://git.example.com/
      - PROGIT_PROTOCOL=https
      - PROGIT_HTTPS_PORT=3443
    volumes:
      - progit-data:/data

volumes:
  progit-data:

Standalone Binary Installation

Run ProGit directly on Linux or macOS as a native system daemon without containers.

1. Create System User and Directories

sudo adduser --system --shell /bin/bash --gecos 'ProGit Version Control' --group --disabled-password --home /home/git git
sudo mkdir -p /data/db /data/repositories /data/config /data/logs
sudo chown -R git:git /data

2. Place Binary

sudo cp progit /usr/local/bin/progit
sudo chmod +x /usr/local/bin/progit

3. Systemd Service File

Create /etc/systemd/system/progit.service:

[Unit]
Description=ProGit Service
After=syslog.target
After=network.target

[Service]
Type=simple
User=git
Group=git
WorkingDirectory=/data
ExecStart=/usr/local/bin/progit web
Restart=always
Environment=PROGIT_APP_NAME="ProGit"

[Install]
WantedBy=multi-user.target

Enable and start the service:

sudo systemctl daemon-reload
sudo systemctl enable --now progit

Compile From Source

Build both the React UI and Go backend from the official repository.

Prerequisites

  • Go 1.24 or higher
  • Node.js 22+ and npm
  • Git CLI installed on system

Build Instructions

# 1. Clone repository
git clone https://github.com/sanjeevsenapati/progit.git
cd progit

# 2. Build Frontend UI
cd web
npm ci
npm run build
cd ..

# 3. Copy built frontend assets into internal/ui/dist
cp -r web/dist/* internal/ui/dist/

# 4. Compile Pure Go Binary (Zero CGO)
CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o progit ./cmd/progit

# 5. Start ProGit
./progit web

Web Installation Wizard

Configure your instance parameters and initialize the Super Administrator.

Wizard Fields

FieldDefaultDescription
Application NameProGitBranding shown on navbar and titles
DomainlocalhostDomain name used for clone URLs
HTTP Port3000Port for web traffic
Root URLhttp://localhost:3000/Full canonical base URL
Admin UsernameadminSuper administrator username
Admin Emailadmin@example.comSuper administrator email address
Admin Password(required)Super admin login password (min 6 chars)
Automatic Installation Lock
Once installation finishes, ProGit permanently sets INSTALL_LOCK = true in conf/app.ini. The wizard endpoint (/install) is immediately disabled and returns HTTP 403 to prevent unauthorized reconfiguration.

HTTPS & TLS Configuration

Securing Git traffic with automatic TLS, HSTS, and custom certificates.

Built-in HTTPS Server

ProGit features a native HTTPS engine that runs simultaneously alongside HTTP. To activate TLS directly in conf/app.ini:

[server]
PROTOCOL = https
DOMAIN = git.example.com
ROOT_URL = https://git.example.com:3443/
HTTP_PORT = 3000
HTTPS_PORT = 3443
CERT_FILE = /data/config/https/cert.pem
KEY_FILE = /data/config/https/key.pem

Automatic Self-Signed Certificates

If CERT_FILE or KEY_FILE are not specified when PROTOCOL = https, ProGit automatically generates an ECDSA P-256 self-signed certificate on boot, ensuring immediate encryption without configuration.

Reverse Proxy Setup

Configuring Nginx or Caddy in front of ProGit for SSL termination and custom domains.

Nginx Configuration

server {
    listen 80;
    server_name git.example.com;
    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl http2;
    server_name git.example.com;

    ssl_certificate /etc/letsencrypt/live/git.example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/git.example.com/privkey.pem;

    client_max_body_size 500M;

    location / {
        proxy_pass http://127.0.0.1:3000;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

Caddy Configuration

git.example.com {
    reverse_proxy 127.0.0.1:3000
    request_body {
        max_size 500MB
    }
}

Configuration Cheat Sheet

A fast reference for essential ProGit configuration keys.

# ProGit Global Configuration File
# Location: conf/app.ini or /data/config/app.ini

[app]
NAME = ProGit
RUN_MODE = prod
RUN_USER = progit

[server]
PROTOCOL = http
DOMAIN = localhost
ROOT_URL = http://localhost:3000/
HTTP_PORT = 3000
HTTPS_PORT = 3443
DISABLE_SSH = false
SSH_PORT = 2222
SSH_LISTEN_PORT = 2222

[database]
TYPE = sqlite3
PATH = /data/db/progit.db

[repository]
ROOT = /data/repositories
DEFAULT_BRANCH = main

[security]
INSTALL_LOCK = true
SECRET_KEY = !#@FDEW&*(#$@*
LOGIN_REMEMBER_DAYS = 7

[pages]
ENABLED = true

app.ini File Reference

Comprehensive documentation of all available configuration blocks in app.ini.

Section: [server]

KeyDefaultDescription
PROTOCOLhttphttp or https
DOMAINlocalhostDomain name shown in Git clone URLs
HTTP_PORT3000Port for HTTP web service
HTTPS_PORT3443Port for HTTPS web service
ROOT_URLhttp://localhost:3000/Base canonical URL including protocol and port
DISABLE_SSHfalseToggle built-in SSH server
SSH_PORT2222External SSH port for clone commands

Section: [database]

KeyDefaultDescription
TYPEsqlite3Database engine (pure Go SQLite)
PATH/data/db/progit.dbLocation of the SQLite file on disk

Environment Variables Reference

All app.ini keys can be overridden via container environment variables with PROGIT_* prefixes.

Environment Variableapp.ini KeyDefault Value
PROGIT_APP_NAMEapp.NAMEProGit
PROGIT_DOMAINserver.DOMAINlocalhost
PROGIT_HTTP_PORTserver.HTTP_PORT3000
PROGIT_HTTPS_PORTserver.HTTPS_PORT3443
PROGIT_PROTOCOLserver.PROTOCOLhttp
PROGIT_ROOT_URLserver.ROOT_URLhttp://localhost:3000/
PROGIT_DB_PATHdatabase.PATH/data/db/progit.db
PROGIT_REPO_ROOTrepository.ROOT/data/repositories
PROGIT_SSH_PORTserver.SSH_PORT2222
PROGIT_SSH_ENABLEDserver.DISABLE_SSHtrue (inverts to false)

Database & SQLite WAL Mode

How ProGit configures SQLite for high-concurrency enterprise workloads.

Write-Ahead Logging (WAL)

ProGit automatically configures SQLite with the following pragmas on connection initialization:

PRAGMA journal_mode = WAL;
PRAGMA synchronous = NORMAL;
PRAGMA busy_timeout = 5000;
PRAGMA foreign_keys = ON;

Automated WAL Checkpoints

In WAL mode, writes are committed to a temporary journal file (progit.db-wal) and periodically merged into the main database file. Administrators can trigger a manual checkpoint at any time via the admin endpoint:

curl -X POST http://localhost:3000/api/v1/admin/maintenance/wal-checkpoint \
  -H "Authorization: Bearer <admin_token>"

Built-in SSH Server (Port 2222)

Secure, key-based Git operations without needing host OpenSSH integration.

SSH Key Generation

ProGit generates host Ed25519 and RSA keys in /data/ssh/ if none exist. Git clients can authenticate directly using their public keys.

User Key Registration

  1. Generate an Ed25519 key pair on your local machine:
    ssh-keygen -t ed25519 -C "your_email@example.com"
  2. Copy the contents of ~/.ssh/id_ed25519.pub.
  3. In ProGit, navigate to User Settings > SSH Keys > Add Key.
  4. Paste the public key and save. You can now clone and push over SSH!

Smart HTTP & SSH Git Operations

Full compliance with the Git v2 Smart Transfer Protocol.

Clone Formats

  • HTTP/HTTPS: http://localhost:3000/<owner>/<repo>.git
  • SSH: ssh://git@localhost:2222/<owner>/<repo>.git
  • Wiki HTTP: http://localhost:3000/<owner>/<repo>.wiki.git
  • Wiki SSH: ssh://git@localhost:2222/<owner>/<repo>.wiki.git
Personal Access Tokens for CLI
When pushing over HTTP, developers can authenticate using Personal Access Tokens (PATs) instead of their primary account password. Create PATs in Settings > Access Tokens.

Blank Repository Quick Setup (GitHub-Style)

When creating a repository without an initial README (or when a bare repository has zero commits), ProGit displays a comprehensive setup guide matching GitHub's workflow:

  • Quick Setup Bar: Instant toggle between HTTPS and SSH clone URLs with one-click clipboard copying.
  • Create a new repository on the command line: Ready-to-copy terminal commands initializing Git, adding a README, committing, setting main branch, and pushing to ProGit.
  • Push an existing repository from the command line: Copyable commands to add ProGit as remote and push existing branches.
  • Import code from another repository: Direct shortcut button linking to the repository import wizard.

Repository Import

ProGit allows importing external Git repositories directly via /new/import or POST /api/v1/repos/import. The server clones the entire history (all commits, branches, and tags) using Git mirror replication and seamlessly binds it to your personal or organization account.

Online Code Editor & Prettier Themes

Feature-rich in-browser editing with real-time syntax highlighting and 8 Prettier themes.

8 Curated Themes

Theme IDNamePalette Description
github-darkGitHub Dark (Default)Base dark theme matching #0d1117 with emerald accents
github-lightGitHub LightCrisp, high-contrast light theme
draculaDraculaFamous dark purple, pink, and cyan palette
monokaiMonokai ProIconic vibrant amber, magenta, and green
nordNordic FrostCalm arctic blues and teals
one-darkOne Dark ProBalanced Atom/VS Code dark styling
solarized-darkSolarized DarkEthan Schoonover's legendary solarized palette
synthwave-84Synthwave '84Neon glowing 80s cyberpunk aesthetic

Online Commits

Edit any file, provide a custom commit message and optional extended description, and choose between committing directly to the active branch or creating a new feature branch.

File Creation & Directory Uploads

Create nested paths online, upload multiple files, and import whole directories.

Nested File Creation

When creating a new file online, type the entire target path (e.g., src/controllers/auth.go). ProGit automatically creates intermediate directories and commits the file atomically.

Directory Uploads with Subdirectory Preservation

ProGit supports dragging and dropping whole folders or using the Upload a directory picker. Folder structures like assets/icons/logo.svg are preserved and committed in a single atomic Git tree update.

Branch Management & Protection

Branch lifecycle management, UI creation, commit stats, and default branch protection.

Branch Overview

The Branches page displays:

  • Active branches and their latest commit SHA, author, and timestamp.
  • Ahead / Behind commit counts relative to the default branch.
  • Branch deletion controls (with safety protection on the default branch).

Quick Branch Creation

Create branches directly from the branch dropdown in the repository code view or from the dedicated Branches management screen.

Pull Requests, Code Review & Merges

Full GitHub-style code collaboration with unified diffs, inline comments, and native merges.

Branch Comparison

Compare any two branches across commits. The compare view highlights added, modified, and deleted lines with unified diff formatting.

Formal Code Review States

  • Approve: Submit an approval to authorize merging.
  • Request Changes: Indicate blocking feedback that must be addressed.
  • Comment: General feedback without explicit approval/rejection.

Native Git Merges

Authorized reviewers and repository owners can execute a native Git merge with a single click. ProGit performs the merge on the server side and commits the merge commit to the target branch.

Repository Forking

Fork repositories into your personal account or any organization you administer.

Fork Mechanics

When you click Fork on any repository:

  1. ProGit prompts you to select the target destination (your personal account or an organization).
  2. A complete server-side clone of the bare repository is initialized on disk.
  3. All branches, tags, commit histories, and refs are preserved.
  4. Parent-fork relationships are tracked, allowing cross-repository Pull Requests.

ProGit Pages (Static Site Hosting)

Host static sites, documentation, and HTML portfolios directly from your Git repositories.

Enabling ProGit Pages

  1. Navigate to your repository and click the Pages tab.
  2. Toggle Enable ProGit Pages on.
  3. Choose your source branch (e.g. main or docs) and source directory (/ or /docs).
  4. Click Save Pages Settings.

Public Website URL

Your site is immediately published at:

http://localhost:3000/pages/<owner>/<repo>/
Automatic Markdown Rendering
If your repository only has a README.md and no index.html, ProGit Pages automatically parses your Markdown and serves it as a beautifully styled HTML webpage!

Git-Backed Wiki Engine

Dual-mode documentation: edit via web UI or clone as a native Git repository.

Cloning the Wiki via Git

Every repository has an independent Git-backed wiki bare repository:

git clone http://localhost:3000/<owner>/<repo>.wiki.git

Commit your .md markdown files locally and push to origin; they immediately appear on the web Wiki!

Kanban Project Boards

Agile task and project tracking embedded into every repository.

Features

  • Default columns: To do, In progress, and Done.
  • Add custom columns (e.g. In Review, Backlog).
  • Task cards supporting freeform Markdown notes or links to existing repository Issues.
  • Card movement between columns with automatic completion percentage metrics.

Organizations, Teams & Access Controls

Manage company repositories, team assignments, and fine-grained collaborator permissions.

Roles & Access Levels

  • Organization Owner: Complete control over the organization, all its teams, members, and repositories.
  • Team Permissions:
    • read: Can clone and view code, issues, and wiki.
    • write: Can push commits, create branches, edit online, and manage project boards.
    • admin: Full settings and collaborator management on team repositories.
  • External Collaborators: Invite individual users to private repositories with granular read, write, or admin permissions without adding them to an organization.

Webhooks & Automated Delivery

Trigger CI/CD pipelines, Slack/Discord notifications, and custom webhooks automatically on Git push, issue, and pull request events.

Overview

ProGit features an asynchronous, pure-Go webhook dispatch engine. When events occur in your repository (such as code pushes over HTTP or native SSH, issue creation, or pull request reviews), ProGit queues and delivers HTTP POST payloads with cryptographic HMAC signatures to your subscribed endpoints.

Supported Event Triggers

EventTrigger ConditionPayload Contents
pushCode committed or branch pushed via Git CLI (Smart HTTP / SSH) or online file editorRepository metadata, pusher account, Git ref, before/after commit SHAs, commit array
issuesIssue opened, closed, edited, or assigned to a collaboratorRepository info, issue title, issue body, sender, state
pull_requestPull request opened, closed, merged, or reviewedRepository info, PR details, head/base branches, sender, action
pingManual test delivery triggered from repository settingsRepository info, zen message, delivery timestamp

Cryptographic Signature Verification (HMAC-SHA256)

When you configure a secret token on a webhook, ProGit calculates a cryptographic HMAC-SHA256 signature for every payload and transmits it in both standard GitHub-compatible and ProGit headers:

  • X-Hub-Signature-256: sha256=<hex-encoded HMAC signature>
  • X-ProGit-Signature: sha256=<hex-encoded HMAC signature>
  • X-ProGit-Event: The event name (e.g. push, issues, pull_request, ping)
  • X-ProGit-Delivery: Unique delivery UUID for tracing and idempotency
Verifying Signatures in Python

You can verify webhook requests in your backend using standard HMAC routines:

import hmac, hashlib

def verify_progit_signature(payload_bytes, secret_key, header_signature):
    expected = "sha256=" + hmac.new(secret_key.encode(), payload_bytes, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, header_signature)

Delivery Logs & Test Pings

Repository administrators can trigger an immediate test ping from the Repository Settings → Webhooks tab to verify network connectivity and signature verification. Each delivery is logged with full request/response diagnostics, HTTP status codes, and execution duration.

Developer Direct Messaging

Built-in developer communication system for private messaging, peer feedback, and sprint coordination.

Overview

ProGit includes an integrated messaging system that allows developers and contributors to communicate privately within the platform without leaving their code workspace. Whether coordinating code reviews, discussing sprint priorities, or providing private feedback, developers can exchange messages directly.

Key Capabilities

  • Real-time Unread Badge: The top navigation bar displays a live unread message counter that updates as messages arrive.
  • Inbox & Outbox: Clean tabbed interface separating received messages from sent communications.
  • One-Click Reply: Reply directly to sender with automated subject prefixing (Re: ...) and conversation continuity.
  • Quick Developer Directory: Message composer with auto-population of active platform developers.
  • Markdown Formatting: Messages support rich Markdown text, code blocks, lists, and inline links.
Instant Access

Access your messaging portal anytime by clicking the Messages icon in the navigation bar or visiting /messages in the web client.

Danger Zone & Repository Security

Critical administrative actions: visibility toggling, read-only archiving, ownership transfers, and collaborator security.

Danger Zone Actions

Located in the Settings → Danger Zone tab of every repository, these operations protect high-stakes repository transitions:

ActionBehaviorSecurity Safeguards
Change Visibility Toggle between Public and Private status. Requires repository administrator privileges. Immediately restricts access in Web UI, REST API, Git HTTP, and native SSH.
Archive Repository Places repository into permanent read-only status. Enforces strict read-only mode across all layers: rejects Git CLI pushes (receive-pack), online commits, file edits, uploads, and issue creation with HTTP 400. Can be unarchived at any time by owner.
Transfer Ownership Reassigns repository to another developer or organization. Atomically moves the Git bare repository folder on disk to the new owner namespace and reassigns database records. Validates target account existence and prevents collisions.
Delete Repository Permanently purges repository and bare Git storage. Requires typing repository name to confirm in a themed dialog. Destroys all issues, PRs, wiki pages, webhooks, and disk assets permanently.

Collaborator-Scoped Issue Assignees

Security Hardening: Strict Collaborator Scoping

To eliminate information disclosure and unauthorized assignment risks, ProGit strictly restricts issue assignees to confirmed repository owners and collaborators:

  • The GET /api/v1/repos/{owner}/{repo}/assignees endpoint returns exclusively users with valid collaborator or owner privileges.
  • Assigning an issue to any external user or stranger is blocked at the backend API layer with HTTP 400 Bad Request ("user must be a collaborator or owner of this repository").

Super Admin Setup & CLI

Provisioning and managing administrator privileges from the terminal.

CLI User Creation

# Create super administrator via CLI inside Podman / Docker
podman exec -it progit /usr/local/bin/progit admin create-user \
  --username="admin" \
  --email="admin@example.com" \
  --password="YourSecurePassword123!" \
  --admin

User & Key Administration

Administer user accounts, security tokens, and SSH public keys.

Administrative Powers

  • Activate / Suspend: Temporarily lock user accounts without deleting repository data.
  • Promote / Demote: Grant or revoke system administrator rights. (Self-demotion is blocked to prevent accidental administrative lockouts).
  • Delete User: Purge account and associated user repositories from the server.

Repository Oversight & Danger Zone

Global repository management and disk usage telemetry.

Global Repository List

In /admin > Repositories, administrators can inspect all repositories hosted across all user accounts and organizations, including visibility status and disk usage.

Administrative Deletion

Administrators can delete any repository directly from the admin panel. ProGit purges the metadata from SQLite and permanently removes the .git directory from disk.

WAL Checkpoints & System Telemetry

Live Go runtime metrics and database maintenance.

Live Diagnostics Dashboard

In /admin > System Overview, ProGit renders live runtime diagnostics directly from the Go runtime:

  • Go compiler version (e.g. go1.24.1)
  • Active Goroutine count
  • Heap memory allocations and system memory
  • Total registered users and repositories

Manual WAL Checkpoint API

curl -X POST http://localhost:3000/api/v1/admin/maintenance/wal-checkpoint \
  -H "Authorization: Bearer <admin_token>"

REST API Overview & Authentication

Interact programmatically with ProGit using the REST v1 API.

Base URL

http://localhost:3000/api/v1

Authentication Methods

ProGit supports two primary authentication schemes for API interaction:

  1. Personal Access Tokens (Bearer PAT): Ideal for scripts, CI/CD runners, and automated tools.
    Authorization: Bearer pgt_34f8a92...
  2. Web Session Cookie: Sent automatically by browsers when authenticated (`progit_session`). SameSite is enforced with HttpOnly security.

IP Rate Limiting

To neutralize credential brute-force attacks while preserving automated test throughput, authentication routes (/api/v1/auth/login and /api/v1/auth/register) enforce an IP-based sliding window rate limit of 120 requests per minute. Requests exceeding this threshold receive HTTP 429:

HTTP/1.1 429 Too Many Requests
Content-Type: application/json

{
  "error": "Too many authentication attempts. Please try again later."
}

Standard JSON Error Format

All client and server errors return structured JSON with an explanatory error key:

{
  "error": "resource not found or access denied"
}

Health & Readiness Probes

GET/api/health

Verifies Go HTTP server, pure-Go SQLite WAL database connectivity, and repository disk access.

{
  "app": "ProGit",
  "status": "ok",
  "version": "1.0.0",
  "database": "healthy",
  "repositories": "accessible",
  "ssh_enabled": true,
  "uptime": "2h14m"
}
GET/api/ready

Kubernetes / container readiness probe returning HTTP 200 OK when ProGit is ready to accept traffic.

Users, Tokens & SSH Keys API

Endpoints for registration, session authentication, profile settings, PATs, and SSH keys.

Register User Account

POST/api/v1/auth/register
{
  "username": "dev_alice",
  "email": "alice@progit.local",
  "password": "SecretPassword123!",
  "full_name": "Developer Alice"
}

User Login (Create Session)

POST/api/v1/auth/login
{
  "username": "dev_alice",
  "password": "SecretPassword123!"
}

Response sets Set-Cookie: progit_session=... and returns user profile:

{
  "message": "Login successful",
  "token": "d307a10bb36...",
  "user": {
    "id": 1,
    "username": "dev_alice",
    "email": "alice@progit.local",
    "is_admin": false
  }
}

Get Current User Profile

GET/api/v1/auth/me

Returns the currently authenticated user's session profile, permissions, and administrator status.

User Logout

POST/api/v1/auth/logout

Clears active session cookie and invalidates session token.

Inspect Public User Profile

GET/api/v1/users/{username}

Returns public account details, repositories, bio, location, and activity metrics.

Update User Settings

PUT/api/v1/user/settings
{
  "full_name": "Alice Senior Engineer",
  "bio": "Distributed systems and Go developer",
  "location": "Bengaluru, India",
  "website": "https://github.com/alice"
}

Update Password

PUT/api/v1/user/password
{
  "old_password": "SecretPassword123!",
  "new_password": "NewSecretPassword456!"
}

User Dashboard Overview

GET/api/v1/user/dashboard

Retrieves the authenticated developer's personalized dashboard context including their active repositories, paginated recent activity stream, affiliated organizations, and starred projects.

Personal Access Tokens (PAT)

GET/api/v1/user/tokens
POST/api/v1/user/tokens
{
  "name": "ci-builder-token",
  "scopes": "repo,user"
}
DELETE/api/v1/user/tokens/{id}

SSH Public Keys

GET/api/v1/user/keys
POST/api/v1/user/keys
{
  "title": "MacBook Pro M-Series",
  "key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGt7..."
}
DELETE/api/v1/user/keys/{id}

Repositories & Branches API

Endpoints for repository creation, metadata inspection, stars, collaborators, and branch lifecycle.

List Repositories

GET/api/v1/repos

Lists repositories. Optional query parameters include ?owner={username} to filter by owner handle, or ?q={query} to perform keyword filtering.

Search Repositories

GET/api/v1/repos/search?q={query}&limit=20&page=1

Global repository search supporting keyword matching against repository name, description, owner username, and combined owner/repo paths (e.g. cbdc/website or cbdc/). Supports ?q=/ to discover all accessible repositories without filter elimination. Includes strict access control: unauthenticated users only discover public repositories; authenticated users discover public repositories and private repositories where they are the owner, a confirmed collaborator, or an organization member.

{
  "ok": true,
  "repositories": [
    {
      "id": 14,
      "name": "cloud-distributed-kv",
      "owner_name": "dev_alice",
      "description": "High performance pure-Go key-value store",
      "is_private": false,
      "num_stars": 12,
      "default_branch": "main"
    }
  ],
  "total": 1
}

Explore Repositories

GET/api/v1/explore?q={query}&page=1&limit=12

Retrieves paginated repositories and platform highlights for the Explore page. Supports keyword search via ?q={query}, current page selection via ?page={page}, and page size via ?limit={limit}.

{
  "repositories": [
    {
      "id": 14,
      "name": "cloud-distributed-kv",
      "owner_name": "dev_alice",
      "description": "High performance pure-Go key-value store",
      "is_private": false,
      "num_stars": 12,
      "default_branch": "main"
    }
  ],
  "total": 48,
  "page": 1,
  "limit": 12,
  "total_pages": 4
}

Create Repository

POST/api/v1/repos
{
  "name": "cloud-distributed-kv",
  "description": "High performance pure-Go key-value store",
  "private": false,
  "auto_init": true,
  "readme": "Default"
}

Import Repository

POST/api/v1/repos/import

Clones an external Git repository from GitHub, GitLab, Bitbucket, or any Git remote URL directly into ProGit with complete commit history, branches, and tags. Supports optional authentication credentials for private repositories.

{
  "clone_url": "https://github.com/octocat/Hello-World.git",
  "owner": "dev_alice",
  "name": "Hello-World",
  "description": "Imported repository with full history",
  "private": false,
  "auth_username": "",
  "auth_password": ""
}

Get Repository Details

GET/api/v1/repos/{owner}/{repo}
{
  "id": 14,
  "name": "cloud-distributed-kv",
  "full_name": "dev_alice/cloud-distributed-kv",
  "owner": "dev_alice",
  "default_branch": "main",
  "is_private": false,
  "is_archived": false,
  "can_write": true,
  "is_admin": true,
  "clone_urls": {
    "http": "http://localhost:3000/dev_alice/cloud-distributed-kv.git",
    "ssh": "ssh://git@localhost:2222/dev_alice/cloud-distributed-kv.git"
  }
}

Toggle Repository Star

POST/api/v1/repos/{owner}/{repo}/star
{
  "starred": true,
  "num_stars": 12
}

List Collaborators

GET/api/v1/repos/{owner}/{repo}/collaborators

Add / Update Collaborator

PUT/api/v1/repos/{owner}/{repo}/collaborators/{collaborator}
{
  "mode": "write"
}

Allowed modes: read (clone and inspect), write (commit and push code), admin (full repository settings).

Revoke Collaborator

DELETE/api/v1/repos/{owner}/{repo}/collaborators/{collaborator}

List Branches

GET/api/v1/repos/{owner}/{repo}/branches

Pass ?detail=true to return rich branch metadata including author, latest commit SHA, commit message, and relative timestamp.

Create Branch

POST/api/v1/repos/{owner}/{repo}/branches
{
  "branch_name": "feature/raft-consensus",
  "base_ref": "main"
}

Delete Branch

DELETE/api/v1/repos/{owner}/{repo}/branches/{branch}

Branch protection blocks deletion of the default repository branch (main / master) with HTTP 400.

List Tags

GET/api/v1/repos/{owner}/{repo}/tags

Commit History & Diffs

GET/api/v1/repos/{owner}/{repo}/commits?ref=main
GET/api/v1/repos/{owner}/{repo}/commits/{sha}
GET/api/v1/repos/{owner}/{repo}/compare?base=main&head=feature

File Tree & Online Commits API

Endpoints for browsing trees, reading raw blobs, editing files online, and multi-file directory uploads.

Get Directory Tree

GET/api/v1/repos/{owner}/{repo}/tree?ref=main&path=src/core

Returns tree entries, root README content (if available), total commits count, and the latest commit details for the requested ref and path (matching GitHub's repository code view).

{
  "entries": [
    {
      "name": "README.md",
      "path": "README.md",
      "type": "blob",
      "size": 1820,
      "sha": "a1b2c3d..."
    }
  ],
  "readme": "# README...",
  "latest_commit": {
    "sha": "f1aecdf5ec1f4faf9656087606decb823193dcc0",
    "short_sha": "f1aecdf",
    "author": "sanjeevsenapati",
    "email": "sanjeev@therasoftonline.com",
    "message": "Initial Commit from cli",
    "timestamp": "2026-11-02T05:07:59Z"
  },
  "total_commits": 7
}

Get Blob File Content

GET/api/v1/repos/{owner}/{repo}/blob?ref=main&path=README.md
{
  "name": "README.md",
  "path": "README.md",
  "size": 1820,
  "content": "# Cloud KV Store\n\nUltra-fast in-memory...",
  "is_binary": false,
  "language": "markdown"
}

Stream Raw File Bytes

GET/api/v1/repos/{owner}/{repo}/raw?ref=main&path=assets/banner.png

Streams raw file bytes with appropriate Content-Type headers (e.g. image/png, application/octet-stream).

Online File Creation & Update

POST/api/v1/repos/{owner}/{repo}/contents/{path}
{
  "branch": "main",
  "content": "package core\n\ntype KV struct {}\n",
  "message": "Add KV core definition"
}

Online File Deletion

DELETE/api/v1/repos/{owner}/{repo}/contents/{path}
{
  "branch": "main",
  "message": "Remove deprecated configuration"
}

Multipart Multi-File & Directory Upload

POST/api/v1/repos/{owner}/{repo}/upload

Accepts multipart/form-data with form fields branch, message, and one or more file fields preserving relative paths (webkitdirectory).

Issues & Assignees API

Endpoints for issue tracking, discussion comments, and security-scoped collaborator assignees.

List Issues

GET/api/v1/repos/{owner}/{repo}/issues

Query parameters: ?state=open|closed, ?assignee=dev_alice.

Create Issue

POST/api/v1/repos/{owner}/{repo}/issues
{
  "title": "Support distributed snapshotting",
  "content": "We need to support checkpointing WAL files across multiple nodes."
}

Get Issue Details

GET/api/v1/repos/{owner}/{repo}/issues/{index}

Update Issue Status & Title

PATCH/api/v1/repos/{owner}/{repo}/issues/{index}
{
  "title": "Support distributed snapshotting (v2)",
  "state": "closed"
}

Get Collaborator Assignees (Security Scoped)

GET/api/v1/repos/{owner}/{repo}/assignees

Returns only users eligible for issue assignment: confirmed repository owners and collaborators. External users and platform strangers are strictly excluded.

Assign Issue to Collaborator

PUT/api/v1/repos/{owner}/{repo}/issues/{index}/assignee
{
  "assignee": "dev_alice"
}

Assigning an issue to any user who is not an owner or collaborator returns HTTP 400 Bad Request.

Issue Comments Thread

GET/api/v1/repos/{owner}/{repo}/issues/{index}/comments
POST/api/v1/repos/{owner}/{repo}/issues/{index}/comments
{
  "content": "Implemented in PR #5. Will verify with integration test."
}

Pull Requests & Review API

Endpoints for opening PRs, inspecting unified diffs, code reviews, and executing merges.

List Pull Requests

GET/api/v1/repos/{owner}/{repo}/pulls?state=open

Open Pull Request

POST/api/v1/repos/{owner}/{repo}/pulls
{
  "title": "Add HTTPS support and ACME integration",
  "content": "Implements automatic TLS certificate provisioning",
  "head": "feature-https",
  "base": "main"
}

Inspect PR Details & Mergeability

GET/api/v1/repos/{owner}/{repo}/pulls/{index}

Get Pull Request Unified Diff

GET/api/v1/repos/{owner}/{repo}/pulls/{index}/diff

Submit Code Review

POST/api/v1/repos/{owner}/{repo}/pulls/{index}/reviews
{
  "content": "Architecture looks solid. Verified zero CGO compatibility.",
  "review_state": "approved"
}

Review states: approved, comment, changes_requested.

List & Add Inline Review Comments

GET/api/v1/repos/{owner}/{repo}/pulls/{index}/reviews/comments
POST/api/v1/repos/{owner}/{repo}/pulls/{index}/reviews/comments
{
  "content": "Consider adding a timeout here to avoid socket leaks",
  "path": "internal/https/cert.go",
  "line": 42
}

Execute Native Git Merge

POST/api/v1/repos/{owner}/{repo}/pulls/{index}/merge
{
  "merge_style": "merge"
}

Supported merge styles: merge (merge commit), squash (squash and merge), rebase (rebase and fast-forward).

Repository Forking API

Endpoints for cloning repositories into user or organization namespaces with upstream tracking.

Fork Repository

POST/api/v1/repos/{owner}/{repo}/forks
{
  "organization": "prodevans"
}

Omit organization to fork into the authenticated user's personal namespace.

List Downstream Forks

GET/api/v1/repos/{owner}/{repo}/forks

Returns an array of all forks spawned from this parent repository.

Wiki & ProGit Pages API

Endpoints for managing Git-backed wiki documentation and static Pages website hosting.

List Wiki Pages

GET/api/v1/repos/{owner}/{repo}/wiki/pages

Get Single Wiki Page

GET/api/v1/repos/{owner}/{repo}/wiki/pages/{slug}

Create or Update Wiki Page

POST/api/v1/repos/{owner}/{repo}/wiki/pages
{
  "title": "Architecture Overview",
  "content": "# System Architecture\n\nProGit is built in pure Go...",
  "message": "Add architecture overview"
}

Delete Wiki Page

DELETE/api/v1/repos/{owner}/{repo}/wiki/pages/{slug}

Get Wiki Page Revision History

GET/api/v1/repos/{owner}/{repo}/wiki/pages/{slug}/history

ProGit Pages Configuration

GET/api/v1/repos/{owner}/{repo}/pages
POST/api/v1/repos/{owner}/{repo}/pages
{
  "branch": "main",
  "folder": "/docs"
}

Configures static hosting. Rendered pages are served at /pages/{owner}/{repo}/.

Webhooks & Deliveries API

Programmatic control for registering webhooks, triggering test events, and reviewing delivery audit logs.

List Repository Webhooks

GET/api/v1/repos/{owner}/{repo}/hooks

Returns an array of all webhooks registered on the repository.

Create Webhook

POST/api/v1/repos/{owner}/{repo}/hooks
{
  "url": "https://ci.example.com/webhooks/progit",
  "secret": "your_secure_hmac_secret",
  "content_type": "json",
  "events": "push,issues,pull_request",
  "is_active": true
}

Trigger Test Ping Delivery

POST/api/v1/repos/{owner}/{repo}/hooks/{id}/test

Dispatches an immediate ping event to verify server connectivity and HMAC validation. Returns the created delivery record.

List Webhook Deliveries

GET/api/v1/repos/{owner}/{repo}/hooks/{id}/deliveries

Inspect up to 50 recent webhook delivery attempts, including HTTP status codes, response times, request headers, and response payloads.

Delete Webhook

DELETE/api/v1/repos/{owner}/{repo}/hooks/{id}

Danger Zone & Repository Governance API

Endpoints for changing repository visibility, read-only archiving, ownership transfer, and deletion.

Change Repository Visibility

POST/api/v1/repos/{owner}/{repo}/visibility
{
  "is_private": true
}

Archive / Unarchive Repository

POST/api/v1/repos/{owner}/{repo}/archive

Set "archive": true to lock repository to read-only; set "archive": false to restore write access.

{
  "archive": true
}

Transfer Repository Ownership

POST/api/v1/repos/{owner}/{repo}/transfer
{
  "new_owner": "dev_alice"
}

Atomically moves the Git bare repository directory on disk and reassigns ownership records in SQLite.

Delete Repository

DELETE/api/v1/repos/{owner}/{repo}

Permanently deletes the repository and removes its bare Git directory from disk.

Developer Messaging API

Endpoints for direct peer messaging, inbox management, and notification counters.

List Active Developers

GET/api/v1/developers

Returns a list of active developer accounts available for direct messaging.

Send Direct Message

POST/api/v1/messages
{
  "recipient_username": "dev_bob",
  "subject": "Sprint Targets Discussion",
  "content": "Hi Bob, can we review the webhook signatures today?"
}

Get Inbox Messages

GET/api/v1/messages/inbox

Get Sent Messages (Outbox)

GET/api/v1/messages/sent

Get Unread Message Count

GET/api/v1/messages/unread-count
{
  "unread_count": 3
}

Mark Message as Read

PATCH/api/v1/messages/{id}/read

Delete Message

DELETE/api/v1/messages/{id}

Organizations & Teams API

REST endpoints for organization, team, and member administration.

Create Organization

POST/api/v1/orgs
{
  "name": "prodevans",
  "full_name": "Prodevans Technologies",
  "description": "Cloud native solutions"
}

List Organizations

GET/api/v1/orgs
GET/api/v1/user/orgs

Get Organization Profile

GET/api/v1/orgs/{org}

Organization Members

GET/api/v1/orgs/{org}/members
POST/api/v1/orgs/{org}/members
{
  "username": "dev_alice",
  "role": "admin"
}
DELETE/api/v1/orgs/{org}/members/{username}

Organization Teams

GET/api/v1/orgs/{org}/teams
POST/api/v1/orgs/{org}/teams
{
  "name": "Backend Engineers",
  "description": "Core backend team",
  "permission": "write"
}

Team Members

POST/api/v1/orgs/{org}/teams/{team_id}/members
DELETE/api/v1/orgs/{org}/teams/{team_id}/members/{user_id}

List Organization Repositories

GET/api/v1/orgs/{org}/repos

Projects & Kanban API

Endpoints for managing project boards, columns, and task cards.

List Repository Projects

GET/api/v1/repos/{owner}/{repo}/projects

Create Project Board

POST/api/v1/repos/{owner}/{repo}/projects
{
  "title": "Release v1.0 Roadmap",
  "description": "Launch milestone tracking"
}

Get Project Board & Columns

GET/api/v1/repos/{owner}/{repo}/projects/{id}

Returns board columns, task cards, and progress metrics (`total_cards`, `done_cards`).

Update / Delete Project

PUT/api/v1/repos/{owner}/{repo}/projects/{id}
DELETE/api/v1/repos/{owner}/{repo}/projects/{id}

Project Columns

POST/api/v1/repos/{owner}/{repo}/projects/{id}/columns
{
  "title": "In Review"
}
PUT/api/v1/repos/{owner}/{repo}/projects/{id}/columns/{column_id}
DELETE/api/v1/repos/{owner}/{repo}/projects/{id}/columns/{column_id}

Task Cards

POST/api/v1/repos/{owner}/{repo}/projects/{id}/cards
{
  "column_id": 1,
  "content": "Verify zero CGO builds across Linux and macOS"
}
PUT/api/v1/repos/{owner}/{repo}/projects/{id}/cards/{card_id}
{
  "column_id": 3,
  "content": "Verified: Alpine, Debian, macOS binaries all run without CGO"
}
DELETE/api/v1/repos/{owner}/{repo}/projects/{id}/cards/{card_id}

System Admin & Maintenance API

Endpoints for Super Admin platform telemetry, user administration, and SQLite database maintenance.

Inspect System Telemetry

GET/api/v1/admin/stats
{
  "users_count": 14,
  "repos_count": 8,
  "orgs_count": 2,
  "goroutines": 32,
  "go_version": "go1.23.4",
  "mem_alloc_mb": 42.8,
  "db_size_kb": 1280
}

Manage Platform Users

GET/api/v1/admin/users
POST/api/v1/admin/users
{
  "username": "qa_operator",
  "email": "qa@progit.local",
  "password": "SecurePassword123!",
  "is_admin": true
}
PATCH/api/v1/admin/users/{id}
{
  "is_admin": false,
  "is_active": true
}
DELETE/api/v1/admin/users/{id}

Global Repository Registry

GET/api/v1/admin/repos
DELETE/api/v1/admin/repos/{id}

Database Maintenance (WAL Checkpoint & Vacuum)

POST/api/v1/admin/maintenance
{
  "op": "checkpoint_wal"
}

Operations: checkpoint_wal (runs PRAGMA wal_checkpoint(TRUNCATE)), vacuum (runs SQLite VACUUM to reclaim free pages).

Backup & Disaster Recovery

Simple, reliable procedures to backup and restore ProGit data.

Backup Procedure

Because ProGit uses SQLite and local bare Git repositories, backup requires capturing only two directories:

# 1. Trigger SQLite WAL Checkpoint
curl -X POST http://localhost:3000/api/v1/admin/maintenance/wal-checkpoint -H "Authorization: Bearer <token>"

# 2. Archive data directory
tar -czvf progit-backup-$(date +%F).tar.gz /data/db /data/repositories /data/config

Restoring Data

# Extract archive to /data
tar -xzvf progit-backup-2026-11-01.tar.gz -C /

Upgrading ProGit

Safe, zero-downtime upgrades for containers and binary installations.

Container Upgrades

# Pull or build latest image
bash podman/build.sh

# Redeploy container (persistent volumes ensure zero data loss)
bash podman/deploy.sh

Binary Upgrades

sudo systemctl stop progit
sudo cp progit.new /usr/local/bin/progit
sudo systemctl start progit

Troubleshooting & FAQ

Answers to common operational questions and error resolutions.

Q: Why do Git pushes over HTTP fail with 401 Unauthorized?

Ensure you authenticate with a valid username and password, or use a Personal Access Token (PAT) created from Settings > Access Tokens.

Q: How do I change the default SSH port from 2222?

Set SSH_PORT = <port> and SSH_LISTEN_PORT = <port> under [server] in app.ini, or pass PROGIT_SSH_PORT=<port> as an environment variable.

Q: How does ProGit Pages resolve file MIME types?

ProGit has a built-in MIME-type registry covering HTML, CSS, JavaScript, SVG, PNG, WebP, JSON, and WebAssembly. It delivers assets with proper Content-Type headers.

ESC