# AeThex Documentation Migration Guide ## Overview This guide explains how to migrate the AeThex documentation from the React-based local docs system to Gitbook. ## Migration Structure The migration package includes: 1. **Markdown Files** - 9 documentation pages in Markdown format 2. **JSON Structure** - Structured data for programmatic import 3. **Implementation Guide** - Instructions for local fallback system 4. **Gitbook API Guide** - How to push content to Gitbook ### Files Included ``` code/docs-migration/ ├── 01-overview.md # Welcome to AeThex Documentation ├── 02-getting-started.md # Getting Started ├── 03-platform.md # Platform Guide ├── 04-api-reference.md # API Reference ├── 05-tutorials.md # Tutorials ├── 06-cli.md # CLI Tools ├── 07-examples.md # Code Examples ├── 08-integrations.md # Integrations ├── 09-curriculum.md # Curriculum ├── MIGRATION_GUIDE.md # This file ├── docs-structure.json # Gitbook structure definition ├── migration-implementation.ts # Implementation helper └── gitbook-api-script.js # Script to push to Gitbook ``` ## Step 1: Prepare Gitbook Workspace 1. Go to your Gitbook workspace "AeThex Docs" 2. Create a new space or use existing one 3. Create the following page structure: - Overview - Getting Started - Platform - API Reference - Tutorials - CLI Tools - Code Examples - Integrations - Curriculum ## Step 2: Import Markdown Content ### Option A: Manual Import 1. Open each Markdown file 2. Copy the content 3. Paste into corresponding Gitbook page 4. Format as needed (Gitbook handles most Markdown automatically) ### Option B: Gitbook Import API Use the Gitbook API to programmatically import content: ```bash # Set up environment variables export GITBOOK_API_TOKEN=gb_api_jORqpp2qlvg7pwlPiIKHAbgcFIDJBIJ1pz09WpIg export GITBOOK_SPACE_ID=your-space-id # Run the sync script node code/docs-migration/gitbook-api-script.js sync ``` ## Step 3: Set Up Fallback System (Local) Keep your local React docs as a fallback while you confirm everything is synced: ### Update DocsLayout.tsx Add a banner and fallback behavior: ```typescript

📚 These docs are being migrated to Gitbook. View the latest version →

``` ### Add Gitbook Embed (Optional) For seamless integration, embed Gitbook content directly: ```typescript