Skip to main content

MoLOS-Markdown Module Launch

· 6 min read
Eduardez
MoLOS Lead Developer

We're excited to announce the launch of the MoLOS-Markdown module, a comprehensive document management solution designed to help you organize, create, and manage markdown documents with ease. This module brings powerful hierarchical organization, version control, and search capabilities to the MoLOS ecosystem.

Introduction to MoLOS-Markdown

MoLOS-Markdown is a full-featured document management module built on markdown. Whether you're managing technical documentation, personal notes, project wikis, or knowledge bases, MoLOS-Markdown provides the tools you need to stay organized and productive.

Key Features

Hierarchical Document Organization

Organize documents in a natural tree structure with support for:

  • Nested Pages: Create unlimited levels of nested pages
  • Path Management: Automatic path generation and validation
  • Drag-and-Drop: Reorganize pages with intuitive drag-and-drop
  • Tree View: Visual representation of your document structure

Version Control

Never lose your work with comprehensive version control:

  • Automatic Versioning: Every save creates a new version
  • Version History: View and compare all versions of a page
  • Restore: Roll back to any previous version
  • Diff View: See changes between versions
  • Version Metadata: Track who made changes and when

Find content instantly with advanced search capabilities:

  • Full-Text Search: Search across all documents
  • Title Search: Search by page titles
  • Tag Search: Filter by tags and categories
  • Path Search: Search by document path
  • Recent Documents: Quick access to recently modified pages

Templates

Save time with document templates:

  • Pre-built Templates: Ready-to-use templates for common document types
  • Custom Templates: Create your own templates
  • Template Variables: Dynamic content in templates
  • Quick Apply: Apply templates when creating new pages

Import/Export

Move your content easily:

  • Markdown Export: Export entire hierarchies as markdown files
  • JSON Export: Export for backup or migration
  • Markdown Import: Import existing markdown files
  • Bulk Operations: Import/export multiple documents

AI Integration

Leverage AI to enhance your documentation:

  • Content Generation: AI-powered content suggestions
  • Summarization: Automatically summarize long documents
  • Expansion: AI-assisted content expansion
  • Grammar Check: Improve writing quality
  • Translation: Translate documents to other languages

Rich Editing

Write comfortably with a powerful editor:

  • Live Preview: See rendered markdown in real-time
  • Syntax Highlighting: Code syntax highlighting
  • Auto-format: Automatic formatting and indentation
  • Keyboard Shortcuts: Productivity-boosting shortcuts
  • Table Support: Easy table creation and editing

Getting Started

Installation

Install MoLOS-Markdown through the MoLOS module system:

npm link @molos/markdown

Basic Usage

  1. Create a Page: Click "New Page" to create a root-level page
  2. Add Content: Write or paste markdown content
  3. Organize: Create child pages to build your hierarchy
  4. Version: Save creates automatic versions
  5. Search: Use the search bar to find content quickly

Use Cases

MoLOS-Markdown is perfect for many scenarios:

Technical Documentation

  • API documentation
  • Architecture guides
  • Installation instructions
  • User manuals

Knowledge Base

  • Company policies
  • Standard operating procedures
  • Best practices
  • Troubleshooting guides

Personal Notes

  • Journaling
  • Research notes
  • Learning materials
  • Ideas and brainstorming

Project Documentation

  • Project plans
  • Meeting notes
  • Requirements documents
  • Design documents

Module Structure

MoLOS-Markdown is built with a clean, modular architecture:

MoLOS-Markdown/
├── src/
│ ├── lib/
│ │ ├── components/ # UI components
│ │ └── utils/ # Utility functions
│ ├── models/ # Data models
│ ├── routes/ # API endpoints
│ ├── server/
│ │ ├── ai/ # AI tools
│ │ ├── db/ # Database schema
│ │ └── repositories/ # Data access
│ └── stores/ # State management
├── drizzle/ # Database migrations
├── manifest.yaml # Module metadata
└── package.json # Dependencies

Database Schema

The module uses a well-structured database schema:

export const markdownPages = sqliteTable('markdown_pages', {
id: text('id').primaryKey(),
path: text('path').notNull().unique(),
title: text('title').notNull(),
content: text('content').notNull(),
tags: text('tags', { mode: 'json' }).$type<string[]>(),
parentId: text('parent_id').references((): any => markdownPages.id),
userId: text('user_id').notNull(),
createdAt: integer('created_at').notNull(),
updatedAt: integer('updated_at').notNull()
});

export const markdownVersions = sqliteTable('markdown_versions', {
id: text('id').primaryKey(),
pageId: text('page_id').notNull().references(() => markdownPages.id),
version: integer('version').notNull(),
content: text('content').notNull(),
createdAt: integer('created_at').notNull()
});

export const markdownTemplates = sqliteTable('markdown_templates', {
id: text('id').primaryKey(),
name: text('name').notNull(),
description: text('description'),
content: text('content').notNull(),
variables: text('variables', { mode: 'json' }).$type<TemplateVariable[]>(),
isSystem: integer('is_system', { mode: 'boolean' }).notNull().default(false),
userId: text('user_id'),
createdAt: integer('created_at').notNull(),
updatedAt: integer('updated_at').notNull()
});

API Integration

The module provides comprehensive API endpoints:

# Pages
GET /api/markdown # List all pages
POST /api/markdown # Create new page
GET /api/markdown/[id] # Get page details
PUT /api/markdown/[id] # Update page
DELETE /api/markdown/[id] # Delete page

# Versions
GET /api/markdown/[id]/versions # Get page versions
GET /api/markdown/[id]/restore/[version] # Restore version

# Search
GET /api/search?q=query # Search pages

# Import/Export
GET /api/export # Export pages
POST /api/import # Import pages

# Templates
GET /api/templates # List templates
POST /api/templates # Create template
GET /api/templates/[id] # Get template
PUT /api/templates/[id] # Update template
DELETE /api/templates/[id] # Delete template

Quick Notes Feature

MoLOS-Markdown includes a Quick Notes feature inspired by Google Keep:

  • Flat Notes: Simple, quick note-taking
  • Checklists: Interactive checklists within notes
  • Colors: Color-code your notes
  • Pinning: Pin important notes
  • Archiving: Archive completed notes
  • Markdown Support: Full markdown rendering

Benefits

Organized

Keep all your documentation in one place with a clear hierarchy.

Versioned

Never worry about losing changes with automatic version control.

Searchable

Find any document instantly with powerful search capabilities.

Flexible

Use markdown for any type of documentation.

Integrated

Seamlessly integrates with other MoLOS modules.

AI-Powered

Get AI assistance with content creation and editing.

Module Status

MoLOS-Markdown is production-ready at version 1.0.0 and includes:

  • ✅ Hierarchical document management
  • ✅ Version control with restore
  • ✅ Full-text search
  • ✅ Import/export functionality
  • ✅ Template system
  • ✅ AI integration
  • ✅ Quick Notes feature
  • ✅ Rich markdown editor
  • ✅ Comprehensive testing
  • ✅ Full documentation

Future Enhancements

We have exciting plans for future versions:

  • Collaboration: Real-time collaborative editing
  • Comments: Add comments to documents
  • Permissions: Granular access control
  • Workflows: Document approval workflows
  • Automated Backups: Scheduled backups
  • Analytics: Usage analytics and insights
  • Mobile App: Native mobile experience
  • Advanced Formatting: More formatting options

Community

We're building a community around MoLOS-Markdown:

  • Share templates
  • Discuss best practices
  • Provide feedback
  • Contribute to the codebase

Key Commits

What's Next

With the launch of MoLOS-Markdown, we're focusing on:

  1. User Feedback: Gathering and incorporating user feedback
  2. Performance: Optimizing for large document sets
  3. Integration: Enhancing integrations with other MoLOS modules
  4. Mobile: Improving the mobile experience
  5. Documentation: Creating comprehensive user guides
  6. Roadmap: Planning the next major release

MoLOS-Markdown brings powerful document management to MoLOS. Try it out and let us know what you think!