Skip to content

rebel-jiwonk/docs-previewer

Repository files navigation

Docs Sidebar Editor 🎨

A beautiful drag-and-drop editor for building documentation sidebars. Export for Mintlify or Docusaurus. No more manual JSON editing!

Features ✨

  • 🎯 Drag & Drop Interface: Intuitive editor that feels like organizing your actual docs
  • 👁️ Live Preview: See exactly how your sidebar will look in real-time
  • 📁 Groups & Pages: Organize documentation into collapsible groups
  • 💾 Auto-Save: Your work is automatically saved to localStorage
  • 📤 Multi-Format Export: Download docs.json (Mintlify) or sidebar.json (Docusaurus)
  • 🎨 Beautiful UI: Modern, gradient-rich design with smooth animations

Quick Start 🚀

# Install dependencies
npm install

# Start development server
npm run dev

Usage 📝

  1. Add Groups: Click "Add Group" to create collapsible sections
  2. Add Pages: Click "Add Page" or use the + button on groups
  3. Edit Details: Click any item to edit its title and path
  4. Reorder: Drag items to rearrange your sidebar
  5. Preview: See your sidebar live on the right panel
  6. Export: Download docs.json (Mintlify) or sidebar.json (Docusaurus)

Tech Stack 🛠️

  • React 18 + TypeScript - Type-safe component framework
  • Vite - Lightning-fast development
  • Tailwind CSS - Beautiful, responsive styling
  • @dnd-kit - Smooth drag-and-drop
  • Zustand - Simple state management

React Compiler

The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...

      // Remove tseslint.configs.recommended and replace with this
      tseslint.configs.recommendedTypeChecked,
      // Alternatively, use this for stricter rules
      tseslint.configs.strictTypeChecked,
      // Optionally, add this for stylistic rules
      tseslint.configs.stylisticTypeChecked,

      // Other configs...
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])

You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:

// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...
      // Enable lint rules for React
      reactX.configs['recommended-typescript'],
      // Enable lint rules for React DOM
      reactDom.configs.recommended,
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published