High-performance markdown processing engine and React previewer for advanced document rendering
Article Engine is a production-grade markdown processing and rendering platform that combines:
- High-Performance Processor: Convert markdown to optimized JSON AST
- React Components: Beautiful, responsive preview and editor components
- Advanced Features: Syntax highlighting, math rendering, diagrams, and more
- Reliability: Circuit breaker, retry logic, fallback chains, and health monitoring
- Performance: Worker pools, caching, streaming, and resource monitoring
Perfect for technical documentation, blogs, knowledge bases, and educational platforms.
- Unified/Remark Pipeline: Industry-standard markdown parsing
- Frontmatter Support: YAML metadata extraction
- GFM Extensions: Tables, strikethrough, task lists, and more
- Table of Contents: Auto-generated with hierarchy
- Syntax Highlighting: 200+ languages with 50+ themes (Shiki)
- Math Equations: KaTeX rendering for complex mathematics
- Diagrams: Mermaid support for flowcharts, sequences, and more
- Responsive Tables: Beautiful, accessible table rendering
- Web Workers: Offload processing to background threads
- Predictive Caching: Smart caching of frequently accessed content
- Streaming Parser: Process large documents without memory spikes
- GPU Acceleration: CSS 3D transforms for smooth scrolling
- Circuit Breaker: Automatic failure detection and recovery
- Retry Logic: Exponential backoff for transient failures
- Fallback Chain: Graceful degradation when features fail
- Health Monitoring: Real-time system health tracking
- TypeScript: Full type safety and IDE support
- Comprehensive API: 50+ documented functions
- Plugin Architecture: Extend with custom processors
- Extensive Testing: Property-based and integration tests
# Install the npm package
npm install article-engine
# Or from local path (development)
npm install c:\Users\jenit\Desktop\mono-repo\article-engine\npmNote
Currently, Article Engine only supports the Node/NPM ecosystem. The Python package (pip) is under active development and will be released soon.
import { processor, Preview } from "article-engine";
// Initialize
await processor.init();
// Process markdown
const markdown = "# Hello\n\nThis is **bold** text.";
const doc = await processor.process(markdown, "hello-world");
console.log(doc.meta.title); // "Hello"
console.log(doc.meta.wordCount); // 5import React from "react";
import { Preview } from "article-engine";
export default function ArticleViewer({ documentAST }) {
return (
<div className="article-container">
<Preview document={documentAST} theme="dark" />
</div>
);
}import React, { useState } from "react";
import { BlockEditor } from "article-engine";
export default function Editor() {
const [markdown, setMarkdown] = useState("# My Document");
return (
<BlockEditor
value={markdown}
onChange={setMarkdown}
onSave={({ markdown, metrics }) => {
console.log("Saved:", markdown);
}}
/>
);
}- SETUP.md - Complete setup and installation guide
- DEVELOPER.md - Comprehensive developer guide
- PRODUCT.md - Product overview and features
- npm/INSTALL.md - Detailed npm installation
- npm/README.md - Quick reference
- npm/package.json - Package metadata
- demo/ - Live demo application
- npm/src/tests/ - Test examples
- Read SETUP.md - Get your environment ready
- Read DEVELOPER.md - Quick start section
- Try basic examples - Process markdown
- Try React component - Render preview
- Read DEVELOPER.md - Core concepts
- Read DEVELOPER.md - API reference
- Try advanced examples - Math, diagrams, tables
- Try block editor - Visual editing
- Read DEVELOPER.md - Advanced features
- Read DEVELOPER.md - Performance
- Explore source code - Architecture deep dive
- Contribute - Add features or fix bugs
graph TD
subgraph Client ["Client Layer (React / Browser)"]
User[Markdown Source / User Input] --> Editor[BlockEditor / CanvasEditor]
Editor -->|Synchronized AST| Preview[Preview / EnhancedPreview]
end
subgraph Engine ["Engine Core (Unified Pipeline)"]
Editor -.-> Orchestrator[createArticleEngine Orchestrator]
Orchestrator --> Cache[Predictive AST Cache]
Cache -->|Cache Miss| WorkerPool[Worker Pool Manager]
subgraph Workers ["Parallel Worker Threads (Off-Thread)"]
WorkerPool -->|Task Dispatch| WorkersMain[Worker Instances]
WorkersMain --> Unified[Unified/Remark Parser]
Unified --> Shiki[Shiki Code Highlight]
Unified --> KaTeX[KaTeX Math Renderer]
Unified --> Mermaid[Mermaid Diagram Compiler]
end
end
subgraph Resiliency ["Resiliency & Quality Assurance"]
WorkerPool --> CircuitBreaker[Circuit Breaker]
WorkerPool --> Retry[Retry with Exponential Backoff]
WorkerPool --> Fallback[Graceful Degradation Fallbacks]
end
WorkersMain -->|DocumentJSON AST| Cache
Cache -->|Return Resolved AST| Editor
Article Engine
βββ Processor (Node.js & Browser)
β βββ Markdown Parser (Unified/Remark)
β βββ Feature Processors
β β βββ Shiki (Syntax Highlighting)
β β βββ KaTeX (Math Rendering)
β β βββ Mermaid (Diagrams)
β βββ AST Transformer
β
βββ React Components (Browser)
β βββ Preview (Rendering)
β βββ BlockEditor (Visual Editing)
β βββ EnhancedPreview (Advanced)
β
βββ Infrastructure
βββ Worker Pool (Parallelization)
βββ Circuit Breaker (Fault Tolerance)
βββ Cache (Performance)
βββ Resource Monitor (Observability)
βββ Telemetry (Metrics)
- Small Documents (< 10KB): < 100ms
- Medium Documents (10-100KB): 100-500ms
- Large Documents (> 100KB): Streaming mode available
- Baseline: ~5MB
- Per Document: ~1-2MB per 100KB of markdown
- Streaming Mode: Constant memory regardless of size
- Chrome/Edge 90+
- Firefox 88+
- Safari 14+
- Mobile browsers (iOS Safari 14+, Chrome Mobile 90+)
- HTML Sanitization: DOMPurify integration
- XSS Prevention: Automatic escaping of user content
- No External Calls: All processing is local
- No Data Collection: User content stays on device
- GDPR Compliant: No personal data collection
npm install c:\Users\jenit\Desktop\mono-repo\article-engine\npmcd c:\Users\jenit\Desktop\mono-repo\article-engine\npm
npm link
npm link article-engine # In your projectgit clone https://github.com/your-org/article-engine.git
cd article-engine/npm
npm install
npm run build{
"workspaces": ["packages/*", "article-engine/npm"]
}See SETUP.md for detailed instructions.
cd npm
npm install
npm run buildnpm run test # Run tests once
npm run test:watch # Watch mode
npm run test:coverage # Coverage report# Terminal 1: Watch for changes
npm run build:watch
# Terminal 2: Run tests
npm run test:watch
# Terminal 3: Use in your project
npm install c:\Users\jenit\Desktop\mono-repo\article-engine\npmWe welcome contributions! See DEVELOPER.md for guidelines.
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests:
npm run test - Build:
npm run build - Submit a pull request
- API documentation with code examples
- Architecture diagrams and flowcharts
- Mathematical formulas and equations
- Rich content editing
- SEO-optimized metadata
- Beautiful rendering
- Collaborative documentation
- Table of contents navigation
- Search-friendly structure
- Interactive tutorials
- Mathematical notation
- Code examples and diagrams
- Documentation generation
- Report creation
- Knowledge sharing
- β Core processor and preview
- β Block editor
- β Syntax highlighting
- β Math rendering
- β Diagram support
- β Performance optimization
- β Telemetry
- β Collaborative editing ready (Structured Block models)
- β Smart popover keyboard navigation & aliases
- β 5 brand new rich blocks (Todo list, accordion toggle summaries, embeds, bookmarks, attachments)
- β Custom themes & rendering customizability (React Render Overrides API)
- β Dynamic Workspace Import & Export (Atomic imports, file limit checks, null-byte binary filters)
- β Memory-Safe Exports (Object URL revocations and mobile Safari downloads)
- β Web Worker AbortSignal Task Cancellation (Prevents zombie background compiles on rapid typing)
- β Structured Compile Lifecycles (Reporting compile status: processing, success, degraded, error)
- β Portable AI Agent Skill Integration (Invariants-driven developer guidance for Gemini/Claude assistants)
- π AI-powered features
- π Advanced analytics
- π Mobile app
- π Cloud sync
- π Full real-time synchronization layer
- π Extensible plugin manager framework
| Feature | Article Engine | Standard Libs |
|---|---|---|
| Dual processor + renderer | β | β |
| Isomorphic (Node + Browser) | β | β |
| Built-in math rendering | β | β |
| Built-in diagram support | β | β |
| Visual block editor | β | β |
| Worker pool management | β | β |
| Performance monitoring | β | β |
| Fallback chain | β | β |
- SETUP.md - Installation guide
- DEVELOPER.md - Developer guide
- PRODUCT.md - Product overview
- GitHub Issues - Report bugs
- GitHub Discussions - Ask questions
- Email - support@example.com
MIT License - see LICENSE file for details
Built with:
- Unified - Markdown parsing
- Remark - Markdown processor
- Shiki - Syntax highlighting
- KaTeX - Math rendering
- Mermaid - Diagrams
- React - UI components
- Read SETUP.md - Get your environment ready
- Read DEVELOPER.md - Learn the API
- Try Examples - See it in action
- Build Something - Create your first project
Article Engine - Transform Your Content
High-Performance Markdown Processing & Rendering
Version: 1.2.0
Last Updated: May 2026
License: MIT
- Total Documentation: ~5,300 lines
- API Functions: 50+ documented
- Features: 10+ advanced features
- Use Cases: 5+ real-world scenarios
- Installation Methods: 4+ options
- Browser Support: 4+ major browsers
- Languages Supported: 200+ for syntax highlighting
- Themes Available: 50+ color schemes
# Install
npm install c:\Users\jenit\Desktop\mono-repo\article-engine\npm
# Import
import { processor, Preview } from "article-engine";
# Use
await processor.init();
const doc = await processor.process(markdown, slug);Happy coding! π