Architecting an Offline‑First Swedish Verbs Learning App with Node.js, Lit & SQLite

1. Overview Svenska Verb This app is a focused, offline‑capable Swedish verb learning tool. It combines a lean Node.js backend (synchronization + licensing + snapshot generation) with a Vite/TypeScript frontend built entirely from custom Web Components—no heavyweight SPA framework. Data flows through a snapshot/verification pipeline backed by SQLite for determinism and easy recovery. The goal: minimize moving parts while keeping future extensibility (custom verbs, SRS scheduling, multi‑language overlays) straightforward. 2. Architecture at a Glance Front-End (Vite + TS + Web Components) ├─ State & Caching: src/services/storage.ts ├─ Migration Logic: src/services/migration.ts ├─ Sync Client: src/services/sync.ts ├─ Licensing: src/services/license.ts └─ UI Components: src/components/*.ts │ ▼ Node.js Sync / API Server ├─ server.ts (HTTP endpoints) ├─ db.ts (SQLite access) ├─ snapshots.db (+ WAL/SHM) └─ Data Generation / Repair Scripts (scripts/*.js|ts) │ ▼ Source Datasets ├─ data/verbs.json └─ Generated examples / translations Core Principles: ...

November 3, 2025 · 6 min · Aleksandr Likhachev