Skip to content

Repository files navigation

Miniblog

A self-hosted, minimal blog platform with an advanced markdown editor, role-based access control, and dynamic OG image generation. Built with Astro SSR + SQLite.

Homepage

Features

  • Pure Astro SSR with Node standalone adapter
  • Bun runtime and package manager
  • Drizzle ORM + SQLite via libsql
  • Lucia Auth v3 with cookie-based sessions and Bcrypt
  • Tailwind CSS v4 with CSS-first configuration
  • Split-pane Markdown Editor with live preview
  • Role-Based Access Control (Owner, Admin, User)
  • Open Graph image generation per post
  • Dark/Light Mode with system preference support
  • View Transitions for smooth navigation
  • Responsive Design for all devices
  • Sitemap auto-generation
  • Docker ready for self-hosting

Screenshots

Homepage

The clean, minimal homepage lists all published posts with reading time estimates and author attribution.

Light ModeDark Mode
LightDark

Blog Post

Posts are rendered with full markdown support including headings, bold text, lists, code blocks, blockquotes, and tag badges.

Blog Post

Admin Dashboard

The dashboard provides a complete overview of all posts with status badges, filtering, sorting, and quick actions for editing and deleting.

Dashboard

Markdown Editor

The split-pane editor features live markdown preview, import/export support, post settings (slug, excerpt, tags, publish date, status), and a resizable layout.

Editor

Login

Simple, clean authentication with username and password. Supports registration for new users.

Login

Getting Started

Prerequisites

  • Bun installed
  • Docker (optional, for containerized deployment)

Environment Setup

Create a .env file:

DB_FILENAME=miniblog.dbOWNER_CREDENTIALS=admin:$2y$10$...HOST=0.0.0.0PORT=4321NODE_ENV=production

Generate the OWNER_CREDENTIALS hash with htpasswd:

htpasswd -nbB -C 10 username password

Installation

bun install

Database Setup

bun run db:push

Development

bun run dev

Build & Run

bun run build
bun dist/server/entry.mjs

Testing

Tests run using a separate dev database.

bun run test# Unit tests (Vitest)
bun run test:e2e # E2E tests (Playwright)
bun run test:all # Run both

Docker

docker compose up --build

Or pull from the registry:

docker pull ghcr.io/hekpyto/miniblog

Tech Stack

LayerTechnology
FrameworkAstro v5 (SSR)
StylingTailwind CSS v4 + @tailwindcss/typography
DatabaseSQLite via @libsql/client
ORMDrizzle ORM
AuthLucia v3 + oslo (Bcrypt)
Markdownmarkdown-it + Shiki (dual-theme syntax highlighting)
OG ImagesSatori + Sharp
RuntimeBun
TestingVitest + Playwright
CI/CDGitHub Actions

RBAC

RoleAccess
OwnerFull access including user management
AdminDashboard and editor
UserPublic pages only

About

A self-hosted, minimal blog platform with a markdown editor, RBAC, and OG image generation. Built with Astro SSR + SQLite

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages