import { useState } from 'react' import { Download, FileText, Archive, FileCode, ChevronRight, Check, Loader, AlertCircle, BookOpen, Zap, Box } from 'lucide-react' const downloads = [ { id: 1, name: 'Developer Handbook', description: 'Complete guide to using daKItech tools, best practices, and advanced configuration.', filename: 'dakitech-handbook.pdf', size: '4.2 MB', type: 'PDF', icon: BookOpen, color: 'text-rose-400', bgColor: 'bg-rose-500/10', borderColor: 'border-rose-500/20', version: 'v2.4', lastUpdated: 'Sept 2024', badge: 'Recommended' }, { id: 2, name: 'CLI Binary (Linux)', description: 'Standalone x86_64 Linux binary for the daKItech CLI toolkit. Zero dependencies.', filename: 'dakitech-cli-linux-amd64.tar.gz', size: '12.8 MB', type: 'TAR.GZ', icon: Archive, color: 'text-yellow-400', bgColor: 'bg-yellow-500/10', borderColor: 'border-yellow-500/20', version: 'v2.4.1', lastUpdated: '2 days ago', badge: null }, { id: 3, name: 'CLI Binary (macOS)', description: 'Universal macOS binary for Intel and Apple Silicon chips. Notarized and signed.', filename: 'dakitech-cli-macos-universal.tar.gz', size: '15.3 MB', type: 'TAR.GZ', icon: Archive, color: 'text-yellow-400', bgColor: 'bg-yellow-500/10', borderColor: 'border-yellow-500/20', version: 'v2.4.1', lastUpdated: '2 days ago', badge: null }, { id: 4, name: 'Source Code', description: 'Full source code archive of the latest stable release. Includes all packages and tooling.', filename: 'dakitech-dev-v2.4.1.zip', size: '8.6 MB', type: 'ZIP', icon: FileCode, color: 'text-blue-400', bgColor: 'bg-blue-500/10', borderColor: 'border-blue-500/20', version: 'v2.4.1', lastUpdated: '2 days ago', badge: null }, { id: 5, name: 'Docker Image', description: 'Pre-built Docker image with all dependencies configured. Ready to run out of the box.', filename: 'dakitech-dev:latest', size: '142 MB', type: 'Docker', icon: Box, color: 'text-sky-400', bgColor: 'bg-sky-500/10', borderColor: 'border-sky-500/20', version: 'latest', lastUpdated: '1 day ago', badge: 'New' }, { id: 6, name: 'VS Code Extension', description: 'Official extension for Visual Studio Code with syntax highlighting and IntelliSense.', filename: 'dakitech-vscode.vsix', size: '1.8 MB', type: 'VSIX', icon: Zap, color: 'text-emerald-400', bgColor: 'bg-emerald-500/10', borderColor: 'border-emerald-500/20', version: 'v1.2.0', lastUpdated: '1 week ago', badge: null } ] export default function DownloadSection() { const [downloading, setDownloading] = useState(null) const [completed, setCompleted] = useState({}) const [error, setError] = useState(null) const handleDownload = async (file) => { setDownloading(file.id) setError(null) try { const response = await fetch(`/api/download?file=${encodeURIComponent(file.filename)}`) if (!response.ok) { throw new Error(`Download failed: ${response.statusText}`) } const blob = await response.blob() const url = window.URL.createObjectURL(blob) const a = document.createElement('a') a.href = url a.download = file.filename document.body.appendChild(a) a.click() window.URL.revokeObjectURL(url) document.body.removeChild(a) setCompleted((prev) => ({ ...prev, [file.id]: true })) setTimeout(() => { setCompleted((prev) => { const next = { ...prev } delete next[file.id] return next }) }, 3000) } catch (err) { setError(`Failed to download ${file.name}. Please try again.`) } finally { setDownloading(null) } } return (
Downloads

Get Started

Download the latest releases, documentation, and tooling to power your development workflow.

{error && (
{error}
)}
{downloads.map((item) => { const IconComponent = item.icon const isDownloading = downloading === item.id const isCompleted = completed[item.id] return (
{item.badge && ( {item.badge} )}

{item.name}

{item.type} {item.size}

{item.description}

v{item.version} {item.lastUpdated}
) })}

Installation Guide

Follow our step-by-step installation guide to get daKItech running on your local machine in under 5 minutes.

Read Guide
) }