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>
6.6 KiB
6.6 KiB
🎨 Component Usage Guide
📦 Available Components
1. Input Component
Location: components/ui/input.tsx
Basic Usage
import { Input } from '@/components/ui/input'
<Input
label="Email"
type="email"
placeholder="you@example.com"
/>
With Icon
<Input
label="Email"
type="email"
icon={
<svg className="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" />
</svg>
}
/>
With Error
<Input
label="Email"
type="email"
error="Invalid email address"
/>
Features
- ✅ Floating label animation
- ✅ Icon support (left side)
- ✅ Error state with message
- ✅ Focus ring animation
- ✅ Accessible (ARIA labels)
2. Button Component
Location: components/ui/button.tsx
Variants
Primary (Green Gradient)
<Button variant="primary">
Sign in
</Button>
Secondary (Outlined)
<Button variant="secondary">
Cancel
</Button>
Ghost (Transparent)
<Button variant="ghost">
Learn more
</Button>
GitHub (Black)
<Button variant="github">
Continue with GitHub
</Button>
Sizes
<Button size="sm">Small</Button>
<Button size="md">Medium</Button>
<Button size="lg">Large</Button>
With Loading
<Button loading={isLoading}>
{isLoading ? 'Signing in...' : 'Sign in'}
</Button>
With Icon
<Button
icon={
<svg className="w-5 h-5" fill="currentColor" viewBox="0 0 24 24">
<path d="M12 0.5C5.37 0.5..." />
</svg>
}
>
GitHub
</Button>
Features
- ✅ 4 variants (primary, secondary, ghost, github)
- ✅ 3 sizes (sm, md, lg)
- ✅ Loading state with spinner
- ✅ Icon support
- ✅ Hover/tap animations
- ✅ Disabled state
3. Password Strength Meter
Location: components/ui/password-strength.tsx
Usage
import { PasswordStrength } from '@/components/ui/password-strength'
const [password, setPassword] = useState('')
<Input
type="password"
value={password}
onChange={(e) => setPassword(e.target.value)}
/>
<PasswordStrength password={password} />
Strength Levels
- Weak (Red): 0-2 points
- Fair (Yellow): 3 points
- Good (Blue): 4 points
- Strong (Green): 5 points
Scoring
- Length ≥ 8: +1
- Length ≥ 12: +1
- Mixed case: +1
- Numbers: +1
- Special chars: +1
Features
- ✅ Real-time calculation
- ✅ Animated progress bars
- ✅ Color-coded feedback
- ✅ Visual strength label
4. Animated Stats
Location: app/(auth)/components/AnimatedStats.tsx
Usage
import { AnimatedStats } from './components/AnimatedStats'
<AnimatedStats />
Display
10K+ Developers
50K+ Projects
1M+ Stars
Features
- ✅ Counting animation (0 to target)
- ✅ Number formatting (K, M)
- ✅ Staggered entrance
- ✅ 2-second duration
5. Project Showcase
Location: app/(auth)/components/ProjectShowcase.tsx
Usage
import { ProjectShowcase } from './components/ProjectShowcase'
<ProjectShowcase />
Projects
- awesome-app (TypeScript, 1337⭐)
- cool-project (JavaScript, 892⭐)
- next-gen-ui (React, 2456⭐)
- api-gateway (Go, 567⭐)
Features
- ✅ Auto-rotation (3s interval)
- ✅ Language color indicators
- ✅ Star counts
- ✅ Progress dots
- ✅ Smooth transitions
🎨 Styling Patterns
Glassmorphism Card
<div className="bg-surface/50 backdrop-blur-xl border border-border/50 rounded-2xl p-8 shadow-2xl">
{/* Content */}
</div>
Gradient Button
<button className="bg-gradient-to-r from-accent to-accent-hover text-white rounded-xl px-6 py-3 font-semibold hover:shadow-lg hover:shadow-accent/20">
Click me
</button>
Gradient Text
<h1 className="bg-gradient-to-r from-primary via-accent to-primary bg-clip-text text-transparent">
Gradient Text
</h1>
Focus Ring
<input className="focus:outline-none focus:border-primary focus:ring-2 focus:ring-primary/20" />
🎭 Animation Patterns
Page Entrance
<motion.div
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.5 }}
>
{/* Content */}
</motion.div>
Button Hover
<motion.button
whileHover={{ scale: 1.02 }}
whileTap={{ scale: 0.98 }}
>
Click me
</motion.button>
Floating Animation
<motion.div
animate={{ y: [0, -10, 0] }}
transition={{ duration: 3, repeat: Infinity }}
>
{/* Content */}
</motion.div>
Staggered List
{items.map((item, i) => (
<motion.div
key={i}
initial={{ opacity: 0, x: -20 }}
animate={{ opacity: 1, x: 0 }}
transition={{ delay: i * 0.1 }}
>
{item}
</motion.div>
))}
🎯 Common Patterns
Form Field
<div className="space-y-2">
<label className="text-sm font-medium text-foreground">
Email
</label>
<Input type="email" />
</div>
Error Message
<motion.div
initial={{ opacity: 0, x: -10 }}
animate={{ opacity: 1, x: 0 }}
className="bg-error/10 border border-error/30 text-error px-4 py-3 rounded-xl text-sm"
>
Error message
</motion.div>
Loading Spinner
<svg className="animate-spin h-5 w-5" fill="none" viewBox="0 0 24 24">
<circle className="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" strokeWidth="4" />
<path className="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" />
</svg>
📱 Responsive Utilities
Hide on Mobile
<div className="hidden lg:flex">
Desktop only
</div>
Show on Mobile
<div className="lg:hidden">
Mobile only
</div>
Responsive Grid
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
{/* Items */}
</div>
🎨 Color Utilities
// Backgrounds
bg-background // #0A0C10
bg-surface // #161b22
bg-primary // #58a6ff
bg-accent // #238636
// Text
text-foreground // #c9d1d9
text-foreground-secondary // #8b949e
text-primary // #58a6ff
text-accent // #238636
// Borders
border-border // #30363d
border-primary // #58a6ff
🔧 Utility Functions
cn() - Class Name Merger
import { cn } from '@/lib/utils'
<div className={cn(
'base-classes',
condition && 'conditional-classes',
className
)} />
Happy Coding! 🚀