When we built Keyfern, our licensing server for desktop apps, we set one hard constraint: zero npm dependencies on the backend.
Instead of spinning up Redis, microservices, and an ORM, the entire server is around 2,200 lines of Node.js 24 running against a single SQLite file in WAL mode behind Caddy on one VPS.
Right now it handles our first live desktop product (VistaSculpt) in production with 4,300+ issued keys, 3,600+ registered machines, and peaks over 1,200 daily API checks without any performance bottleneck.
Here are the three technical choices that keep it fast and predictable:
Native Node 24 builtins only
Usingnode:sqlite,node:crypto, and nativefetcheliminates dependency churn, supply-chain surprises, and internal network hops between app and DB. SQLite in WAL mode reads and validates directly in-process.Asymmetric Ed25519 signing instead of shared client secrets
Every/v1/activateand/v1/validateresponse is signed server-side using a per-product Ed25519 private key (encrypted at rest with AES-256-GCM). Client apps embed only the public key, verify an anti-replay nonce, and check clock rollback (>1 hour backward).Optional offline leases (
lease_days)
Offline mode is disabled by default (lease_days = 0). When a developer enables a lease window (1 to 3,650 days), the desktop app caches the signed payload locally and skips network checks on subsequent launches until the lease expires. That keeps server load minimal and prevents locking out legitimate offline users.
We published official packages on npm (npm install keyfern), PyPI (pip install keyfern), and NuGet (Keyfern), plus a live browser WebCrypto demo on our homepage at keyfern.com/#demo where you can inspect a signed payload and watch verification fail if a bit is altered.
Curious how others here structure SQLite WAL backups or IP rate-limiting when running single-node production APIs.
Top comments (0)