Files
homefeed/backend/package.json
Salastil b5a7a5fabf
Build and push Docker images / backend (push) Failing after 1m5s
Build and push Docker images / frontend (push) Failing after 39s
Add config export/import for moving an instance between hosts
Sources, Tracked Items, Categories, Settings/Connections, Telegram
credentials, and every widget's own settings/data can now be exported
as a single zip from a new Backup tab (GET /api/admin/backup/export)
and loaded onto a fresh instance (POST /api/admin/backup/import) to
reproduce the same configuration — deliberately excludes ingested
items, published articles, media, tags, logs, and synthesis history,
none of which is "how this instance is configured". Widget tables are
discovered generically via the existing widget_<id>_ naming convention
(reused from widgets/sweep.ts) rather than hardcoded per widget, so an
uploaded (non-builtin) widget's code travels too, not just built-ins.

Import is full-replace, gated behind an explicit confirm() describing
the consequences. The one real FK in the schema
(content_items.source_id ON DELETE CASCADE) would otherwise let
replacing sources silently wipe that instance's own ingested content
as a side effect — the import transaction runs with
`PRAGMA foreign_keys = OFF` specifically to prevent that, verified
directly (seeded content_items, ran an import that replaced their
source, confirmed they survived).

Telegram credentials stay encrypted in the zip: the still-encrypted
row travels with the instance's .encryption-key file (exported from
storage/crypto.ts) rather than ever writing the secret out as
plaintext.
2026-08-14 19:56:08 -04:00

34 lines
903 B
JSON

{
"name": "homefeed-backend",
"version": "1.0.0",
"description": "Homefeed backend — ingestion, clustering, synthesis, and the public/admin API",
"type": "module",
"main": "dist/index.js",
"scripts": {
"dev": "tsx watch --env-file=.env src/index.ts",
"build": "tsc",
"start": "node --experimental-sqlite dist/index.js",
"typecheck": "tsc --noEmit"
},
"license": "UNLICENSED",
"dependencies": {
"@fastify/cookie": "^11.1.2",
"@fastify/cors": "^11.3.0",
"@fastify/multipart": "^10.1.1",
"@mozilla/readability": "^0.6.0",
"adm-zip": "^0.6.0",
"fastify": "^5.10.0",
"jsdom": "^29.1.1",
"rss-parser": "^3.13.0",
"telegram": "^2.26.22",
"undici": "^7.28.0"
},
"devDependencies": {
"@types/adm-zip": "^0.5.8",
"@types/jsdom": "^28.0.3",
"@types/node": "^26.1.1",
"tsx": "^4.23.0",
"typescript": "^7.0.2"
}
}