--- import Shell from '../layouts/shell.astro'; import type { Project } from '../types/projects'; import projects from '../data/projects'; export const prerender = true; // Sort projects by year (descending). Items without year go last. const sortedProjects: Project[] = [...projects].sort((a, b) => (b.year ?? 0) - (a.year ?? 0)); // Devicon alias mapping to improve CDN resolution const deviconAliases: Record = { js: 'javascript', ts: 'typescript', node: 'nodejs', 'cloudflare workers': 'cloudflareworkers', 'cloudflare-workers': 'cloudflareworkers', githubactions: 'githubactions', hono: 'hono', // no devicon; handled by fallbacks turso: 'turso', // no devicon; handled by fallbacks libsql: 'libsql', // no devicon; handled by fallbacks }; function iconKey(raw: string) { const k = String(raw).toLowerCase(); return deviconAliases[k] ?? k; } function simpleSlug(raw: string) { return String(raw).toLowerCase().replace(/[^a-z0-9]/g, ''); } function statusClass(status?: string) { const base = 'px-2 py-0.5 text-xs border rounded-full'; if (!status) return `${base} border-muted text-[var(--color-white)]/70`; const s = status.toLowerCase(); if (s === 'completed') return `${base} border-[color:#16a34a]/40 text-[color:#22c55e]`; // green if (s === 'in-progress') return `${base} border-[color:#f59e0b]/40 text-[color:#fbbf24]`; // amber if (s === 'in-services') return `${base} border-[color:#06b6d4]/40 text-[color:#22d3ee]`; // cyan if (s === 'archived') return `${base} border-[color:#6b7280]/40 text-[color:#9ca3af]`; // gray return `${base} border-muted text-[var(--color-white)]/70`; } function formatCategory(cat?: string) { if (!cat) return ''; return cat.slice(0,1).toUpperCase() + cat.slice(1); } ---

Explore my open‑source work. Contributions and feedback are welcome!

{(() => { const categories = Array.from(new Set(sortedProjects.map(p => p.category).filter(Boolean))); const techstack = Array.from(new Set(sortedProjects.flatMap(p => [ ...(p.tech?.languages ?? []), ...(p.tech?.frameworks ?? []), ...(p.tech?.tools ?? []), ...(p.tech?.platforms ?? []), ...(p.tech?.databases ?? []), ]).map(String))); return (
Category: {categories.map(cat => ( ))}
); })()}
{sortedProjects.map((p: Project) => (
{(() => { const href = p.homepage ?? p.github; return href ? ( {p.name} ) : (

{p.name}

); })()} {p.featured && ( ★ )} {p.status && ({p.status})} {p.category && ( {formatCategory(p.category)} )}
{p.year && ({p.year})}
{p.tags && p.tags.length ? (
{p.tags.map((t) => ( {t} ))}
) : null} {(() => { const stack = [ ...(p.tech?.languages ?? []), ...(p.tech?.frameworks ?? []), ...(p.tech?.tools ?? []), ...(p.tech?.platforms ?? []), ...(p.tech?.databases ?? []), ]; return stack.length ? (
{stack.map((lang) => { const key = iconKey(lang); const orig = `https://cdn.jsdelivr.net/gh/devicons/devicon/icons/${key}/${key}-original.svg`; const plain = `https://cdn.jsdelivr.net/gh/devicons/devicon/icons/${key}/${key}-plain.svg`; const simp = `https://cdn.simpleicons.org/${simpleSlug(key)}`; const local = `/icons/${simpleSlug(key)}.svg`; const fallbacks = [plain, simp, local].join('|'); return ( {`${lang} ); })}
) : null; })()}

{p.description}

{p.highlights && p.highlights.length ? (
    {p.highlights.map((h) => (
  • {h}
  • ))}
) : null}
{p.homepage && ( Live )} {p.github && ( Repo )}
))}