|
|
2 weeks ago | |
|---|---|---|
| docs | 2 weeks ago | |
| gitrepublic-cli@daafc006e7 | 3 weeks ago | |
| k8s | 3 weeks ago | |
| nostr | 2 weeks ago | |
| scripts | 2 weeks ago | |
| src | 2 weeks ago | |
| static | 2 weeks ago | |
| .dockerignore | 3 weeks ago | |
| .gitignore | 4 weeks ago | |
| .npmignore | 3 weeks ago | |
| Dockerfile | 3 weeks ago | |
| LICENSE | 3 weeks ago | |
| README.md | 3 weeks ago | |
| docker-compose.yml | 3 weeks ago | |
| docker-entrypoint.sh | 2 weeks ago | |
| package-lock.json | 3 weeks ago | |
| package.json | 3 weeks ago | |
| svelte.config.js | 4 weeks ago | |
| tsconfig.json | 4 weeks ago | |
| vite.config.ts | 3 weeks ago | |
README.md
GitRepublic
A decentralized, Nostr-based git server that enables git repository hosting and collaboration using Nostr events. Repositories are announced via NIP-34, and all operations (clone, push, pull) are authenticated using NIP-98 HTTP authentication.
Quick Start
Web Interface
- Start the server:
npm run dev - Open browser:
http://localhost:5173 - Connect NIP-07 extension (Alby, nos2x, etc.)
- Visit
/signupto create your first repository
Command Line Interface
# Install
npm install -g gitrepublic-cli
# Set your Nostr private key
export NOSTRGIT_SECRET_KEY="nsec1..."
# Setup (configures credential helper and commit hook)
gitrep-setup
For complete CLI documentation and all available commands, run:
gitrep --help
Documentation
Complete documentation is available in the docs directory:
- About GitRepublic - Overview and table of contents for all documentation topics
Key Topics
- How this git server integrates Nostr
- Creating, forking, transferring, or cloning a repo
- Editing a repo
- Managing a repo
- Search and viewing external git repos
- REST API and CLI
- Profile pages
- Settings and Dashboard
- Working with GRASP servers
- Lightweight versus Enterprise modes
- Tech stack used
- Specs used
Components
GitRepublic consists of three main components:
- Web Interface - Full-featured web application for browsing, editing, and managing repositories
- Command Line Interface (CLI) - Git wrapper and API client for command-line operations
- REST API - Complete API for programmatic access
All three interfaces use the same underlying Nostr-based authentication and repository management system.
Installation
Development
git clone https://github.com/silberengel/gitrepublic-web.git
cd gitrepublic-web
npm install
npm run dev
Production
See deployment documentation in the docs directory.
API Access
All API endpoints are documented in OpenAPI format. Access the API documentation at:
- Development:
http://localhost:5173/api/openapi.json - Production:
https://your-domain.com/api/openapi.json
Use NIP-98 authentication for all write operations.
Server Administration
For server administrators and DevOps engineers:
Deployment Modes
GitRepublic supports two deployment modes:
- Lightweight Mode (default): Single container deployment with application-level security
- Enterprise Mode: Kubernetes-based multi-tenant deployment with complete isolation
See Deployment Modes Documentation for detailed comparison.
Enterprise Mode (Kubernetes)
For production multi-tenant deployments with maximum security and isolation:
- Enterprise Mode Setup Guide - Complete Kubernetes deployment guide
- Container-per-tenant architecture
- Network isolation with Kubernetes Network Policies
- Resource quotas and limits
- PersistentVolume per tenant
- Ingress configuration
- Monitoring and troubleshooting
Configuration
Key environment variables for server configuration:
ENTERPRISE_MODE: Enable enterprise mode (true/false)GIT_REPO_ROOT: Path to store git repositories (default:/repos)GIT_DOMAIN: Domain for git repositories (default:localhost:6543)NOSTR_RELAYS: Comma-separated Nostr relaysMAX_REPOS_PER_USER: Maximum repositories per user (default:100)MAX_DISK_QUOTA_PER_USER: Maximum disk quota per user in bytes (default:10737418240= 10GB)RATE_LIMIT_ENABLED: Enable rate limiting (default:true)AUDIT_LOGGING_ENABLED: Enable audit logging (default:true)
See the deployment modes documentation and enterprise mode guide for complete configuration details.
License
MIT