AndesOps-AI / frontend /components /SystemInfo.tsx
Álvaro Valenzuela Valdes
deploy: clean build for hf v6
d0501ec
"use client";
import { useState } from "react";
import { syncDatabase } from "../lib/api";
import { translations, Language } from "../lib/translations";
type Props = {
lang: Language;
};
export default function SystemInfo({ lang }: Props) {
const t = translations[lang];
const [isSyncing, setIsSyncing] = useState(false);
const [syncStatus, setSyncStatus] = useState<string | null>(null);
const [debugInfo, setDebugInfo] = useState<string>("");
const testConnection = async () => {
try {
const res1 = await fetch("/api/health");
const healthData = await res1.json();
const res2 = await fetch("/api/health/db-status");
const dbData = await res2.json();
setDebugInfo(`Health: ${JSON.stringify(healthData)} | DB: ${JSON.stringify(dbData)}`);
} catch (e: any) {
setDebugInfo(`Connection Failed: ${e.message}`);
}
};
const handleSync = async () => {
setIsSyncing(true);
setSyncStatus("Syncing...");
try {
await syncDatabase();
setSyncStatus("Success! Refreshing...");
setTimeout(() => window.location.reload(), 1500);
} catch (e) {
setSyncStatus("Failed to sync.");
console.error(e);
} finally {
setIsSyncing(false);
}
};
const techStack = [
{ name: "AMD Instinct™", role: "Hardware Acceleration", desc: t.techAMD },
{ name: "Llama-3.2-Vision", role: "OCR & Analysis", desc: t.techLlama },
{ name: "FastAPI / Python", role: "Backend Engine", desc: t.techFastAPI },
{ name: "Next.js 14 / TS", role: "Frontend Framework", desc: t.techNextJS },
{ name: "SQLite", role: "Persistence", desc: "Reliable local database for lightning-fast search." },
{ name: "Tailwind CSS", role: "Design System", desc: "Premium styling with custom glassmorphism effects." },
{ name: "Groq LPU™", role: "Inference Engine", desc: t.techGroq },
];
const agentTeam = [
{ name: t.agentLegal, model: "Gemini 2.5 Flash", desc: t.agentLegalDesc },
{ name: t.agentTech, model: "Llama-3.2-Vision (AMD)", desc: t.agentTechDesc },
{ name: t.agentStrategy, model: "Qwen-2.5-Coder", desc: t.agentStrategyDesc },
];
return (
<div className="space-y-12 animate-in fade-in slide-in-from-bottom-4 duration-700 pb-24 text-left">
{/* Brand & Personal Bio Section */}
<div className="glass-card rounded-3xl p-8 md:p-12 border border-white/10 relative overflow-hidden bg-white/[0.02]">
<div className="absolute -right-20 -top-20 h-64 w-64 rounded-full bg-purple-500/10 blur-[100px]" />
<div className="grid md:grid-cols-2 gap-12 items-center relative z-10">
<div className="space-y-6">
<div className="flex items-center gap-4">
<div className="w-16 h-16 premium-gradient rounded-2xl flex items-center justify-center text-white font-black text-2xl shadow-xl shadow-purple-500/40">
RV
</div>
<div>
<h2 className="text-3xl font-black text-white tracking-tighter">Álvaro Valenzuela Valdés</h2>
<p className="text-purple-400 text-xs font-bold uppercase tracking-widest">IT Engineer | CEO @ REW.cl</p>
</div>
</div>
<div className="space-y-4 text-slate-300 leading-relaxed text-lg">
<p>{t.aboutBio}</p>
</div>
<div className="flex flex-wrap gap-4 pt-4">
<a href="https://www.rew.cl" target="_blank" rel="noopener noreferrer" className="flex items-center gap-2 px-6 py-3 rounded-xl bg-cyan text-slate-950 font-bold hover:bg-white hover:scale-105 transition-all">
<span>Visit www.rew.cl</span>
<span className="text-xl">🔗</span>
</a>
<a href="https://github.com/REWCHILE" target="_blank" rel="noopener noreferrer" className="flex items-center gap-2 px-5 py-3 rounded-xl bg-white/5 border border-white/10 text-white font-bold hover:bg-white/10 hover:scale-105 transition-all">
<span>GitHub</span>
<span className="text-xl">🐙</span>
</a>
</div>
<div className="pt-4 flex items-center gap-3 text-slate-500">
<span className="text-xl">📍</span>
<span className="text-xs font-bold uppercase tracking-widest">Chile | Global Operations</span>
</div>
</div>
<div className="flex flex-col items-center justify-center">
<div className="relative group">
<div className="absolute -inset-2 bg-gradient-to-r from-purple-600 to-cyan-600 rounded-full blur opacity-25 group-hover:opacity-100 transition duration-1000"></div>
<div className="relative w-72 h-72 rounded-full overflow-hidden border-2 border-white/20 bg-slate-900 flex items-center justify-center shadow-2xl">
<img
src="https://raw.githubusercontent.com/REWCHILE/AndesOps-AI/main/frontend/public/superhero_avatar.png"
alt="Álvaro Tech Superhero"
className="w-full h-full object-cover transition-transform duration-700 group-hover:scale-110"
onError={(e) => {
console.log("Avatar load failed, using dynamic placeholder...");
(e.target as HTMLImageElement).src = `https://ui-avatars.com/api/?name=Alvaro+Valenzuela&background=0f172a&color=fff&size=512`;
}}
/>
</div>
</div>
<p className="mt-8 text-[10px] font-black uppercase tracking-[0.4em] text-slate-500 text-center">Project Founder & Lead Architect</p>
</div>
</div>
</div>
{/* Agents Section */}
<div className="space-y-6">
<h3 className="text-[10px] font-black uppercase tracking-[0.5em] text-slate-600 text-center">Elite Multi-Agent Consensus (AMD Powered)</h3>
<div className="grid gap-6 md:grid-cols-3">
{agentTeam.map((agent) => (
<div key={agent.name} className="glass-card rounded-3xl p-8 border border-purple-500/10 bg-purple-500/[0.02] relative overflow-hidden group hover:border-purple-500/40 transition-all text-left">
<div className="absolute top-0 right-0 w-24 h-24 bg-purple-500/5 blur-3xl" />
<div className="text-[9px] font-black uppercase tracking-widest text-purple-400 mb-2">{agent.model}</div>
<h3 className="text-xl font-bold text-white mb-2">{agent.name}</h3>
<p className="text-sm text-slate-400 leading-relaxed">{agent.desc}</p>
</div>
))}
</div>
</div>
{/* Tech Grid */}
<div className="grid gap-6 md:grid-cols-2 lg:grid-cols-4">
{techStack.map((tech) => (
<div key={tech.name} className="glass-card rounded-3xl p-6 border border-white/5 hover:border-cyan-500/30 transition-all duration-300 text-left">
<div className="text-[10px] font-black uppercase tracking-widest text-cyan-400 mb-2">{tech.role}</div>
<h3 className="text-lg font-bold text-white mb-1">{tech.name}</h3>
<p className="text-xs text-slate-500 leading-relaxed">{tech.desc}</p>
</div>
))}
</div>
{/* Legal & Status */}
<div className="glass-card rounded-3xl p-8 border border-white/5 bg-white/[0.01]">
<div className="flex flex-col md:flex-row items-center justify-between gap-8">
<div className="flex items-center gap-4">
<div className="h-3 w-3 rounded-full bg-green-500 animate-pulse shadow-[0_0_10px_rgba(34,197,94,0.5)]" />
<div>
<p className="text-sm font-bold text-white tracking-tight">System Status: Operational</p>
<p className="text-[10px] text-slate-500 font-mono uppercase tracking-widest">v1.2.6 | AMD_INSTINCT_ACCELERATED</p>
</div>
</div>
<div className="text-center md:text-right">
<p className="text-[10px] font-bold uppercase tracking-widest text-slate-600 mb-1">Licensing & Intellectual Property</p>
<p className="text-xs font-bold text-slate-500 tracking-tighter">
Released under <span className="text-white">MIT License</span> for Hackathon 2026.
<br />
© {new Date().getFullYear()} REW Agency Chile. All Rights Reserved.
</p>
</div>
</div>
</div>
</div>
);
}