Skip to content

zhonglike/MyBlog

Repository files navigation

MyBlog

ไธญๆ–‡ | English Using AI to assist in creation

A modern, self-hosted personal blog system built with Node.js + Express 5 + SQLite (better-sqlite3).

Version: V1.7-9beta Requires Node.js environment https://nodejs.org/en/download

๐ŸŒ Default language is English. Switch to Chinese in Settings โ†’ Appearance โ†’ Language.

Features

  • Blog Posts โ€” Write and manage posts with Markdown support (powered by markdown-it), including rich media embedding
  • Categories โ€” Built-in categories: Games, Tech, Notes, Gallery, Videos, Resources, with customizable icons
  • Media Management โ€” Upload and manage images, videos, and files with type-based restrictions
  • Multi-Theme โ€” Dark, Light, and Cyber themes; switchable in real-time
  • AI Assistant โ€” Built-in AI chat powered by OpenAI-compatible APIs; supports general chat, news, game guides, and Delta Force expertise
  • Video Pool โ€” Daily randomized video recommendations with group tagging (e.g., Delta Force)
  • Authentication โ€” JWT-based login with optional secondary password protection
  • Data Export โ€” One-click backup of your entire blog (database + media) as a ZIP archive
  • Image Lightbox โ€” Full-screen image viewer for gallery browsing
  • SPA Architecture โ€” Single-page application with smooth client-side routing
  • External Access โ€” Cloudflare Tunnel support for public internet access (via cloudflared)

Tech Stack

Layer Technology
Backend Node.js, Express 5
Database SQLite (better-sqlite3, WAL mode)
Frontend Vanilla JS, HTML, CSS
Auth JWT + bcryptjs
AI OpenAI-compatible API
Media multer (file uploads)
Tunnel Cloudflare Tunnel (cloudflared)

Quick Start

Prerequisites

  • Node.js >= 16

Install & Run

# Clone the repository
git clone https://github.com/your-username/myblog.git
cd myblog

# Install dependencies
npm install

# Start the server (internal network, port 3000)
npm start
ๆœ‰ๆฆ‚็އๅฎ‰่ฃ…ๅŒ…้‡Œๆœ‰

Open http://localhost:3000 in your browser.

External Access (Optional)

node start-tunnel.js

This starts the server together with a Cloudflare Tunnel, providing a public URL.

Configuration

Edit config.js to customize:

  • Server port and host
  • JWT secret & expiration
  • Database path
  • Upload directories and file size limits
  • Allowed file types (images, videos, documents)
  • Default categories
  • AI endpoint and model

Screenshots

(Add screenshots here)

License

ISC

About

๐Ÿš€ Self-hosted personal blog โ€” Node.js + Express + SQLite. ๐Ÿ“ Markdown posts, ๐Ÿ–ผ๏ธ media uploads, ๐ŸŽจ 3 themes, ๐Ÿค– AI assistant, ๐ŸŽฌ video recommendations, ๐Ÿ” JWT auth + secondary password, ๐Ÿ’พ one-click backup, ๐ŸŒ Cloudflare Tunnel for public access.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors