c28acd0512
- Add CoreDoc maintenance documentation (8 files) - Create route module for documentation serving - Set up static file structure with symbolic links - Support dual documentation systems (Legacy WASM + New Modular) Documentation includes: - README.md: System overview - DIRECTORY_STRUCTURE.md: Complete directory mapping - ARCHITECTURE.md: System design and data flow - MAINTENANCE_GUIDE.md: Daily maintenance procedures - INTEGRATION_GUIDE.md: Integration details - API_REFERENCE.md: All API endpoints - INTEGRATION_REPORT.md: Complete integration report - QUICK_START.md: Quick reference for team Route module: markbase-core/src/api/docs.rs - /docs/legacy/* → Legacy WASM system - /docs/api/* → API documentation - /docs/cli/* → CLI documentation Static files: - static/docs/legacy -> momentry_core/docs_v1.0/doc_wasm/ - static/docs/api -> momentry_core/docs_v1.0/API_WORKSPACE/ - static/docs/cli -> momentry_core/docs_v1.0/CLI_WORKSPACE/ Pending: Manual route addition to server.rs Team: Markbase team to complete integration
149 lines
3.7 KiB
Markdown
149 lines
3.7 KiB
Markdown
---
|
|
title: CoreDoc Documentation System
|
|
version: 1.0.0
|
|
date: 2026-10-25
|
|
author: Momentry Core Team
|
|
status: Active
|
|
---
|
|
|
|
# CoreDoc Documentation System
|
|
|
|
## Overview
|
|
|
|
CoreDoc is Momentry's documentation system that provides both legacy WASM-based and new modular documentation formats. This system has been integrated into Markbase as a unified documentation service.
|
|
|
|
---
|
|
|
|
## System Architecture
|
|
|
|
### Dual Documentation Systems
|
|
|
|
CoreDoc maintains two parallel documentation systems:
|
|
|
|
| System | Status | Location | Purpose |
|
|
|--------|--------|----------|---------|
|
|
| **Legacy WASM** | ⚠️ Deprecated but available | `momentry_core/docs_v1.0/doc_wasm/` | Backward compatibility |
|
|
| **New Modular** | ✅ Active | `momentry_core/docs_v1.0/{API_WORKSPACE,CLI_WORKSPACE}/` | Primary documentation |
|
|
|
|
---
|
|
|
|
## Quick Start
|
|
|
|
### Access Documentation
|
|
|
|
- **Legacy WASM**: `http://localhost:11438/docs/legacy/`
|
|
- **API Docs**: `http://localhost:11438/docs/api/`
|
|
- **CLI Docs**: `http://localhost:11438/docs/cli/`
|
|
|
|
### Default Credentials
|
|
|
|
- Username: `admin`
|
|
- Password: `admin123`
|
|
|
|
---
|
|
|
|
## Components
|
|
|
|
### 1. DocServer (Rust HTTP Server)
|
|
|
|
- **Port**: 11438 (integrated into Markbase)
|
|
- **Framework**: axum
|
|
- **Authentication**: HTTP Basic Auth
|
|
- **Features**:
|
|
- Static file serving
|
|
- WASM module serving
|
|
- Markdown rendering
|
|
- Route integration with Markbase
|
|
|
|
### 2. WASM Markdown Renderer
|
|
|
|
- **Source**: `momentry_core/md_wasm/`
|
|
- **Library**: pulldown-cmark
|
|
- **Features**:
|
|
- CommonMark + GFM support
|
|
- Table rendering
|
|
- Code highlighting
|
|
- Client-side rendering
|
|
|
|
### 3. Documentation Content
|
|
|
|
- **Legacy Modules**: 68 Markdown files
|
|
- **API Modules**: Modular structure
|
|
- **CLI Modules**: Modular structure
|
|
|
|
---
|
|
|
|
## Documentation Structure
|
|
|
|
```
|
|
/Users/accusys/momentry_core/docs_v1.0/
|
|
├── doc_wasm/ # Legacy WASM system
|
|
│ ├── index.html # Main UI
|
|
│ ├── modules/ # 68 documentation modules
|
|
│ └── pkg/ # WASM binaries
|
|
│ ├── md_wasm_bg.wasm # 291KB
|
|
│ └── md_wasm.js # JS bindings
|
|
├── API_WORKSPACE/ # New API documentation
|
|
│ ├── modules/
|
|
│ └── README.md
|
|
└── CLI_WORKSPACE/ # New CLI documentation
|
|
├── modules/
|
|
└── README.md
|
|
```
|
|
|
|
---
|
|
|
|
## Maintenance Tasks
|
|
|
|
### Update Documentation
|
|
|
|
1. Edit Markdown files in `modules/` directory
|
|
2. Commit changes to git
|
|
3. Changes are immediately visible (no rebuild needed for new system)
|
|
|
|
### Rebuild WASM (Legacy System)
|
|
|
|
```bash
|
|
cd /Users/accusys/momentry_core/md_wasm
|
|
cargo build --target wasm32-unknown-unknown --release
|
|
wasm-bindgen --out-dir ../docs_v1.0/doc_wasm/pkg --target web target/wasm32-unknown-unknown/release/md_wasm.wasm
|
|
```
|
|
|
|
---
|
|
|
|
## Integration with Markbase
|
|
|
|
CoreDoc is integrated into Markbase at port 11438:
|
|
|
|
```rust
|
|
// markbase-core/src/server.rs
|
|
Router::new()
|
|
.nest("/docs", docs_routes()) // CoreDoc integration
|
|
// ... other routes
|
|
```
|
|
|
|
---
|
|
|
|
## Related Documents
|
|
|
|
- [Directory Structure](./DIRECTORY_STRUCTURE.md) - Complete directory layout
|
|
- [Architecture](./ARCHITECTURE.md) - System design details
|
|
- [Maintenance Guide](./MAINTENANCE_GUIDE.md) - Detailed maintenance procedures
|
|
- [Integration Guide](./INTEGRATION_GUIDE.md) - How CoreDoc integrates with Markbase
|
|
- [API Reference](./API_REFERENCE.md) - All API endpoints
|
|
|
|
---
|
|
|
|
## Support
|
|
|
|
- **Documentation**: This directory
|
|
- **Source Code**: `/Users/accusys/momentry_core/src/bin/docserver/`
|
|
- **Issues**: Report to Momentry Core Team
|
|
|
|
---
|
|
|
|
## Version History
|
|
|
|
| Version | Date | Changes |
|
|
|---------|------|---------|
|
|
| 1.0.0 | 2026-10-25 | Initial documentation for Markbase integration | |