Skip to content

Latest commit

 

History

History
221 lines (159 loc) · 5.83 KB

File metadata and controls

221 lines (159 loc) · 5.83 KB

ObjectDocs

Next.js TypeScript Tailwind CSS Fumadocs

Next-Gen Documentation Engine for the Low-Code Era.

Configuration as Code. Interactive Components. Enterprise Ready.


Deploy with Vercel

📖 Introduction

ObjectDocs is a modern, metadata-driven documentation engine architected for the ObjectStack ecosystem. Built on top of Next.js 14 (App Router) and Fumadocs, it redefines how enterprise documentation is maintained.

Unlike traditional static site generators, ObjectDocs adopts a strict Separation of Concerns philosophy:

  • Presentation: Handled by a standardized, logic-free React layer provided by @objectdocs/site.
  • Configuration: Defined purely in JSON (docs.site.json, meta.json).
  • Content: Written in MDX with native support for low-code components.

This architecture allows developers and technical writers to manage complex, multi-product documentation sites without touching a single line of UI code.

✨ Key Features

  • 🚀 Metadata-Driven Architecture Control navigation, sidebars, SEO, and branding entirely via docs.site.json and local meta.json files. Zero React knowledge required for content maintainers.

  • 🧩 Low-Code Native Seamlessly embed live, interactive components directly within your Markdown.

  • 🤖 AI Translation Built-in CLI command to automatically translate documentation using OpenAI.

  • 🎨 Enterprise-Grade UI Polished interface built on Radix UI and Tailwind CSS, featuring automatic dark mode, spotlight effects, and accessible primitives out of the box.

🚀 Quick Start

1. Create a new project

Initialize your documentation site structure:

mkdir my-docs
cd my-docs
pnpm init
pnpm add -D @objectdocs/cli

2. Configure scripts

Add the following scripts to your package.json:

{
  "scripts": {
    "dev": "objectdocs dev",
    "build": "objectdocs build",
    "start": "objectdocs start"
  }
}

3. Initialize ObjectDocs

Run the init command to set up the site engine:

pnpm objectdocs init

This will:

  • Copy the site engine to content/.objectdocs
  • Install necessary dependencies
  • Automatically add content/.objectdocs to .gitignore
  • Prepare your project for development

4. Add content

Create the basic directory structure:

mkdir -p content/docs

Create content/docs/index.mdx:

---
title: Welcome
description: My new docs site
---

# Hello World

Welcome to ObjectDocs!

Create content/docs/meta.json:

{
  "pages": ["index"]
}

5. Start the server

pnpm dev

Visit http://localhost:7777 to see your site.

🏗️ Project Structure

ObjectDocs enforces a clear directory structure to ensure maintainability at scale:

.
├── content/               # [Data Layer] Raw Content
│   ├── .objectdocs/       # Site engine (auto-generated by init)
│   ├── docs.site.json     # Global settings (Nav, Logo, Branding)
│   └── docs/
│       ├── meta.json      # Directory structure & sorting control
│       └── index.mdx      # Documentation content
├── package.json
└── ...

⚙️ Configuration

ObjectDocs is designed to be "Configuration as Code".

Global Config (content/docs.site.json)

Manage global navigation, branding, and feature flags:

{
  "branding": {
    "name": "ObjectStack",
    "logo": {
       "light": "/logo.svg",
       "dark": "/logo-dark.svg"
    }
  },
  "links": [
    { "text": "Guide", "url": "/docs" },
    { "text": "GitHub", "url": "https://github.com/objectstack-ai", "icon": "github" }
  ]
}

Sidebar Control (content/**/meta.json)

Control the sidebar order and structure using local metadata files in each directory:

{
  "title": "Getting Started",
  "pages": [
    "introduction",
    "---Installation---",
    "quick-start",
    "configuration"
  ]
}

📦 Packages

This repository is a monorepo managed by pnpm workspaces:

📚 Examples

  • examples/starter: A complete starter template demonstrating the recommended project structure. Includes comprehensive documentation on architecture, testing, and deployment guides. Ready for production use on Vercel and other platforms.

🧪 Testing

ObjectDocs includes comprehensive test scripts to validate the complete lifecycle:

# Quick build test (recommended for CI)
pnpm test:quick

# Full lifecycle test (includes server startup tests)
pnpm test:site

See TESTING.md for detailed testing documentation.

🤝 Contributing

Contributions are welcome! Please read our Contributing Guide for details on our code of conduct and the process for submitting pull requests.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.