Skip to content

Commit ee29788

Browse files
committed
Merge branch 'copilot/update-documentation-to-fumadocs'
2 parents c8c9a1f + 8728850 commit ee29788

File tree

9 files changed

+233
-871
lines changed

9 files changed

+233
-871
lines changed

.vscode/tasks.json

Lines changed: 0 additions & 45 deletions
This file was deleted.

apps/site/app/api/search/route.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { source } from '@/lib/source';
2+
import { createSearchAPI } from 'fumadocs-core/search/server';
3+
4+
export const { GET } = createSearchAPI('advanced', {
5+
indexes: source.getPages().map((page) => ({
6+
title: page.data.title,
7+
description: page.data.description ?? '',
8+
url: page.url,
9+
id: page.url,
10+
structuredData: page.data.structuredData,
11+
})),
12+
});

apps/site/app/icon.svg

Lines changed: 18 additions & 0 deletions
Loading

apps/site/app/layout.config.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import type { DocsLayoutProps } from 'fumadocs-ui/layout';
2-
// @ts-ignore: optional dev dependency for icons (some environments may not have types)
3-
import { Book, Code2, FileText, Sparkles } from 'lucide-react';
2+
import { Logo } from '@/components/logo';
43

54
export const baseOptions: Omit<DocsLayoutProps, 'tree'> = {
65
nav: {
7-
title: 'ObjectQL',
6+
title: <Logo />,
87
},
98
links: [
109
{

apps/site/app/page.tsx

Lines changed: 110 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,114 @@
1+
import Link from 'next/link';
2+
import { HomeLayout } from 'fumadocs-ui/home-layout';
3+
import { baseOptions } from '@/app/layout.config';
4+
15
export default function HomePage() {
26
return (
3-
<main className="flex h-screen flex-col items-center justify-center">
4-
<h1 className="mb-4 text-4xl font-bold">ObjectQL Documentation</h1>
5-
<p className="text-lg text-muted-foreground">
6-
Visit <a href="/docs" className="text-blue-600 hover:underline">/docs</a> to view the documentation
7-
</p>
8-
</main>
7+
<HomeLayout {...baseOptions}>
8+
<main className="flex-1">
9+
<section className="space-y-6 pb-8 pt-6 md:pb-12 md:pt-10 lg:py-32">
10+
<div className="container flex max-w-[64rem] flex-col items-center gap-4 text-center">
11+
<h1 className="text-3xl sm:text-5xl md:text-6xl lg:text-7xl font-bold tracking-tight">
12+
The Standard Protocol for <br className="hidden md:inline" />
13+
<span className="text-primary bg-clip-text text-transparent bg-gradient-to-r from-blue-600 to-cyan-500">
14+
AI Software Generation
15+
</span>
16+
</h1>
17+
<p className="max-w-[42rem] leading-normal text-muted-foreground sm:text-xl sm:leading-8">
18+
Decouple Intent from Implementation. <br />
19+
Hallucination-Free. Type-Safe. Production-Ready.
20+
</p>
21+
<div className="flex gap-4">
22+
<Link
23+
href="/docs"
24+
className="inline-flex h-10 items-center justify-center rounded-md bg-primary px-8 text-sm font-medium text-primary-foreground shadow transition-colors hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"
25+
>
26+
Get Started
27+
</Link>
28+
<Link
29+
href="https://github.com/objectql/objectql"
30+
target="_blank"
31+
rel="noreferrer"
32+
className="inline-flex h-10 items-center justify-center rounded-md border border-input bg-background px-8 text-sm font-medium shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"
33+
>
34+
GitHub
35+
</Link>
36+
</div>
37+
</div>
38+
</section>
39+
40+
<section className="container space-y-6 py-8 md:py-12 lg:py-24">
41+
<div className="mx-auto grid justify-center gap-4 sm:grid-cols-2 md:max-w-[64rem] md:grid-cols-3">
42+
<div className="relative overflow-hidden rounded-lg border bg-background p-2">
43+
<div className="flex h-[180px] flex-col justify-between rounded-md p-6">
44+
<div className="space-y-2">
45+
<h3 className="font-bold">Protocol-Driven</h3>
46+
<p className="text-sm text-muted-foreground">
47+
We decouple Intent (YAML Schema) from Implementation (TypeScript). Build software that is easy for AIs to understand and generate.
48+
</p>
49+
</div>
50+
</div>
51+
</div>
52+
<div className="relative overflow-hidden rounded-lg border bg-background p-2">
53+
<div className="flex h-[180px] flex-col justify-between rounded-md p-6">
54+
<div className="space-y-2">
55+
<h3 className="font-bold">Compiler, Not ORM</h3>
56+
<p className="text-sm text-muted-foreground">
57+
ObjectQL is not a runtime wrapper. It compiles abstract intent (AST) into optimized database queries. Zero runtime overhead.
58+
</p>
59+
</div>
60+
</div>
61+
</div>
62+
<div className="relative overflow-hidden rounded-lg border bg-background p-2">
63+
<div className="flex h-[180px] flex-col justify-between rounded-md p-6">
64+
<div className="space-y-2">
65+
<h3 className="font-bold">Security by Design</h3>
66+
<p className="text-sm text-muted-foreground">
67+
Permissions (RBAC) and Validation are injected automatically by the Core engine during the compilation phase.
68+
</p>
69+
</div>
70+
</div>
71+
</div>
72+
</div>
73+
</section>
74+
75+
<section className="container py-8 md:py-12 lg:py-24">
76+
<div className="mx-auto flex max-w-[58rem] flex-col items-center justify-center gap-4 text-center">
77+
<h2 className="text-3xl leading-[1.1] sm:text-3xl md:text-6xl font-bold">
78+
Metadata-Driven Architecture
79+
</h2>
80+
<p className="max-w-[85%] leading-normal text-muted-foreground sm:text-lg sm:leading-7">
81+
Define your data model in simple YAML. Let ObjectQL handle the database, API, and type definitions.
82+
</p>
83+
84+
<div className="w-full text-left bg-slate-950 p-4 rounded-lg overflow-x-auto mt-8 border border-slate-800 shadow-2xl">
85+
<pre className="text-sm font-mono text-slate-50">
86+
{`# project.object.yml
87+
name: project
88+
fields:
89+
name:
90+
type: text
91+
required: true
92+
status:
93+
type: select
94+
options: [planning, active, completed]
95+
default: planning
96+
owner:
97+
type: lookup
98+
reference_to: users`}
99+
</pre>
100+
</div>
101+
</div>
102+
</section>
103+
104+
</main>
105+
<footer className="py-6 md:px-8 md:py-0 border-t">
106+
<div className="container flex flex-col items-center justify-between gap-4 md:h-24 md:flex-row">
107+
<p className="text-center text-sm leading-loose text-muted-foreground md:text-left">
108+
Built by the ObjectQL Team. The source code is available on <a href="https://github.com/objectql/objectql" target="_blank" rel="noreferrer" className="font-medium underline underline-offset-4">GitHub</a>.
109+
</p>
110+
</div>
111+
</footer>
112+
</HomeLayout>
9113
);
10114
}

apps/site/components/logo.tsx

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
import { useId, type SVGProps } from 'react';
2+
3+
export function LogoIcon(props: SVGProps<SVGSVGElement>) {
4+
const id = useId().replace(/:/g, '');
5+
const gradientId = `objectql-gradient-${id}`;
6+
7+
return (
8+
<svg
9+
xmlns="http://www.w3.org/2000/svg"
10+
viewBox="0 0 256 256"
11+
fill="none"
12+
{...props}
13+
>
14+
<defs>
15+
<linearGradient
16+
id={gradientId}
17+
x1="0"
18+
y1="0"
19+
x2="256"
20+
y2="256"
21+
gradientUnits="userSpaceOnUse"
22+
>
23+
<stop offset="0%" stopColor="#2563EB" />
24+
<stop offset="100%" stopColor="#06B6D4" />
25+
</linearGradient>
26+
</defs>
27+
28+
{/* Background Shape: Soft Hexagon */}
29+
<path
30+
d="M128 24L224 80V176L128 232L32 176V80L128 24Z"
31+
fill={`url(#${gradientId})`}
32+
fillOpacity="0.1"
33+
/>
34+
35+
{/* Main Structure: Abstract QL Node */}
36+
<path
37+
d="M128 56L200 96V166L128 206L56 166V96L128 56Z"
38+
stroke={`url(#${gradientId})`}
39+
strokeWidth="24"
40+
strokeLinecap="round"
41+
strokeLinejoin="round"
42+
/>
43+
44+
{/* Center Detail: Core */}
45+
<path
46+
d="M128 96V166"
47+
stroke={`url(#${gradientId})`}
48+
strokeWidth="24"
49+
strokeLinecap="round"
50+
strokeLinejoin="round"
51+
/>
52+
<path
53+
d="M96 116L160 146"
54+
stroke={`url(#${gradientId})`}
55+
strokeWidth="24"
56+
strokeLinecap="round"
57+
strokeLinejoin="round"
58+
opacity="0.6"
59+
/>
60+
</svg>
61+
);
62+
}
63+
64+
export function Logo(props: { className?: string }) {
65+
return (
66+
<div className="flex items-center gap-2.5">
67+
<LogoIcon className="size-7" />
68+
<span className="font-bold text-lg tracking-tight bg-gradient-to-br from-blue-600 to-cyan-500 bg-clip-text text-transparent">
69+
ObjectQL
70+
</span>
71+
</div>
72+
);
73+
}

0 commit comments

Comments
 (0)