Index: src/services/CircleService.js
===================================================================
--- src/services/CircleService.js	(revision 0091cb77d389e73218336782b310d2f000e2579a)
+++ src/services/CircleService.js	(revision 57929aaab80d03a3b7ca89b30a1687c618e5b5e8)
@@ -47,18 +47,27 @@
 }
 
-const upsertActor = db.prepare(`
-  INSERT INTO remote_actors (id, url, name, summary, avatar, public_key, fetched_at)
-  VALUES (@id, @url, @name, @summary, @avatar, @public_key, CURRENT_TIMESTAMP)
-  ON CONFLICT(id) DO UPDATE SET
-    url=excluded.url, name=excluded.name, summary=excluded.summary,
-    avatar=excluded.avatar, public_key=excluded.public_key, fetched_at=CURRENT_TIMESTAMP
-`);
-const upsertPost = db.prepare(`
-  INSERT INTO remote_posts (id, actor_id, published, title, summary, url, media_json, raw_json, fetched_at)
-  VALUES (@id, @actor_id, @published, @title, @summary, @url, @media_json, @raw_json, CURRENT_TIMESTAMP)
-  ON CONFLICT(id) DO UPDATE SET
-    published=excluded.published, title=excluded.title, summary=excluded.summary,
-    url=excluded.url, media_json=excluded.media_json, raw_json=excluded.raw_json, fetched_at=CURRENT_TIMESTAMP
-`);
+// Lazy prepares — de tabellen bestaan pas ná initializeDatabase(); dit module
+// wordt geïmporteerd vóór die call, dus niet op module-niveau prepare'n.
+let _stmts = null;
+function stmts() {
+  if (_stmts) return _stmts;
+  _stmts = {
+    upsertActor: db.prepare(`
+      INSERT INTO remote_actors (id, url, name, summary, avatar, public_key, fetched_at)
+      VALUES (@id, @url, @name, @summary, @avatar, @public_key, CURRENT_TIMESTAMP)
+      ON CONFLICT(id) DO UPDATE SET
+        url=excluded.url, name=excluded.name, summary=excluded.summary,
+        avatar=excluded.avatar, public_key=excluded.public_key, fetched_at=CURRENT_TIMESTAMP
+    `),
+    upsertPost: db.prepare(`
+      INSERT INTO remote_posts (id, actor_id, published, title, summary, url, media_json, raw_json, fetched_at)
+      VALUES (@id, @actor_id, @published, @title, @summary, @url, @media_json, @raw_json, CURRENT_TIMESTAMP)
+      ON CONFLICT(id) DO UPDATE SET
+        published=excluded.published, title=excluded.title, summary=excluded.summary,
+        url=excluded.url, media_json=excluded.media_json, raw_json=excluded.raw_json, fetched_at=CURRENT_TIMESTAMP
+    `),
+  };
+  return _stmts;
+}
 
 export async function syncOne(link) {
@@ -81,5 +90,5 @@
   }
 
-  upsertActor.run({
+  stmts().upsertActor.run({
     id: actorId,
     url: actor.url || base,
@@ -116,5 +125,5 @@
       }
     }
-    upsertPost.run({
+    stmts().upsertPost.run({
       id: obj.id,
       actor_id: actorId,
