Skip to content

A powerful, self-hosted Personal Knowledge Management system that rivals Obsidian. Built with Next.js and TypeScript, MarkItUp transforms markdown editing into a comprehensive second brain for organizing, linking, and discovering your thoughts.

License

Notifications You must be signed in to change notification settings

xclusive36/MarkItUp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

462 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

MarkItUp PKM – Personal Knowledge Management System

A powerful, self-hosted Personal Knowledge Management system that rivals Obsidian. Built with Next.js and TypeScript, MarkItUp transforms markdown editing into a comprehensive second brain for organizing, linking, and discovering your thoughts.

Screenshot

πŸ†• What's New

v4.0.0 - November 2025 πŸš€

  • πŸ” User Authentication & Authorization - Secure multi-user support with JWT sessions
  • 🧭 Unified AI Settings - Centralized configuration across all AI features
  • πŸ›‘οΈ Enhanced Security - Improved CSP headers and Docker/Ollama compatibility
  • πŸ€– AI Robustness - Better JSON parsing and proxy diagnostics
  • οΏ½ Optional Volume Mounts - Simplified deployment for managed hosting scenarios

Breaking Change: Authentication now required by default. See docs/MIGRATION_4_0.md for migration guide or set DISABLE_AUTH=true for single-user mode.

Recent Highlights

  • ✨ WYSIWYG Editor - Rich text editing with TipTap
  • οΏ½ Intelligent Link Suggester - AI-powered wikilink suggestions with real-time analysis
  • πŸ“š Spaced Repetition - Scientific flashcard system with FSRS algorithm
  • πŸ€– Universal AI Support - OpenAI, Anthropic, Gemini, or Ollama (100% local/private)
  • οΏ½ Semantic Search - Browser-based ML for meaning-based discovery
  • 🀝 Real-time Collaboration - Multi-user editing with WebSocket sync

See CHANGELOG.md for complete version history.

πŸš€ Quick Start

git clone https://github.com/xclusive36/MarkItUp.git
cd MarkItUp
npm install
npm run dev

Visit http://localhost:3000 and start building your knowledge base!

✨ Key Features

πŸ“š Core Knowledge Management

  • Bidirectional Linking - Connect notes with [[wikilinks]] and automatic backlinks
  • Knowledge Graph - Visual exploration with 3D force-directed layouts
  • Advanced Search - Full-text search with operators (tag:, folder:, exact phrases)
  • Semantic Search - AI-powered vector search finds related content by meaning, not just keywords:
    • 🧠 Browser-Based ML - Client-side embeddings using Transformers.js (no server required!)
    • πŸ” Similarity Discovery - Find related notes based on semantic similarity
    • πŸ“Š Progress Tracking - Real-time indexing with visual progress indicators
    • πŸ’Ύ IndexedDB Storage - Efficient persistent storage for embeddings
    • ⚑ Fast Search - Sub-100ms queries for typical collections
    • 🎯 Mode Toggle - Switch between keyword and semantic search instantly
    • πŸ”’ 100% Private - All processing happens locally in your browser
    • βš™οΈ Configurable - Batch size, auto-indexing, and more in settings
  • Smart Tagging - Organize with #tags and automatic indexing
  • Real-time Analytics - Track your knowledge growth

πŸ€– AI-Powered Intelligence

All AI features work with your choice of provider (OpenAI, Anthropic, Gemini, or Ollama):

  • Intelligent Link Suggester - AI finds connection opportunities in your knowledge base:
    • πŸ” Context-aware wikilink suggestions with confidence scoring
    • πŸš€ Batch orphan analysis for vault-wide optimization
    • πŸ’‘ Visual context preview shows where links will be inserted
    • ⚑ Real-time suggestions while typing (optional)
    • 🧠 Pattern learning adapts to your preferences
    • πŸŒ‰ Bridge note suggestions to connect isolated clusters
    • πŸ“Š Knowledge base health visualization
  • Context-Aware AI Chat - AI assistant that understands your knowledge graph
  • Writing Assistant - Advanced content analysis and improvement suggestions
  • Knowledge Discovery - AI-powered gap analysis and content recommendations
  • Research Assistant - Semantic search with intelligent note creation
  • Multi-Provider Support - Choose once, use everywhere: OpenAI (GPT-4, GPT-3.5), Anthropic (Claude 3.5), Google Gemini (1.5 Pro/Flash), or Ollama (local AI)

🏠 Ollama Local AI (Privacy-First)

MarkItUp features the most comprehensive Ollama integration in any PKM system:

  • 🌊 Real-Time Streaming - Progressive response display with Server-Sent Events
  • πŸ“Š Model Management - Download, delete, and refresh models directly from the UI
  • πŸ”Œ Connection Testing - One-click server verification with detailed status (no CORS errors!)
  • βš™οΈ Advanced Parameters - Fine-tune context window, GPU layers, repeat penalty, and more
  • πŸ“¦ Enhanced Model Details - View size, parameter count (7B/13B/70B), and quantization levels
  • πŸ’Ύ Zero Cost - No API keys, no usage limits, completely free local AI
  • πŸ”’ Complete Privacy - All data stays on your machine, no external API calls
  • πŸš€ Model Library - Browse and install popular models (Llama 3.2, Mistral, CodeLlama, etc.)
  • 🎯 Custom Servers - Connect to remote Ollama instances with saved presets
  • πŸ“ˆ Performance Metrics - Track tokens/second, response times, and model efficiency
  • πŸ›‘οΈ Seamless Integration - Built-in CORS proxy for error-free connections (no Ollama config needed!)

Getting Started with Ollama:

  1. Install Ollama: brew install ollama (macOS) or visit ollama.ai
  2. Start server: ollama serve
  3. Pull a model: ollama pull llama3.2 or use MarkItUp's UI
  4. Select "Ollama (Local)" in AI Settings - no API key needed!

Why Choose Ollama?

  • 100% private - ideal for sensitive knowledge bases
  • Offline capable after model download
  • No monthly costs or token limits
  • Full control over AI infrastructure
  • Supports 50+ open-source models

🀝 Real-time Collaboration

  • Multi-user Editing - Real-time collaborative editing with conflict resolution
  • Live Presence - See other users' cursors and selections
  • WebSocket Sync - Low-latency synchronization via Socket.IO
  • Session Sharing - Easy document sharing with secure links

πŸ”Œ Extensible Plugin System

  • Rich Plugin API - Custom functionality, commands, and processors
  • Settings Management - Configurable plugin settings with persistence
  • Content Processors - Transform content during import/export
  • Event System - Plugin communication through events

πŸ“ Advanced Markdown Features

  • WYSIWYG Editor - Rich text editing with TipTap, seamless markdown conversion
  • Multi-mode Editor - Edit, preview, split-view, or WYSIWYG modes
  • LaTeX Math - Inline $math$ and block $$math$$ equations
  • TikZ Diagrams - Create vector graphics directly in markdown
  • GitHub Flavored Markdown - Tables, task lists, and more

πŸ“š Documentation

Topic Description
🎯 Features Complete feature overview and capabilities
βš™οΈ Installation Detailed setup and configuration guide
πŸ“– User Guide How to use PKM features effectively
πŸ€– AI Features AI setup and advanced capabilities
🀝 Collaboration Real-time editing and sharing
πŸ”Œ Plugin System Using and developing plugins
🐳 Deployment Docker and production hosting
πŸ”§ API Reference Technical documentation
βš–οΈ Comparison MarkItUp vs Obsidian and others

πŸ† Why MarkItUp PKM?

🌐 Web-Native: Access from any device with a browser - no app installation required

🏠 Complete Privacy: Self-hosted solution means your data never leaves your control

πŸ”— Built for Connection: Native wikilinks, backlinks, and graph visualization

⚑ Modern Stack: Built with Next.js 16 and TypeScript for speed and reliability

πŸ†“ Truly Free: Open-source with no licensing fees or feature restrictions

πŸš€ Extensible: Modern plugin architecture for unlimited customization

πŸ€– AI Provider Comparison

MarkItUp offers the most flexible AI integration in any PKM system:

Feature OpenAI Anthropic Gemini Ollama
Streaming βœ… βœ… βœ… βœ…
API Key Required βœ… Yes βœ… Yes βœ… Yes ❌ None
Cost $0.002-0.03/1K tokens $0.003-0.015/1K tokens $0.000075-0.00125/1K tokens πŸ†“ Free
Context Window 128K tokens 200K tokens πŸš€ 1M tokens Varies by model
Model Management ❌ ❌ ❌ βœ… Yes
Advanced Options βœ… βœ… βœ… βœ… 8+ params
Privacy (Local) ❌ Cloud ❌ Cloud ❌ Cloud βœ… 100% Local
Connection Health βœ… ❌ βœ… βœ… Yes
Offline Mode ❌ ❌ ❌ βœ… Yes
Performance Tracking βœ… βœ… βœ… βœ… Yes
Usage Limits Pay per use Pay per use Pay per use βœ… Unlimited

Choose the right provider for your needs:

  • OpenAI - Most capable general-purpose AI (GPT-4)
  • Anthropic - Long context windows, ethical AI (Claude 3.5)
  • Gemini - Most cost-effective with massive 1M token context (Gemini 1.5 Pro/Flash)
  • Ollama - Complete privacy, zero cost, offline capable (50+ models)

🐳 Quick Deploy

Docker Compose (Recommended)

⚠️ REQUIRED: Generate secure secrets before deploying:

# Generate JWT_SECRET
openssl rand -base64 32

# Generate ENCRYPTION_KEY
openssl rand -hex 16

Create docker-compose.yml:

version: "3.8"

services:
  markitup:
    container_name: markitup
    ports:
      - 3000:3000
    # volumes:
      # Optional: Uncomment to persist markdown files on host filesystem
      # Note: Requires chmod 777 ./markdown for write permissions
      # For managed hosting or ephemeral deployments, leave commented
      # - ./markdown:/app/markdown
    environment:
      - PORT=3000
      - HOSTNAME=0.0.0.0
      - NODE_ENV=production
      # REQUIRED: Replace with your generated secrets
      - JWT_SECRET=your-generated-jwt-secret-here
      - ENCRYPTION_KEY=your-generated-encryption-key-here
      # Optional: Disable auth for testing (NOT FOR PRODUCTION)
      # - DISABLE_AUTH=false
    restart: unless-stopped
    image: ghcr.io/xclusive36/markitup:latest
docker compose up -d

Docker CLI

# Generate secrets
JWT_SECRET=$(openssl rand -base64 32)
ENCRYPTION_KEY=$(openssl rand -hex 16)

# Run without persistent storage (default)
docker run --name markitup -p 3000:3000 \
  -e JWT_SECRET="$JWT_SECRET" \
  -e ENCRYPTION_KEY="$ENCRYPTION_KEY" \
  --restart unless-stopped \
  ghcr.io/xclusive36/markitup:latest

# OR with persistent storage
docker run --name markitup -p 3000:3000 \
  -v ./markdown:/app/markdown \
  -e JWT_SECRET="$JWT_SECRET" \
  -e ENCRYPTION_KEY="$ENCRYPTION_KEY" \
  --restart unless-stopped \
  ghcr.io/xclusive36/markitup:latest

πŸ“¦ Data Persistence (Optional)

By default, data lives in the container. To persist data on your host:

  1. Uncomment the volume mount in docker-compose.yml or add -v ./markdown:/app/markdown to docker run
  2. Set permissions:
# Easy method (all users can write)
chmod -R 777 ./markdown

# Secure method (container user only)
sudo chown -R 1001:1001 ./markdown

For managed hosting, skip volume mounts and implement alternative storage (S3, database, etc.)

πŸ” Authentication Configuration

MarkItUp supports both multi-user authenticated mode (default, recommended) and single-user unauthenticated mode for personal self-hosted deployments.

Default: Multi-User Mode (Recommended)

Features:

  • βœ… Secure user isolation - each user has their own /markdown/user_{id}/ directory
  • βœ… User management with signup, login, and session handling
  • βœ… Per-user quotas and usage tracking
  • βœ… Audit logs showing who modified what
  • βœ… Collaborative features (sharing, permissions)

Requirements:

  • Set JWT_SECRET and ENCRYPTION_KEY environment variables
  • Users must sign up and log in

Single-User Mode (DISABLE_AUTH=true)

For personal self-hosted instances where you're the only user:

# docker-compose.yml
environment:
  - DISABLE_AUTH=true

What This Does:

  • βœ… No signup/login required - instant access
  • βœ… All files stored in /markdown/ root directory
  • βœ… Simpler setup for single-user scenarios
  • ⚠️ No user isolation - all data is shared
  • ⚠️ No access control - anyone with network access can read/write
  • ⚠️ No audit trail - can't track who changed what
  • ⚠️ Limited features - collaboration and sharing disabled

⚠️ SECURITY WARNINGS:

🚨 DISABLE_AUTH=true means:
   β€’ Anyone who can reach your server can access ALL your notes
   β€’ No password protection whatsoever
   β€’ No way to restrict who can create, edit, or delete files
   β€’ All AI Chat file operations affect the shared directory
   β€’ Should ONLY be used for:
     - Personal single-user deployments
     - Localhost-only access
     - Development/testing
     - Networks you completely trust

When to Use Each Mode:

Scenario Recommended Mode
Personal use, only you access it Either (DISABLE_AUTH is fine)
Exposing to the internet Multi-user ONLY
Sharing with family/team Multi-user ONLY
Untrusted network Multi-user ONLY
Development/testing DISABLE_AUTH is convenient

Best Practices for DISABLE_AUTH=true:

  1. Network Isolation: Only expose on localhost or trusted LAN
  2. Firewall Rules: Block external access at network level
  3. Reverse Proxy: Use nginx/Caddy with basic auth if internet-facing
  4. Regular Backups: No audit log means you can't recover from mistakes
  5. Single User Only: Never use for multi-user scenarios

Migration: You can switch between modes anytime. Existing data in /markdown/ will work in both modes, though user-specific folders (/markdown/user_*/) are only used in multi-user mode.

🀝 Contributing

We welcome contributions! Please see our contribution guidelines for details.

πŸ“„ License

MIT License - see LICENSE file for details.


⭐ Star this repo if you find MarkItUp useful!

Built with ❀️ by the MarkItUp community

About

A powerful, self-hosted Personal Knowledge Management system that rivals Obsidian. Built with Next.js and TypeScript, MarkItUp transforms markdown editing into a comprehensive second brain for organizing, linking, and discovering your thoughts.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages