Skip to content

Commit fc07f3a

Browse files
committed
Add introduction page and enhance MDX component support
Added a new introduction page at content/docs/index.mdx describing ObjectDocs and its philosophy. Updated MDX rendering in page.tsx and mdx-components.tsx to support Card, Cards, and Callout components. Updated objectdocs.json branding and metadata to use 'ObjectDocs' instead of 'ObjectStack', fixed GitHub URL, and updated repoBaseUrl.
1 parent 2177086 commit fc07f3a

File tree

4 files changed

+93
-5
lines changed

4 files changed

+93
-5
lines changed

content/docs/index.mdx

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
title: Introduction
3+
description: The Metadata-Driven Documentation Engine for the Low-Code Era.
4+
---
5+
6+
import { FileJson, Layers, Cpu, Zap } from 'lucide-react';
7+
8+
# What is ObjectDocs?
9+
10+
**ObjectDocs** is a modern, opinionated documentation site generator built on top of **Next.js 14** and **Fumadocs**.
11+
12+
It was created to solve a specific problem in the **ObjectStack** ecosystem: *How do we document complex, multi-product low-code platforms without drowning in frontend maintenance?*
13+
14+
Unlike general-purpose static site generators (SSGs), ObjectDocs treats documentation structure as **data**, not code.
15+
16+
## Core Philosophy
17+
18+
<Cards>
19+
<Card
20+
icon={<FileJson />}
21+
title="Metadata-Driven"
22+
href="/docs/getting-started/configuration"
23+
>
24+
Control sidebars, navigation, and page ordering entirely through local `meta.json` files. No React knowledge required for content updates.
25+
</Card>
26+
<Card
27+
icon={<Cpu />}
28+
title="ObjectUI Native"
29+
href="/docs/components/objectui-embed"
30+
>
31+
First-class support for embedding **ObjectUI** JSON schemas directly into Markdown. Render live, interactive components powered by your ObjectQL definitions.
32+
</Card>
33+
</Cards>
34+
35+
## Why ObjectDocs?
36+
37+
### 1. Separation of Concerns
38+
In traditional documentation sites, adding a new section often requires editing a global `sidebar.js` config or touching React components. In ObjectDocs, we strictly separate roles:
39+
40+
* **Technical Writers**: Write `.mdx` content and manage local `meta.json` for sorting.
41+
* **Platform Architects**: Configure global `site.json` (branding, nav links).
42+
* **Frontend Developers**: Maintain the `app/` directory (layout, logic) only when strictly necessary.
43+
44+
### 2. Multi-Product Architecture
45+
ObjectDocs is designed for monorepos that host multiple products (e.g., **ObjectQL**, **ObjectUI**, **ObjectOS**). It supports a "Root Toggle" mode that allows users to switch product contexts easily while staying on the same domain.
46+
47+
### 3. Interactive by Default
48+
Static text isn't enough for low-code platforms. ObjectDocs allows you to mount live **ObjectUI** components directly in your docs to demonstrate protocol capabilities:
49+
50+
```json title="example-objectui.json"
51+
{
52+
"component": "ObjectGrid",
53+
"props": {
54+
"object": "contracts",
55+
"columns": ["name", "amount", "status", "created_by"],
56+
"filters": [
57+
{ "field": "status", "operator": "=", "value": "active" }
58+
]
59+
}
60+
}
61+
62+
```
63+
64+
<Callout type="info">
65+
The actual rendering of the above JSON happens via our custom `ObjectUIRenderer` component. Check the [Components Guide](https://www.google.com/search?q=/docs/components) to learn more about schema validation and previewing.
66+
</Callout>
67+
68+
## Next Steps
69+
70+
Ready to build your documentation?
71+
72+
<Cards>
73+
<Card title="Quick Start" href="/docs/getting-started/installation" icon={<Zap />}>
74+
Install ObjectDocs and create your first page in under 5 minutes.
75+
</Card>
76+
<Card title="Architecture" href="/docs/getting-started/architecture" icon={<Layers />}>
77+
Deep dive into the directory structure and data flow.
78+
</Card>
79+
</Cards>

packages/site/app/[lang]/docs/[[...slug]]/page.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ import type { Metadata } from 'next';
33
import { DocsPage, DocsBody } from 'fumadocs-ui/page';
44
import { notFound } from 'next/navigation';
55
import { siteConfig } from '@/lib/site-config';
6+
import defaultComponents from 'fumadocs-ui/mdx';
7+
import { Steps, Step } from 'fumadocs-ui/components/steps';
8+
import { Card, Cards } from 'fumadocs-ui/components/card';
9+
import { Callout } from 'fumadocs-ui/components/callout';
610

711
interface PageProps {
812
params: Promise<{
@@ -39,7 +43,7 @@ export default async function Page({ params }: PageProps) {
3943
} : undefined}
4044
>
4145
<DocsBody>
42-
<MDX />
46+
<MDX components={{ ...defaultComponents, Steps, Step, Card, Cards, Callout }} />
4347
</DocsBody>
4448
</DocsPage>
4549
);

packages/site/mdx-components.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
import defaultComponents from 'fumadocs-ui/mdx';
22
import type { MDXComponents } from 'mdx/types';
33
import { Steps, Step } from 'fumadocs-ui/components/steps';
4+
import { Card, Cards } from 'fumadocs-ui/components/card';
5+
import { Callout } from 'fumadocs-ui/components/callout';
46

57
export function useMDXComponents(components: MDXComponents): MDXComponents {
68
return {
79
...defaultComponents,
810
Steps,
911
Step,
12+
Card,
13+
Cards,
14+
Callout,
1015
...components,
1116
};
1217
}

packages/site/objectdocs.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"meta": {
3-
"title": "ObjectStack Docs",
3+
"title": "ObjectDocs",
44
"description": "Enterprise-grade low-code platform documentation",
55
"url": "https://docs.objectstack.ai",
66
"favicon": "/favicon.ico"
@@ -13,7 +13,7 @@
1313
},
1414
"branding": {
1515
"logo": {
16-
"text": "ObjectStack",
16+
"text": "ObjectDocs",
1717
"light": "/logo.svg",
1818
"dark": "/logo.svg"
1919
},
@@ -34,7 +34,7 @@
3434
}
3535
],
3636
"socials": [
37-
{ "platform": "github", "url": "https://github.com/objectstack-ai/" }
37+
{ "platform": "github", "url": "https://github.com/objectstack-ai" }
3838
]
3939
},
4040
"sidebar": {
@@ -56,7 +56,7 @@
5656
"page": {
5757
"showLastUpdate": true,
5858
"showEditLink": true,
59-
"repoBaseUrl": "https://github.com/objectstack-ai/docs"
59+
"repoBaseUrl": "https://github.com/objectstack-ai/objectdocs"
6060
},
6161
"content": {
6262
"math": false,

0 commit comments

Comments
 (0)