Markdown Explorer
Markdown Explorer is a full-stack reference application for browsing a secure Markdown knowledge base.
The Express backend authenticates users, indexes .md files inside the /content directory, and exposes JWT-protected endpoints for tree browsing, file previews, search, and health checks. The Vue 3 + Vite frontend delivers a dark-themed dashboard with real-time search, an expandable file tree, and Markdown rendering powered by marked, DOMPurify, and Tailwind Typography.
๐ฆ Project Structure
project/
โโ backend/ # Express API, JWT auth, markdown indexer
โโ frontend/ # Vue 3 + Vite UI with TailwindCSS
โโ content/ # Markdown documents (watched by backend)
โโ .env.example # Sample configuration
โโ Dockerfile #...
Markdown Explorer
Markdown Explorer is a full-stack reference application for browsing a secure Markdown knowledge base.
The Express backend authenticates users, indexes .md files inside the /content directory, and exposes JWT-protected endpoints for tree browsing, file previews, search, and health checks. The Vue 3 + Vite frontend delivers a dark-themed dashboard with real-time search, an expandable file tree, and Markdown rendering powered by marked, DOMPurify, and Tailwind Typography.
๐ฆ Project Structure
project/
โโ backend/ # Express API, JWT auth, markdown indexer
โโ frontend/ # Vue 3 + Vite UI with TailwindCSS
โโ content/ # Markdown documents (watched by backend)
โโ .env.example # Sample configuration
โโ Dockerfile # Multi-stage build for API + UI
โโ docker-compose.yml
โ Prerequisites
- Node.js 18+ (Node 20 recommended)
- npm 9+
- Docker (optional for containerized runs)
- Copy
.env.exampleto.envand adjust credentials, JWT secret, and API base URL - Place Markdown documents under
content/; only.mdfiles are indexed
๐ Local Development
# install shared dependencies (frontend + backend workspaces)
npm install
# launch both dev servers with hot reload
npm run dev
- Frontend โ http://localhost:5173 (Vite + Tailwind hot reload)
- Backend โ http://localhost:5000 (JWT auth via
/api/login, file routes under/api/files) - Default credentials:
admin/changeme(update.envbefore production)
๐ณ Docker Workflow
# build and start both containers
docker-compose up --build
- UI served at
http://localhost:8080(setFRONTEND_PORTin.envto override) - API available at
http://localhost:5000 - Local
content/directory mounted into backend for live updates
Stop everything with:
docker-compose down
๐ง Useful Commands
npm run build --workspace frontendโ build production assetsnpm run start --workspace backendโ run Express API in production modenpm install --workspace frontendโ reinstall frontend deps (e.g., after Tailwind plugin changes)
๐ Exposing Your Local Server to the Internet
- Option A โ Ngrok (fastest start)
- Option B โ Cloudflare Tunnel (stable URL, free)
๐ Roadmap
- UI for mobile devices
- Access to the link
๐ฉบ Troubleshooting
- Port already in use? Stop local dev servers or override
PORT/FRONTEND_PORTin.envbefore rebuilding - Docker deep-link 404s? Rebuild so nginx copies the SPA fallback config (
docker-compose up --build) - Search not updating while typing? Restart Vite or rebuild Docker images to pick up the latest bundle
- Front matter blocks (
--- ... ---) inside Markdown files are stripped server-side, so only article content renders
๐ License
Released under the MIT License. See LICENSE for the full text.
๐