diff --git a/apps/web/src/app/globals.css b/apps/web/src/app/globals.css index 25bb7cd..295bcee 100644 --- a/apps/web/src/app/globals.css +++ b/apps/web/src/app/globals.css @@ -207,6 +207,29 @@ body { .stagger-4 { animation-delay: 0.4s; } .stagger-5 { animation-delay: 0.5s; } +.line-clamp-2 { + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + overflow: hidden; +} + +.bg-blue-500\/60 { + background-color: rgba(59, 130, 246, 0.6); +} + +.bg-purple-500\/60 { + background-color: rgba(168, 85, 247, 0.6); +} + +.bg-green-500\/60 { + background-color: rgba(34, 197, 94, 0.6); +} + +.bg-orange-500\/60 { + background-color: rgba(249, 115, 22, 0.6); +} + .scrollbar-thin { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.2) transparent; diff --git a/apps/web/src/app/page.tsx b/apps/web/src/app/page.tsx index edb8da6..35968f3 100644 --- a/apps/web/src/app/page.tsx +++ b/apps/web/src/app/page.tsx @@ -1,15 +1,21 @@ import { RepoInput } from "@/components/repo-input"; -import { - Link2, - Code2, - Sparkles, - FileText, - GitBranch, - Boxes, - Search, +import { ExampleRepoCard } from "@/components/example-repo-card"; +import { + Link2, + Code2, + Sparkles, + FileText, + GitBranch, + Boxes, + Search, BookOpen, ArrowRight, - Github + Github, + Layers, + Workflow, + Terminal, + FileCode, + CheckCircle2, } from "lucide-react"; export default function HomePage() { @@ -67,40 +73,193 @@ export default function HomePage() { }, ]; + const exampleRepos = [ + { + name: "sindresorhus/p-limit", + description: "Elegant promise concurrency limiter with a simple API and robust error handling.", + language: "TypeScript", + languageColor: "#3178c6", + }, + { + name: "expressjs/express", + description: "Fast, unopinionated web framework for Node.js with minimalistic design.", + language: "JavaScript", + languageColor: "#f1e05a", + }, + { + name: "pallets/flask", + description: "Lightweight Python web framework with simplicity and flexibility at its core.", + language: "Python", + languageColor: "#3572A5", + }, + { + name: "colinhacks/zod", + description: "TypeScript-first schema validation with static type inference.", + language: "TypeScript", + languageColor: "#3178c6", + }, + { + name: "tiangolo/fastapi", + description: "Modern, high-performance Python API framework with automatic OpenAPI docs.", + language: "Python", + languageColor: "#3572A5", + }, + { + name: "redis/node-redis", + description: "High-performance Redis client for Node.js with comprehensive feature support.", + language: "TypeScript", + languageColor: "#3178c6", + }, + ]; + return (
- {/* Hero Section */}
- {/* Badge */}
Powered by AI
- {/* Main Headline */}

Understand any codebase
- in 5 minutes + in minutes

- {/* Subtitle */}

Paste a GitHub URL. Get interactive onboarding documentation with architecture diagrams, module breakdowns, and getting started guides.

- {/* Repo Input */}
- {/* Stats */} -
+
+
+
+
+
+
+
+
+
+ codeboard-docs.html +
+
+
+ +
+
+
+
+
+ +
+
+

Architecture Overview

+

High-level system design

+
+
+ +
+
+ + Dependency Graph +
+
+
+
+ src/index.ts + +
+ lib/core +
+
+ +
+ utils/parser +
+
+ +
+ api/routes +
+
+
+ +
+
+ + Key Metrics +
+
+
+
24
+
Modules
+
+
+
156
+
Files
+
+
+
8.2k
+
Lines
+
+
+
+
+ +
+
+ + Module Breakdown +
+ +
+ {[ + { name: "Core Engine", files: 12, color: "blue" }, + { name: "API Layer", files: 8, color: "purple" }, + { name: "Utilities", files: 15, color: "green" }, + { name: "Tests", files: 23, color: "orange" }, + ].map((mod) => ( +
+
+ {mod.name} + {mod.files} files +
+
+
+
+
+ ))} +
+ +
+
+ + Docs generated in 2m 34s +
+
+
+
+
+
+ +
+
+ +
-
5 min
+
~3 min
Average generation time
@@ -110,18 +269,16 @@ export default function HomePage() {
-
AI
-
Powered insights
+
10+
+
Languages supported
- {/* Background Elements */}
- {/* How It Works Section */}
@@ -134,35 +291,26 @@ export default function HomePage() {
- {/* Connection Line - Desktop */}
- {steps.map((step, index) => ( -
+ {steps.map((step) => ( +
- {/* Step Number */}
{step.number}
- {/* Icon */}
- - {/* Glow effect */} +
- {/* Title */}

{step.title}

- {/* Description */}

{step.description}

@@ -174,7 +322,29 @@ export default function HomePage() {
- {/* Features Section */} +
+
+
+
+ + Try It Out +
+

+ Featured Examples +

+

+ Click any repository to instantly generate documentation +

+
+ +
+ {exampleRepos.map((repo) => ( + + ))} +
+
+
+
@@ -187,21 +357,20 @@ export default function HomePage() {
- {features.map((feature, index) => ( + {features.map((feature) => (
- {/* Gradient border on hover */}
- +
- +

{feature.title} @@ -217,14 +386,12 @@ export default function HomePage() {

- {/* Built by Vectry Section */}
- {/* Background decoration */}
- +
@@ -245,7 +412,7 @@ export default function HomePage() {

{ + const repoUrl = `https://github.com/${repo.name}`; + setIsLoading(true); + + try { + const response = await fetch("/api/generate", { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ repoUrl }), + }); + + if (!response.ok) { + const data = await response.json(); + throw new Error(data.error || "Failed to start generation"); + } + + const data = await response.json(); + router.push(`/generate?repo=${encodeURIComponent(repoUrl)}&id=${data.id}`); + } catch (err) { + setIsLoading(false); + } + }; + + return ( +