ObjectStackObjectStack
Getting Started

Quick Start

Create your first ObjectDocs site in minutes.

Quick Start

ObjectDocs is a modern documentation engine based on Next.js 14 and Fumadocs, supporting the "Configuration as Code" philosophy. This guide will help you quickly set up a new documentation project.

Prerequisites

Ensure your environment meets the following requirements:

  • Node.js: 18.17 or higher
  • Package Manager: pnpm is recommended (npm or yarn also work)

1. Initialize ObjectDocs

ObjectDocs can be initialized in any existing project or as a new standalone project.

The fastest way to get started:

Terminal
mkdir my-docs
cd my-docs
npm init @objectdocs

This automatically runs the init command and sets up everything you need.

Option B: Using npx

Initialize in an existing project:

Terminal
cd your-existing-project
npx @objectdocs/cli init

This will:

  • Copy the site engine from @objectdocs/site to content/.fumadocs
  • Create content/package.json with scripts (dev, build, start)
  • Install dependencies in content/.fumadocs
  • Add content/.fumadocs and content/node_modules to .gitignore
  • Keep your project root clean

Create Content Directory

If not already created:

Terminal
mkdir -p content/docs

2. Add Content

ObjectDocs uses file-system routing. All documentation is stored in the content/docs directory.

Create Homepage

Create content/docs/index.mdx:

content/docs/index.mdx
---
title: Welcome
description: Your new documentation site
---

# Hello World

Welcome to ObjectDocs! This is your homepage.

Configure Sidebar

Create content/docs/meta.json to define page order:

content/docs/meta.json
{
  "pages": ["index"]
}

Configure Site Info

Create content/docs.site.json to configure site name and navigation:

content/docs.site.json
{
  "branding": {
    "name": "My Docs"
  },
  "links": [
    {
      "text": "Home",
      "url": "/"
    }
  ]
}

3. Start Development Server

Navigate to the content directory and start the development server:

Terminal
cd content
npm run dev

The development server will:

  • Start on port 7777 (default)
  • Watch for changes in content/docs.site.json and automatically restart
  • Hot reload your MDX content changes
  • Copy public/ assets to the site engine

Now visit http://localhost

, and you should see your documentation site!

Next Steps

  • Architecture - Understand ObjectDocs' directory structure and data flow
  • Configuration - Learn more about configuration options
  • Components - Embed interactive ObjectUI components in your docs

On this page