Skip to content

Commit df1c0c1

Browse files
committed
Enhance documentation structure: add sub-category support and improve meta.json formatting
1 parent 05c91a1 commit df1c0c1

2 files changed

Lines changed: 66 additions & 5 deletions

File tree

apps/docs/app/page.tsx

Lines changed: 65 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Link from 'next/link';
2-
import { Database, FileJson, Layers, ShieldCheck, Zap, Globe } from 'lucide-react';
2+
import { Database, FileJson, Layers, ShieldCheck, Zap, Globe, Cpu, LayoutTemplate, Bot } from 'lucide-react';
33
import { HomeLayout } from 'fumadocs-ui/layouts/home';
44
import { baseOptions } from '@/app/layout.config';
55

@@ -81,43 +81,79 @@ export default function HomePage() {
8181
<FeatureCard
8282
icon={<Database className="h-6 w-6" />}
8383
title="ObjectQL Data Layer"
84+
href="/docs/specifications/data/architecture"
8485
description="Strict JSON schemas for entities, fields, and relationships. It is the SQL you can send over the wire."
8586
/>
8687
<FeatureCard
8788
icon={<Layers className="h-6 w-6" />}
8889
title="ObjectUI View Layer"
90+
href="/docs/specifications/ui/sdui-protocol"
8991
description="Server-Driven UI protocol defining forms, grids, and dashboards. Decouples logic from the frontend implementation."
9092
/>
9193
<FeatureCard
9294
icon={<Zap className="h-6 w-6" />}
9395
title="ObjectOS Kernel"
96+
href="/docs/specifications/server/kernel-architecture"
9497
description="The runtime contract for permissions, workflows, and automation. Stateless business logic execution."
9598
/>
9699
<FeatureCard
97100
icon={<ShieldCheck className="h-6 w-6" />}
98101
title="Zero-Trust Security"
102+
href="/docs/specifications/server/permission-governance"
99103
description="Policy-as-Code. ACLs and Field Level Security are compiled into the database query engine."
100104
/>
101105
<FeatureCard
102106
icon={<FileJson className="h-6 w-6" />}
103107
title="Zod-First Definition"
108+
href="/docs/specifications/data/schema-definition"
104109
description="The entire protocol is defined in Zod. Runtime validation and static type inference come for free."
105110
/>
106111
<FeatureCard
107112
icon={<Globe className="h-6 w-6" />}
108113
title="Universal Backend"
114+
href="/docs/concepts/architecture"
109115
description="Protocol adapters for Postgres, MongoDB, REST and GraphQL. Write once, run on any infrastructure."
110116
/>
111117
</div>
112118

119+
{/* Personas Section */}
120+
<div className="mt-32 mb-16 w-full max-w-5xl px-4">
121+
<h2 className="text-3xl font-bold tracking-tight mb-12 bg-gradient-to-r from-fd-foreground to-fd-muted-foreground bg-clip-text text-transparent">
122+
Built for Builders
123+
</h2>
124+
<div className="grid grid-cols-1 md:grid-cols-3 gap-6">
125+
<PersonaCard
126+
icon={<LayoutTemplate className="w-8 h-8 mb-4 text-blue-500" />}
127+
title="Platform Architects"
128+
description="Design scalable Internal Developer Platforms (IDP) that unify your data silos."
129+
href="/docs/concepts/enterprise-patterns"
130+
action="Explore Patterns"
131+
/>
132+
<PersonaCard
133+
icon={<Bot className="w-8 h-8 mb-4 text-purple-500" />}
134+
title="AI Engineers"
135+
description="Feed LLMs with perfectly structured, deterministic JSON schemas they can actually understand."
136+
href="/docs/concepts/ai-codex"
137+
action="View Codex"
138+
/>
139+
<PersonaCard
140+
icon={<Cpu className="w-8 h-8 mb-4 text-green-500" />}
141+
title="Framework Builders"
142+
description="Implement the protocol in your language. Write drivers for React, Vue, Flutter, or Go."
143+
href="/docs/specifications/data/architecture"
144+
action="Read Spec"
145+
/>
146+
</div>
147+
</div>
148+
113149
</main>
114150
</HomeLayout>
115151
);
116152
}
117153

118-
function FeatureCard({ icon, title, description }: { icon: React.ReactNode; title: string; description: string }) {
119-
return (
120-
<div className="group relative rounded-2xl border border-fd-border bg-fd-card p-6 shadow-sm transition-all hover:border-fd-primary/20 hover:shadow-md hover:shadow-fd-primary/5">
154+
function FeatureCard({ icon, title, description, href }: { icon: React.ReactNode; title: string; description: string; href?: string }) {
155+
const CardContent = (
156+
<div className="group relative h-full rounded-2xl border border-fd-border bg-fd-card p-6 shadow-sm transition-all hover:border-fd-primary/20 hover:shadow-md hover:shadow-fd-primary/5 cursor-pointer">
121157
<div className="mb-4 inline-flex items-center justify-center rounded-lg bg-fd-primary/10 p-2 text-fd-primary transition-colors group-hover:bg-fd-primary/20">
122158
{icon}
123159
</div>
@@ -129,4 +165,29 @@ function FeatureCard({ icon, title, description }: { icon: React.ReactNode; titl
129165
</p>
130166
</div>
131167
);
168+
169+
if (href) {
170+
return (
171+
<Link href={href} className="block h-full">
172+
{CardContent}
173+
</Link>
174+
);
175+
}
176+
177+
return CardContent;
178+
}
179+
180+
function PersonaCard({ icon, title, description, href, action }: { icon: React.ReactNode; title: string; description: string; href: string; action: string }) {
181+
return (
182+
<Link href={href} className="flex flex-col items-start p-8 rounded-2xl bg-fd-secondary/30 border border-fd-border/50 hover:bg-fd-secondary/60 hover:border-fd-primary/30 transition-all group text-left">
183+
{icon}
184+
<h3 className="text-xl font-bold mb-3">{title}</h3>
185+
<p className="text-fd-muted-foreground mb-6 text-sm leading-relaxed flex-grow text-left">
186+
{description}
187+
</p>
188+
<div className="flex items-center text-sm font-semibold text-fd-primary mt-auto group-hover:translate-x-1 transition-transform">
189+
{action} <span className="ml-1"></span>
190+
</div>
191+
</Link>
192+
)
132193
}

content/docs/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ This documentation is the authoritative reference for the ObjectStack Protocol.
2828
<Card
2929
icon={<Book />}
3030
title="Protocol Reference"
31-
href="/docs/references/data/index"
31+
href="/docs/references/data/core/Object"
3232
description="The Dictionary. Comprehensive reference for every Schema, Field Type, and Configuration option."
3333
/>
3434
</Cards>

0 commit comments

Comments
 (0)