2026-02-19 09:49:33 +01:00
2026-02-19 09:49:33 +01:00
2026-02-10 11:04:44 +01:00
2026-02-19 09:40:12 +01:00
2026-02-19 09:40:12 +01:00
2026-02-15 22:43:55 +01:00
2026-02-10 13:14:20 +01:00
2026-02-17 22:26:45 +01:00
2026-02-10 11:04:44 +01:00
2026-02-10 11:04:44 +01:00
2026-02-10 11:04:44 +01:00
2026-02-14 10:12:37 +01:00
2026-02-10 16:38:20 +01:00

Blogging Desktop Server (bDS)

A desktop blogging application with offline-first capabilities.

Features

  • Offline-First: All data is stored locally in SQLite, works without internet
  • VS Code-Inspired UI: Familiar, clean interface with activity bar, sidebar, and editor
  • Markdown Posts: Write blog posts in Markdown with YAML frontmatter
  • Media Management: Import and manage images with metadata sidecar files
  • Clean Architecture: Engine classes handle business logic, UI is purely presentational

Architecture

src/
├── main/                  # Electron main process
│   ├── database/         # Drizzle ORM schema and connection
│   ├── engine/           # Business logic engines
│   │   ├── PostEngine    # Post CRUD, file operations
│   │   ├── MediaEngine   # Media import/management
│   │   └── TaskManager   # Async task handling
│   ├── ipc/              # IPC handlers for renderer communication
│   └── main.ts           # App entry point
│
└── renderer/             # Electron renderer process (React)
    ├── components/       # UI components (VS Code style)
    ├── store/            # Zustand state management
    └── styles/           # Global CSS variables

Data Storage

All user data is stored in the application's user data folder:

  • Database: {userData}/bds.db - SQLite database with post/media metadata
  • Posts: {userData}/posts/*.md - Markdown files with YAML frontmatter
  • Media: {userData}/media/ - Image files with .meta sidecar files

Post Format

---
id: uuid-here
title: "My Blog Post"
slug: my-blog-post
status: draft
author: John Doe
createdAt: 2024-01-15T10:30:00.000Z
updatedAt: 2024-01-15T10:30:00.000Z
tags: ["javascript", "tutorial"]
categories: ["development"]
---

# My Blog Post

Your markdown content here...

Media Sidecar Format

---
id: uuid-here
originalName: "photo.jpg"
mimeType: image/jpeg
size: 102400
width: 1920
height: 1080
alt: "A beautiful sunset"
caption: "Sunset over the mountains"
createdAt: 2024-01-15T10:30:00.000Z
updatedAt: 2024-01-15T10:30:00.000Z
tags: ["nature", "sunset"]
---

Canonical formats for new content:

  • Post links: /YYYY/MM/DD/slug (example: /2025/02/16/my-post)
  • Media links: /media/YYYY/MM/file.ext (example: /media/2025/02/photo.jpg)

Also supported (legacy/alternative input formats):

  • Post links: /posts/slug, /posts/YYYY/MM/slug, post/slug, post/YYYY/MM/slug
  • Media links: media/YYYY/MM/file.ext

Preview HTML generation rewrites supported post/media link formats to preview-routable URLs. Markdown source remains unchanged except when inserting new media links from the editor, which now use /media/....

Development

Prerequisites

  • Node.js 18+
  • npm or yarn

Setup

# Install dependencies
npm install

# Start development mode
npm run dev

# In another terminal, start Electron
npm start

Building

# Build for production
npm run build

# Package for distribution (uses electron-builder)
npx electron-builder

Keyboard Shortcuts

Shortcut Action
Ctrl+N New Post
Ctrl+S Save
Ctrl+B Toggle Sidebar
Ctrl+J Toggle Panel
Ctrl+1 View Posts
Ctrl+2 View Media
Ctrl+Shift+P Publish Selected

License

MIT

Description
Blogging Desktop Server - Typescript version
Readme MIT 5.9 MiB
Languages
TypeScript 94.8%
CSS 4.6%
Liquid 0.3%
JavaScript 0.2%