diff --git a/app/dashboard/failover/page.tsx b/app/dashboard/failover/page.tsx new file mode 100644 index 0000000..da13ca3 --- /dev/null +++ b/app/dashboard/failover/page.tsx @@ -0,0 +1,230 @@ +export default function FailoverPage() { + const recoveryEvents = [ + { + id: 1, + type: 'failover', + provider: 'Forgejo', + fallbackProvider: 'GitHub', + reason: 'Connection timeout', + affectedRepos: 12, + timestamp: '2 hours ago', + status: 'resolved', + duration: '15 minutes' + }, + { + id: 2, + type: 'recovery', + provider: 'GitLab', + fallbackProvider: null, + reason: 'Service restored', + affectedRepos: 45, + timestamp: '6 hours ago', + status: 'completed', + duration: '2 minutes' + }, + { + id: 3, + type: 'failover', + provider: 'Custom Git Server', + fallbackProvider: 'GitLab', + reason: 'HTTP 503 Service Unavailable', + affectedRepos: 8, + timestamp: '1 day ago', + status: 'resolved', + duration: '45 minutes' + } + ]; + + const backupStatus = { + lastBackup: '30 minutes ago', + backupSize: '2.4 GB', + totalRepos: 156, + incrementalEnabled: true, + nextScheduled: 'in 30 minutes' + }; + + return ( +
+
+

+ Failover & Recovery +

+

+ Monitor failover events and manage recovery procedures +

+
+ + {/* Alert Banner */} +
+
+
+ + + +
+
+

+ Failover Configuration Active +

+
+

+ Automatic failover is enabled. Failed syncs will be redirected to available providers. +

+
+
+
+
+ + {/* Failover Configuration */} +
+ {/* Failover Rules */} +
+
+

+ Failover Rules +

+
+
+
+

+ Primary → Fallback Priority +

+

+ GitHub → GitLab → Forgejo → Local Backup +

+
+ +
+
+
+

+ Retry Attempts +

+

+ 3 attempts with exponential backoff +

+
+ +
+
+
+

+ Health Check Interval +

+

+ Every 60 seconds +

+
+ +
+
+
+
+ + {/* Backup Status */} +
+
+

+ Local Backup Status +

+
+
+ Last Backup + + {backupStatus.lastBackup} + +
+
+ Backup Size + + {backupStatus.backupSize} + +
+
+ Total Repositories + + {backupStatus.totalRepos} + +
+
+ Next Scheduled + + {backupStatus.nextScheduled} + +
+
+ + +
+
+
+
+
+ + {/* Recovery Events */} +
+

+ Recent Failover Events +

+
+
    + {recoveryEvents.map((event) => ( +
  • +
    +
    +
    + {event.type === 'failover' ? ( +
    + + + +
    + ) : ( +
    + + + +
    + )} +
    +
    +

    + {event.type === 'failover' ? 'Failover triggered' : 'Recovery completed'} for {event.provider} +

    +

    + {event.reason} • {event.affectedRepos} repositories affected + {event.fallbackProvider && ` • Fallback: ${event.fallbackProvider}`} +

    +

    + {event.timestamp} • Duration: {event.duration} +

    +
    +
    +
    + + {event.status.charAt(0).toUpperCase() + event.status.slice(1)} + +
    +
    +
  • + ))} +
+
+
+
+ ); +} \ No newline at end of file diff --git a/app/dashboard/layout.tsx b/app/dashboard/layout.tsx new file mode 100644 index 0000000..82e4f0c --- /dev/null +++ b/app/dashboard/layout.tsx @@ -0,0 +1,19 @@ +import DashboardNav from '@/components/dashboard-nav'; + +export default function DashboardLayout({ + children, +}: { + children: React.ReactNode; +}) { + return ( +
+ + {/* Main content */} +
+
+ {children} +
+
+
+ ); +} \ No newline at end of file diff --git a/app/dashboard/page.tsx b/app/dashboard/page.tsx new file mode 100644 index 0000000..9ea3c9c --- /dev/null +++ b/app/dashboard/page.tsx @@ -0,0 +1,168 @@ +export default function DashboardPage() { + return ( +
+
+

+ Dashboard Overview +

+

+ Monitor and manage your Git-Proof system +

+
+ + {/* Status Cards */} +
+ {/* Active Providers */} +
+
+ Active Providers +
+
+
+ 4 + of 4 +
+
+ 100% +
+
+
+ + {/* Sync Queue */} +
+
+ Sync Queue +
+
+
+ 12 + pending +
+
+ Processing +
+
+
+ + {/* Failed Syncs */} +
+
+ Failed Syncs (24h) +
+
+
+ 0 + errors +
+
+ Healthy +
+
+
+ + {/* Repositories */} +
+
+ Total Repositories +
+
+
+ 156 + repos +
+
+ +12 today +
+
+
+
+ + {/* Recent Activity */} +
+

Recent Activity

+
+
    +
  • +
    +
    +
    +
    + + + +
    +
    +
    +

    + Successfully synced to GitHub +

    +

    + Repository: project-alpha • 2 minutes ago +

    +
    +
    +
    + + Success + +
    +
    +
  • +
  • +
    +
    +
    +
    + + + +
    +
    +
    +

    + Successfully synced to GitLab +

    +

    + Repository: project-beta • 5 minutes ago +

    +
    +
    +
    + + Success + +
    +
    +
  • +
  • +
    +
    +
    +
    + + + +
    +
    +
    +

    + Retry scheduled for Forgejo +

    +

    + Repository: project-gamma • 10 minutes ago +

    +
    +
    +
    + + Pending + +
    +
    +
  • +
+
+
+
+ ); +} \ No newline at end of file diff --git a/app/dashboard/providers/page.tsx b/app/dashboard/providers/page.tsx new file mode 100644 index 0000000..e89c074 --- /dev/null +++ b/app/dashboard/providers/page.tsx @@ -0,0 +1,165 @@ +export default function ProvidersPage() { + const providers = [ + { + name: 'GitHub', + status: 'active', + lastSync: '2 minutes ago', + repositories: 89, + health: 100, + endpoint: 'https://api.github.com', + icon: '🐙' + }, + { + name: 'GitLab', + status: 'active', + lastSync: '5 minutes ago', + repositories: 45, + health: 98, + endpoint: 'https://gitlab.com/api/v4', + icon: '🦊' + }, + { + name: 'Forgejo', + status: 'degraded', + lastSync: '15 minutes ago', + repositories: 12, + health: 75, + endpoint: 'https://forgejo.example.com', + icon: '🔧' + }, + { + name: 'Custom Git Server', + status: 'active', + lastSync: '1 minute ago', + repositories: 10, + health: 100, + endpoint: 'https://git.internal.com', + icon: '🔗' + } + ]; + + return ( +
+
+

+ Provider Status Monitor +

+

+ Monitor the health and status of all connected Git providers +

+
+ + {/* Provider Cards */} +
+ {providers.map((provider) => ( +
+
+
+
+ {provider.icon} +
+

+ {provider.name} +

+

+ {provider.endpoint} +

+
+
+
+ {provider.status.charAt(0).toUpperCase() + provider.status.slice(1)} +
+
+ +
+
+

Repositories

+

+ {provider.repositories} +

+
+
+

Health Score

+

+ {provider.health}% +

+
+
+

Last Sync

+

+ {provider.lastSync} +

+
+
+ + {/* Health Bar */} +
+
+
+
= 90 + ? 'bg-green-500' + : provider.health >= 70 + ? 'bg-yellow-500' + : 'bg-red-500' + }`} + /> +
+
+
+ + {/* Actions */} +
+ + +
+
+
+ ))} +
+ + {/* Provider Metrics */} +
+
+
+ Total Sync Operations (24h) +
+
+ 1,428 +
+
+
+
+ Average Sync Time +
+
+ 2.4s +
+
+
+
+ Success Rate +
+
+ 99.8% +
+
+
+
+ ); +} \ No newline at end of file diff --git a/app/dashboard/sync-queue/page.tsx b/app/dashboard/sync-queue/page.tsx new file mode 100644 index 0000000..3de1571 --- /dev/null +++ b/app/dashboard/sync-queue/page.tsx @@ -0,0 +1,188 @@ +export default function SyncQueuePage() { + const queueItems = [ + { + id: 'job-1', + repository: 'project-alpha', + action: 'push', + branch: 'main', + commit: 'a1b2c3d', + providers: ['GitHub', 'GitLab'], + status: 'processing', + progress: 65, + startedAt: '2 minutes ago' + }, + { + id: 'job-2', + repository: 'project-beta', + action: 'push', + branch: 'feature/new-ui', + commit: 'e4f5g6h', + providers: ['GitHub', 'Forgejo'], + status: 'processing', + progress: 30, + startedAt: '1 minute ago' + }, + { + id: 'job-3', + repository: 'project-gamma', + action: 'push', + branch: 'main', + commit: 'i7j8k9l', + providers: ['GitLab', 'Custom Git Server'], + status: 'queued', + progress: 0, + startedAt: null + }, + { + id: 'job-4', + repository: 'project-delta', + action: 'push', + branch: 'develop', + commit: 'm1n2o3p', + providers: ['GitHub', 'GitLab', 'Forgejo'], + status: 'queued', + progress: 0, + startedAt: null + }, + { + id: 'job-5', + repository: 'project-epsilon', + action: 'push', + branch: 'hotfix/security', + commit: 'q4r5s6t', + providers: ['GitHub'], + status: 'completed', + progress: 100, + startedAt: '5 minutes ago' + } + ]; + + return ( +
+
+
+

+ Synchronization Queue +

+

+ Monitor and manage repository synchronization tasks +

+
+
+ + +
+
+ + {/* Queue Stats */} +
+
+
Processing
+
2
+
+
+
Queued
+
10
+
+
+
Completed
+
156
+
+
+
Failed
+
0
+
+
+ + {/* Queue Table */} +
+
    + {queueItems.map((item) => ( +
  • +
    +
    +
    +
    +
    +

    + {item.repository} + + {item.branch} • {item.commit} + +

    +

    + {item.action} to {item.providers.join(', ')} +

    +
    +
    + + {item.status.charAt(0).toUpperCase() + item.status.slice(1)} + + {item.startedAt && ( + + {item.startedAt} + + )} +
    +
    + {item.status === 'processing' && ( +
    +
    +
    +
    +
    +
    +

    + {item.progress}% complete +

    +
    + )} +
    +
    + {item.status === 'queued' && ( + + )} + {item.status === 'processing' && ( + + )} + {item.status === 'completed' && ( + + )} +
    +
    +
    +
  • + ))} +
+
+ + {/* Load More */} +
+ +
+
+ ); +} \ No newline at end of file diff --git a/app/page.tsx b/app/page.tsx index 933199a..5c68283 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,5 +1,185 @@ export default function Home() { return ( -
+
+ {/* Hero Section */} +
+
+
+

+ Git-Proof: Distributed Git Redundancy +

+

+ A centralized relay system that ensures your code is always available by automatically + distributing Git repositories across multiple providers with intelligent failover + and recovery mechanisms. +

+ +
+
+
+ + {/* Features Section */} +
+
+
+

Key Features

+

+ Everything you need for reliable Git repository management +

+
+
+
+
+
+
+ + + +
+ Multi-Provider Support +
+
+

+ Seamlessly distribute your repositories across GitHub, GitLab, Forgejo, and custom providers + with our flexible adapter system. +

+
+
+
+
+
+ + + +
+ Automatic Failover +
+
+

+ Intelligent monitoring detects provider outages and automatically switches to backup + providers, ensuring continuous availability. +

+
+
+
+
+
+ + + +
+ Conflict Resolution +
+
+

+ Advanced synchronization engine handles merge conflicts and ensures consistent + state across all providers. +

+
+
+
+
+
+
+ + {/* Architecture Section */} +
+
+
+

How It Works

+

+ A robust architecture designed for reliability and scalability +

+
+
+
+
+
+
+
+ 1 +
+
+

Developer Push

+

+ Developers push to the Git-Proof relay just like any other remote repository. +

+
+
+
+
+ 2 +
+
+

Distribution Engine

+

+ The distribution engine receives changes and queues them for synchronization + across configured providers. +

+
+
+
+
+ 3 +
+
+

Provider Sync

+

+ Provider adapters push changes to GitHub, GitLab, and other configured + Git providers in parallel. +

+
+
+
+
+ 4 +
+
+

Monitoring & Recovery

+

+ Continuous monitoring ensures provider health. Failed syncs are retried, + and recovery procedures restore consistency. +

+
+
+
+
+
+
+
+
+ + {/* CTA Section */} +
+
+
+

+ Ready to make your Git repositories bulletproof? +

+

+ Start using Git-Proof today and never worry about repository availability again. +

+ +
+
+
+
); } diff --git a/components/dashboard-nav.tsx b/components/dashboard-nav.tsx new file mode 100644 index 0000000..10ed4f7 --- /dev/null +++ b/components/dashboard-nav.tsx @@ -0,0 +1,75 @@ +'use client'; + +import Link from 'next/link'; +import { usePathname } from 'next/navigation'; + +export default function DashboardNav() { + const pathname = usePathname(); + + const isActive = (path: string) => { + return pathname === path; + }; + + return ( + + ); +} \ No newline at end of file