Convert gitgram/ and aitimemachine/ from embedded git repos (which showed as opaque submodule gitlinks on GitHub) into fully-tracked first-party content. AITM now merges its 7 vendored repos as first-party engines: - memory: beads (Go task DAG) + context7 (docs SDK), unified into saved_contexts - git: vendored C git (bundled binary) + gitnexus (in-process code intelligence) - agentic: a2a (@a2a-js/sdk) + pal (AITM-managed Python subprocess) Includes the full session's product build: Gitgram web/mobile/backend features, AITM website/CLI/MCP, the unified memory layer, engine build tooling (scripts/build-engines.sh, Dockerfile, CI), docs (README, ENGINES.md, ARCHITECTURE.md), and extensive test suites. Build artifacts, node_modules, external/, and gemini-cli are gitignored. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
313 lines
15 KiB
TypeScript
313 lines
15 KiB
TypeScript
'use client'
|
|
|
|
import { useEffect, useState } from 'react'
|
|
import { useRouter } from 'next/navigation'
|
|
import Link from 'next/link'
|
|
import { useAuthStore } from '@/store/authStore'
|
|
|
|
export default function HomePage() {
|
|
const router = useRouter()
|
|
const { isAuthenticated, initialize } = useAuthStore()
|
|
const [mounted, setMounted] = useState(false)
|
|
|
|
useEffect(() => {
|
|
initialize()
|
|
setMounted(true)
|
|
}, [initialize])
|
|
|
|
useEffect(() => {
|
|
if (mounted && isAuthenticated) {
|
|
router.push('/feed')
|
|
}
|
|
}, [mounted, isAuthenticated, router])
|
|
|
|
const handleGitHubLogin = () => {
|
|
const clientId = process.env.NEXT_PUBLIC_GITHUB_CLIENT_ID
|
|
const redirectUri = `${window.location.origin}/auth/github/callback`
|
|
|
|
if (!clientId) {
|
|
alert('GitHub OAuth is not configured')
|
|
return
|
|
}
|
|
|
|
window.location.href = `https://github.com/login/oauth/authorize?client_id=${clientId}&redirect_uri=${encodeURIComponent(redirectUri)}&scope=user:email,repo`
|
|
}
|
|
|
|
if (!mounted || isAuthenticated) {
|
|
return null
|
|
}
|
|
|
|
return (
|
|
<div className="min-h-screen w-full bg-background text-foreground">
|
|
<div className="w-full max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
|
{/* Header */}
|
|
<header className="flex items-center justify-between py-6">
|
|
<div className="flex items-center gap-3">
|
|
<div className="size-10 rounded-xl bg-surface border border-border flex items-center justify-center">
|
|
<span className="text-2xl">💻</span>
|
|
</div>
|
|
<h2 className="text-xl font-bold">Gitgram</h2>
|
|
</div>
|
|
<Link
|
|
href="/login"
|
|
className="px-6 py-2 rounded-full bg-surface border border-border hover:border-foreground-secondary/50 text-sm font-semibold"
|
|
>
|
|
Log In
|
|
</Link>
|
|
</header>
|
|
|
|
{/* Hero */}
|
|
<main className="py-20 text-center">
|
|
<div className="mb-8">
|
|
<span className="px-3 py-1 rounded-full bg-surface border border-border text-xs">
|
|
v1.0 is now live
|
|
</span>
|
|
</div>
|
|
|
|
<h1 className="text-6xl font-black mb-6">
|
|
Where Your Code<br />Tells a Story
|
|
</h1>
|
|
|
|
<p className="text-xl text-foreground-secondary max-w-2xl mx-auto mb-10">
|
|
Share progress, discover inspiring projects, and connect with developers around the world.
|
|
</p>
|
|
|
|
<div className="flex items-center justify-center gap-4">
|
|
<button
|
|
onClick={handleGitHubLogin}
|
|
className="px-8 py-4 rounded-full bg-foreground text-background font-bold hover:bg-foreground/90"
|
|
>
|
|
Connect with GitHub
|
|
</button>
|
|
<Link
|
|
href="#features"
|
|
className="px-8 py-4 rounded-full bg-surface border border-border font-bold hover:bg-surface-secondary"
|
|
>
|
|
Learn More
|
|
</Link>
|
|
</div>
|
|
</main>
|
|
|
|
{/* Features */}
|
|
<section id="features" className="py-16 border-t border-border/50">
|
|
<h2 className="text-3xl font-bold text-center mb-12">Built for Developers</h2>
|
|
<div className="grid md:grid-cols-3 gap-8">
|
|
<div className="p-6 rounded-xl bg-surface border border-border">
|
|
<div className="text-4xl mb-4">📤</div>
|
|
<h3 className="text-xl font-bold mb-3">Share</h3>
|
|
<p className="text-foreground-secondary">
|
|
Instantly create visual posts from your commits and pull requests.
|
|
</p>
|
|
</div>
|
|
<div className="p-6 rounded-xl bg-surface border border-border">
|
|
<div className="text-4xl mb-4">🔍</div>
|
|
<h3 className="text-xl font-bold mb-3">Discover</h3>
|
|
<p className="text-foreground-secondary">
|
|
Explore a feed of trending projects and innovative code.
|
|
</p>
|
|
</div>
|
|
<div className="p-6 rounded-xl bg-surface border border-border">
|
|
<div className="text-4xl mb-4">👥</div>
|
|
<h3 className="text-xl font-bold mb-3">Connect</h3>
|
|
<p className="text-foreground-secondary">
|
|
Follow developers, join discussions, and build your network.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
{/* Footer */}
|
|
<footer className="border-t border-border py-12 mt-12">
|
|
<div className="flex justify-between items-center">
|
|
<span className="text-sm text-foreground-secondary">Gitgram © 2024</span>
|
|
<div className="flex gap-8">
|
|
<Link href="/privacy" className="text-sm text-foreground-secondary hover:text-foreground">
|
|
Privacy
|
|
</Link>
|
|
<Link href="/terms" className="text-sm text-foreground-secondary hover:text-foreground">
|
|
Terms
|
|
</Link>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|
|
{/* TopNavBar */}
|
|
<header className="w-full flex items-center justify-between py-6 mb-12 sm:mb-20">
|
|
<div className="flex items-center gap-3">
|
|
<div className="flex items-center justify-center size-10 rounded-xl bg-surface border border-border text-foreground shadow-sm">
|
|
<span className="material-symbols-outlined text-2xl">data_object</span>
|
|
</div>
|
|
<h2 className="text-xl font-bold tracking-tight">Gitgram</h2>
|
|
</div>
|
|
<nav className="hidden md:flex items-center gap-8">
|
|
<Link
|
|
href="#features"
|
|
className="text-sm font-medium text-foreground-secondary hover:text-foreground transition-colors"
|
|
>
|
|
Features
|
|
</Link>
|
|
<Link
|
|
href="#about"
|
|
className="text-sm font-medium text-foreground-secondary hover:text-foreground transition-colors"
|
|
>
|
|
About
|
|
</Link>
|
|
</nav>
|
|
<Link
|
|
href="/login"
|
|
className="flex items-center justify-center h-10 px-6 rounded-full bg-surface border border-border hover:border-foreground-secondary/50 text-sm font-semibold transition-all hover:shadow-md"
|
|
>
|
|
Log In
|
|
</Link>
|
|
</header>
|
|
|
|
<main className="flex flex-col items-center">
|
|
{/* HeroSection */}
|
|
<section className="w-full py-12 sm:py-20 text-center flex flex-col items-center">
|
|
<div className="inline-flex items-center gap-2 px-3 py-1 rounded-full bg-surface border border-border mb-8 animate-fade-in-up">
|
|
<span className="relative flex h-2 w-2">
|
|
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-success opacity-75"></span>
|
|
<span className="relative inline-flex rounded-full h-2 w-2 bg-success"></span>
|
|
</span>
|
|
<span className="text-xs font-medium text-foreground-secondary">v1.0 is now live</span>
|
|
</div>
|
|
|
|
<h1 className="text-5xl sm:text-6xl md:text-7xl font-black leading-[1.1] tracking-tighter text-foreground max-w-4xl mb-6 bg-clip-text text-transparent bg-gradient-to-b from-foreground to-foreground-secondary">
|
|
Where Your Code <br className="hidden sm:block" /> Tells a Story
|
|
</h1>
|
|
|
|
<p className="text-lg sm:text-xl text-foreground-secondary max-w-2xl mb-10 leading-relaxed">
|
|
Share progress, discover inspiring projects, and connect with developers around the world in a community built for code.
|
|
</p>
|
|
|
|
<div className="flex flex-col sm:flex-row items-center gap-4 w-full sm:w-auto">
|
|
<button
|
|
onClick={handleGitHubLogin}
|
|
className="w-full sm:w-auto flex items-center justify-center gap-3 h-14 px-8 rounded-full bg-foreground text-background text-base font-bold hover:bg-foreground/90 transition-all hover:scale-105 active:scale-95 shadow-lg shadow-foreground/10"
|
|
>
|
|
<svg
|
|
className="w-5 h-5"
|
|
fill="currentColor"
|
|
viewBox="0 0 16 16"
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
>
|
|
<path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8"></path>
|
|
</svg>
|
|
Connect with GitHub
|
|
</button>
|
|
<Link
|
|
href="#features"
|
|
className="w-full sm:w-auto flex items-center justify-center h-14 px-8 rounded-full bg-surface border border-border text-foreground font-bold hover:bg-surface-secondary transition-all hover:border-foreground-secondary/50"
|
|
>
|
|
Learn More
|
|
</Link>
|
|
</div>
|
|
</section>
|
|
|
|
{/* Visual Element */}
|
|
<div className="relative w-full max-w-5xl aspect-video my-16 sm:my-24 group">
|
|
<div className="absolute -inset-1 bg-gradient-to-r from-primary to-accent rounded-2xl blur opacity-20 group-hover:opacity-40 transition duration-1000 group-hover:duration-200"></div>
|
|
<div className="relative w-full h-full rounded-xl overflow-hidden border border-border bg-surface shadow-2xl">
|
|
<div className="absolute inset-0 bg-surface/50 backdrop-blur-sm z-10 flex items-center justify-center">
|
|
<span className="text-foreground-secondary text-sm font-mono">Interactive Preview Loading...</span>
|
|
</div>
|
|
{/* Placeholder for actual app screenshot or demo */}
|
|
<img
|
|
className="w-full h-full object-cover opacity-50"
|
|
alt="App Interface"
|
|
src="https://lh3.googleusercontent.com/aida-public/AB6AXuC7-GnHgrYPLalP1nUhe-G6h7K2JfSWbpfoJqm5dFBRETWI_bxMdt8QJt8U46vXucWw9sr_Zv5S6zfXMnzwoKtVl4yStjwvUQChPWaD0HOybu3qxiejwTsHrpFJF0Mgsm9QWwY5YoL6SgT4WLmtmtaZjlBc4qydqInl-taojj-Fovml6nZn65s8g8V3FVBD0ISixrbYnWeyUjCuFtzapuLnKXXbYDYHYNE648cgqUyub_8g_LcsJnamQjGep0m8pULLtgSwd7Kl_HM"
|
|
/>
|
|
</div>
|
|
</div>
|
|
|
|
{/* FeatureSection */}
|
|
<section id="features" className="w-full py-16 sm:py-24 border-t border-border/50">
|
|
<div className="flex flex-col gap-16">
|
|
<div className="text-center max-w-3xl mx-auto">
|
|
<h2 className="text-3xl sm:text-4xl font-bold tracking-tight text-foreground mb-4">
|
|
Built for Developers
|
|
</h2>
|
|
<p className="text-lg text-foreground-secondary">
|
|
Everything you need to showcase your work and connect with the community, designed with a developer-first mindset.
|
|
</p>
|
|
</div>
|
|
|
|
<div className="grid grid-cols-1 md:grid-cols-3 gap-8">
|
|
{[
|
|
{
|
|
icon: 'share',
|
|
title: 'Share',
|
|
desc: 'Instantly create visual posts from your commits and pull requests.',
|
|
color: 'text-primary'
|
|
},
|
|
{
|
|
icon: 'explore',
|
|
title: 'Discover',
|
|
desc: 'Explore a feed of trending projects and innovative code.',
|
|
color: 'text-accent'
|
|
},
|
|
{
|
|
icon: 'group',
|
|
title: 'Connect',
|
|
desc: 'Follow developers, join discussions, and build your network.',
|
|
color: 'text-info'
|
|
}
|
|
].map((feature, idx) => (
|
|
<div key={idx} className="group p-8 rounded-2xl bg-surface border border-border hover:border-foreground-secondary/30 transition-all hover:shadow-xl hover:-translate-y-1">
|
|
<div className={`flex items-center justify-center size-14 rounded-xl bg-surface-secondary mb-6 ${feature.color}`}>
|
|
<span className="material-symbols-outlined text-3xl">{feature.icon}</span>
|
|
</div>
|
|
<h3 className="text-xl font-bold text-foreground mb-3">{feature.title}</h3>
|
|
<p className="text-foreground-secondary leading-relaxed">
|
|
{feature.desc}
|
|
</p>
|
|
</div>
|
|
))}
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</main>
|
|
|
|
{/* Footer */}
|
|
<footer className="border-t border-border py-12 mt-12">
|
|
<div className="flex flex-col md:flex-row justify-between items-center gap-8">
|
|
<div className="flex items-center gap-2">
|
|
<span className="material-symbols-outlined text-foreground-secondary">data_object</span>
|
|
<span className="text-sm font-semibold text-foreground-secondary">Gitgram © 2024</span>
|
|
</div>
|
|
|
|
<div className="flex gap-8">
|
|
<Link href="/privacy" className="text-sm text-foreground-secondary hover:text-foreground transition-colors">
|
|
Privacy
|
|
</Link>
|
|
<Link href="/terms" className="text-sm text-foreground-secondary hover:text-foreground transition-colors">
|
|
Terms
|
|
</Link>
|
|
<Link href="/contact" className="text-sm text-foreground-secondary hover:text-foreground transition-colors">
|
|
Contact
|
|
</Link>
|
|
</div>
|
|
|
|
<div className="flex gap-4">
|
|
<a
|
|
href="https://github.com"
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
className="text-foreground-secondary hover:text-foreground transition-colors"
|
|
>
|
|
<svg className="w-5 h-5" fill="currentColor" viewBox="0 0 24 24">
|
|
<path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z" />
|
|
</svg>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|