voip.ms Messages: Signal-style desktop SMS client

Electron + React app that imports the full voip.ms SMS history into a
local SQLite/FTS5 database, polls for new messages, sends SMS, resolves
names/photos from GNOME EDS address books, and supports global and
per-chat search with jump-to-message.

Data lives in ~/Documents/voipms-desktop-data (covered by Deja Dup) with
daily consistent snapshots.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-17 21:25:12 -07:00
co-authored by Claude Opus 5
commit 241a44f0ee
47 changed files with 10956 additions and 0 deletions
+52
View File
@@ -0,0 +1,52 @@
// Where the data lives + non-secret preferences.
//
// The message database defaults to ~/Documents/voipms-desktop-data so Déjà Dup
// backs it up (it excludes ~/.config, ~/.local and ~/.cache). A small pointer
// file in Electron's userData remembers a custom location if one is chosen.
import { app } from 'electron'
import fs from 'node:fs'
import path from 'node:path'
import type { Settings } from '@shared/types'
const DEFAULTS: Settings = {
pollSeconds: 30,
dids: [],
backfillFloor: '2010-01-01'
}
const pointerFile = (): string => path.join(app.getPath('userData'), 'data-location.json')
export function defaultDataDir(): string {
return path.join(app.getPath('documents'), 'voipms-desktop-data')
}
export function getDataDir(): string {
if (process.env['VOIPMS_DATA_DIR']) return process.env['VOIPMS_DATA_DIR']
try {
const { dataDir } = JSON.parse(fs.readFileSync(pointerFile(), 'utf8')) as { dataDir: string }
if (dataDir) return dataDir
} catch {
/* default */
}
return defaultDataDir()
}
export function setDataDir(dir: string): void {
fs.mkdirSync(path.dirname(pointerFile()), { recursive: true })
fs.writeFileSync(pointerFile(), JSON.stringify({ dataDir: dir }, null, 2))
}
const settingsFile = (): string => path.join(getDataDir(), 'settings.json')
export function loadSettings(): Settings {
try {
return { ...DEFAULTS, ...(JSON.parse(fs.readFileSync(settingsFile(), 'utf8')) as Partial<Settings>) }
} catch {
return { ...DEFAULTS }
}
}
export function saveSettings(s: Settings): void {
fs.mkdirSync(getDataDir(), { recursive: true })
fs.writeFileSync(settingsFile(), JSON.stringify(s, null, 2))
}