Skip to content

Universal media processing CLI with an extensible plugin architecture. One tool to process all your media - images, videos, audio, documents, and more.

Notifications You must be signed in to change notification settings

0xshariq/mediaproc-docs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

93 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

MediaProc Documentation

Official documentation website for MediaProc CLI - built with Next.js 14, TypeScript, and Tailwind CSS.

Next.js TypeScript Tailwind CSS License: MIT

Live Site: https://mediaproc.dev

This is the source code for the MediaProc documentation website, featuring comprehensive guides, API references, and interactive examples for the MediaProc CLI and all its plugins.

πŸš€ Quick Start

# Install dependencies
pnpm install

# Run development server
pnpm dev

# Open browser
# http://localhost:3000

πŸ“ Project Structure

web/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/                  # Next.js app directory
β”‚   β”‚   β”œβ”€β”€ layout.tsx       # Root layout
β”‚   β”‚   β”œβ”€β”€ page.tsx         # Homepage
β”‚   β”‚   └── [slug]/          # Dynamic doc pages
β”‚   └── components/          # React components
β”‚       β”œβ”€β”€ DocLayout.tsx    # Main docs layout
β”‚       β”œβ”€β”€ Sidebar.tsx      # Left navigation
β”‚       β”œβ”€β”€ OnThisPage.tsx   # Right TOC
β”‚       β”œβ”€β”€ Search.tsx       # Search (Ctrl+K)
β”‚       └── VersionSelector.tsx
β”œβ”€β”€ content/                 # MDX documentation
β”‚   β”œβ”€β”€ guides/             # User guides
β”‚   β”œβ”€β”€ plugins/            # Plugin docs
β”‚   β”œβ”€β”€ api/                # API reference
β”‚   β”œβ”€β”€ performance.mdx     # Benchmarks
β”‚   β”œβ”€β”€ faq.mdx            # FAQ
β”‚   └── community/          # Migration guides
β”œβ”€β”€ public/                 # Static assets
β”‚   β”œβ”€β”€ images/
β”‚   └── icons/
└── tailwind.config.ts      # Tailwind config

✨ Features

Documentation Features

  • MDX Support - Write docs in Markdown with React components
  • Search - Fuzzy search with Ctrl+K keyboard shortcut
  • Syntax Highlighting - Code blocks with language detection
  • Table of Contents - Auto-generated from headings
  • Version Selector - Switch between CLI versions
  • Responsive Design - Mobile, tablet, and desktop optimized
  • Dark Mode Ready - Prepared for dark theme

Developer Features

  • TypeScript - Full type safety across the project
  • Next.js 14 - App Router with server components
  • Tailwind CSS - Utility-first styling
  • Hot Reload - Instant updates during development
  • MDX Components - Custom components in docs
  • SEO Optimized - Meta tags, Open Graph, structured data

πŸ› οΈ Development

Prerequisites

  • Node.js >= 18.0.0
  • pnpm (recommended) or npm

Commands

# Development
pnpm dev              # Start dev server
pnpm build           # Build for production
pnpm start           # Run production build
pnpm lint            # Run ESLint

# Type checking
pnpm type-check      # Check TypeScript types

Adding Documentation

  1. Create MDX file in content/ directory:

    ---
    title: "Your Page Title"
    description: "Page description"
    ---
    
    # Your Content Here
  2. Add to navigation in src/components/Sidebar.tsx:

    const navigation = [
      {
        title: "Your Section",
        links: [
          { title: "Your Page", href: "/your-page" }
        ]
      }
    ]
  3. Preview changes - Dev server hot reloads automatically

Components Overview

Layout Components

  • DocLayout - Three-column layout (sidebar, content, TOC)
  • Sidebar - Left navigation with sections and links
  • OnThisPage - Right table of contents from headings
  • Header - Top navigation with logo and version selector

Interactive Components

  • Search - Fuzzy search with keyboard shortcuts (Ctrl+K)
  • VersionSelector - Dropdown to switch CLI versions
  • CodeBlock - Syntax-highlighted code with copy button
  • Callout - Info/warning/tip boxes

Custom MDX Components

Use these in your .mdx files:

<Callout type="info">
  Important information here
</Callout>

<CodeGroup>
  <CodeBlock title="JavaScript">
    // Your code
  </CodeBlock>
  <CodeBlock title="TypeScript">
    // Your code
  </CodeBlock>
</CodeGroup>

πŸ“ Content Structure

Documentation Sections

content/
β”œβ”€β”€ getting-started/
β”‚   β”œβ”€β”€ installation.mdx       # Installation guide
β”‚   β”œβ”€β”€ quick-start.mdx        # Quick start tutorial
β”‚   └── configuration.mdx      # Configuration options
β”œβ”€β”€ guides/
β”‚   β”œβ”€β”€ image-processing.mdx   # Image guide
β”‚   β”œβ”€β”€ video-processing.mdx   # Video guide
β”‚   └── audio-processing.mdx   # Audio guide
β”œβ”€β”€ plugins/
β”‚   β”œβ”€β”€ image/                 # Image plugin docs
β”‚   β”œβ”€β”€ video/                 # Video plugin docs
β”‚   └── audio/                 # Audio plugin docs
β”œβ”€β”€ api/
β”‚   └── cli-reference.mdx      # CLI command reference
β”œβ”€β”€ community/
β”‚   β”œβ”€β”€ migration-sharp.mdx    # Migration from ImageMagick
β”‚   β”œβ”€β”€ migration-ffmpeg.mdx   # Migration from FFmpeg
β”‚   └── contributing.mdx       # Contributing guide
β”œβ”€β”€ performance.mdx            # Performance benchmarks
└── faq.mdx                    # Frequently asked questions

MDX Frontmatter

Every MDX file should include frontmatter:

---
title: "Page Title"              # Required
description: "Brief description" # Required
category: "guides"               # Optional
order: 1                         # Optional (for sorting)
lastUpdated: "2026-01-10"       # Optional
---

🎨 Styling Guide

Tailwind Classes

  • Use semantic Tailwind utilities
  • Follow the existing color scheme
  • Maintain consistent spacing (4, 6, 8, 12, 16)

Typography

  • Headings: text-2xl, text-xl, text-lg
  • Body: text-base
  • Small: text-sm
  • Code: font-mono

Layout

  • Container: max-w-7xl mx-auto px-4
  • Grid: grid grid-cols-1 md:grid-cols-2 gap-6
  • Flex: flex items-center justify-between

πŸ” Search Functionality

The search component provides:

  • Keyboard shortcut - Ctrl+K or Cmd+K
  • Fuzzy matching - Smart scoring algorithm
  • Multi-word search - Searches across titles and content
  • Navigation - Arrow keys + Enter to select

Search Scoring

  • Exact match: 100 points
  • Starts with query: 50 points
  • Contains query: 30 points
  • All words present: 20 points
  • Individual words: 10/5/3 points (decreasing)

πŸš€ Deployment

Build for Production

# Build static site
pnpm build

# Output in .next/ directory
# Deploy to Vercel, Netlify, or any static host

Environment Variables

Create .env.local for local development:

NEXT_PUBLIC_SITE_URL=http://localhost:3000
NEXT_PUBLIC_GOOGLE_ANALYTICS=UA-XXXXXXXXX-X

Vercel Deployment

  1. Connect repository to Vercel
  2. Set build command: pnpm build
  3. Set output directory: .next
  4. Deploy automatically on push

πŸ“Š Performance

  • Lighthouse Score - 95+ across all metrics
  • Bundle Size - < 200KB gzipped
  • First Load - < 1s on 3G
  • Interactive - < 2s on 3G

πŸ§ͺ Testing

# Run tests (when implemented)
pnpm test

# Type checking
pnpm type-check

# Lint
pnpm lint

🀝 Contributing to Documentation

  1. Fork the repository
  2. Clone your fork
  3. Create branch - git checkout -b docs/your-feature
  4. Make changes - Edit or add MDX files
  5. Test locally - pnpm dev
  6. Commit - git commit -m "docs: your changes"
  7. Push - git push origin docs/your-feature
  8. Pull Request - Open PR to main repo

Documentation Guidelines

  • Clear & Concise - Get to the point quickly
  • Code Examples - Show, don't just tell
  • Consistent Style - Follow existing patterns
  • Proper Grammar - Use spell checker
  • Screenshots - Add visuals when helpful
  • Links - Reference related pages

πŸ“¦ Dependencies

Core

  • next - ^14.0.0
  • react - ^18.0.0
  • react-dom - ^18.0.0

Styling

  • tailwindcss - ^3.4.0
  • autoprefixer - ^10.4.0
  • postcss - ^8.4.0

Content

  • @next/mdx - ^14.0.0
  • gray-matter - ^4.0.0
  • remark-gfm - ^4.0.0

Utilities

  • clsx - ^2.0.0
  • date-fns - ^3.0.0

πŸ”— Related Links

πŸ“„ License

MIT Β© 0xshariq


Need help? Open an issue or reach out on Twitter

About

Universal media processing CLI with an extensible plugin architecture. One tool to process all your media - images, videos, audio, documents, and more.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published