GitProof is a Next.js application designed to provide a robust, centralized system for managing Git repositories across multiple providers. It ensures that developers can push their changes to a local repository, which then synchronizes with various remote Git providers, maintaining consistency and reliability.
cp .env.example .envEdit .env with your configuration.
# Generate Prisma client
pnpm run db:generate
# Run migrations
pnpm run db:migrate
# Seed database with sample data
pnpm run db:seedpnpm run devThree web applications will be available:
- GitProof Dashboard: The main application interface: http://localhost:3000
- pgAdmin: PostgreSQL administration interface: http://localhost:8080
- Email: admin
- Password: admin
- Redis Commander: Redis administration interface: http://localhost:8081
graph TD
subgraph "Developer Workflow"
Dev[Developer] -->|git push| LocalRepo[Local Git Repository]
LocalRepo -->|git push| CentralRelay[Central Git Relay]
end
subgraph "Central Git-Proof System"
CentralRelay -->|Distributes Changes| DistributionEngine[Distribution Engine]
DistributionEngine -->|Push Updates| SyncManager[Synchronization Manager]
SyncManager -->|Resolve Conflicts| ConflictResolver[Conflict Resolution]
ProviderMonitor[Provider Status Monitor] -.->|Status Updates| DistributionEngine
CredentialManager[Credential Manager] -.->|Auth Info| AdapterLayer
SyncManager -->|Queue Jobs| JobQueue[Job Queue]
JobQueue -->|Process Jobs| AdapterLayer[Provider Adapter Layer]
end
subgraph "Provider Adapters"
AdapterLayer -->|API Calls| GitHub[GitHub Adapter]
AdapterLayer -->|API Calls| GitLab[GitLab Adapter]
AdapterLayer -->|API Calls| Forgejo[Forgejo Adapter]
AdapterLayer -->|API Calls| Custom[Custom Provider Adapter]
end
subgraph "Git Providers"
GitHub -->|Push/Pull| GitHubCloud[GitHub Cloud]
GitLab -->|Push/Pull| GitLabCloud[GitLab Cloud]
Forgejo -->|Push/Pull| ForgejoServer[Forgejo Server]
Custom -->|Push/Pull| CustomProvider[Custom Git Provider]
end
subgraph "Fallback & Recovery"
DistributionEngine <-->|Status Check| FailoverManager[Failover Manager]
FailoverManager -->|Emergency Backup| LocalBackup[Local Git Backup]
ProviderMonitor -->|Outage Alerts| AlertSystem[Alert System]
ProviderMonitor -->|Recovery Detection| RecoveryManager[Recovery Synchronization]
end
The backend is built using:
- Next.js API Routes - RESTful API endpoints
- Prisma ORM - Type-safe database access
- SQLite - Development database (easily swappable to PostgreSQL)
- BullMQ - Job queue for asynchronous operations
- TypeScript - Type safety throughout the codebase
GET /api/dashboard/stats- Get system statisticsGET /api/dashboard/activity- Get recent activity
GET /api/providers- List all providersPOST /api/providers- Create a new providerGET /api/providers/[id]- Get provider detailsPUT /api/providers/[id]- Update providerDELETE /api/providers/[id]- Delete providerPOST /api/providers/[id]/test- Test provider connection
GET /api/sync-queue- List sync jobs (with filters)POST /api/sync-queue- Create new sync jobGET /api/sync-queue/stats- Get queue statisticsPUT /api/sync-queue/[id]/priority- Update job priorityDELETE /api/sync-queue/[id]- Cancel sync job
GET /api/failover/events- List failover eventsPOST /api/failover/events- Create failover eventGET /api/failover/rules- Get failover rulesPUT /api/failover/rules- Update failover rules
GET /api/backup/status- Get backup statusPOST /api/backup/status- Trigger manual backup