Skip to content

Commit 76a8c8d

Browse files
committed
feat: update homepage layout and enhance documentation structure
1 parent 4a839ac commit 76a8c8d

7 files changed

Lines changed: 172 additions & 871 deletions

File tree

.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/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: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import type { SVGProps } from 'react';
2+
3+
export function LogoIcon(props: SVGProps<SVGSVGElement>) {
4+
return (
5+
<svg
6+
xmlns="http://www.w3.org/2000/svg"
7+
viewBox="0 0 256 256"
8+
fill="none"
9+
{...props}
10+
>
11+
<rect width="256" height="256" fill="none" />
12+
<path
13+
d="M16 104l112 64l112-64l-112-64L16 104z"
14+
fill="currentColor"
15+
fillOpacity="0.2"
16+
stroke="currentColor"
17+
strokeWidth="16"
18+
strokeLinecap="round"
19+
strokeLinejoin="round"
20+
/>
21+
<path
22+
d="M16 136l112 64l112-64"
23+
fill="none"
24+
stroke="currentColor"
25+
strokeWidth="16"
26+
strokeLinecap="round"
27+
strokeLinejoin="round"
28+
/>
29+
<path
30+
d="M16 168l112 64l112-64"
31+
fill="none"
32+
stroke="currentColor"
33+
strokeWidth="16"
34+
strokeLinecap="round"
35+
strokeLinejoin="round"
36+
/>
37+
</svg>
38+
);
39+
}
40+
41+
export function Logo(props: { className?: string }) {
42+
return (
43+
<div className="flex items-center gap-2">
44+
<LogoIcon className="size-6" />
45+
<span className="font-bold text-lg">ObjectQL</span>
46+
</div>
47+
);
48+
}

0 commit comments

Comments
 (0)