All checks were successful
CD / Build and push images (push) Successful in 3m5s
CI / Lint, typecheck, test (push) Successful in 2m19s
CI / Auth e2e pack (push) Successful in 2m51s
CI / Build container images (push) Has been skipped
CD / Deploy to Test (push) Successful in 9s
CD / Smoke tests against Test (push) Successful in 1m13s
CD / Promote to Int (push) Successful in 12s
Full-text search behind a swappable interface (ADR 0010).
- prisma: `page_content_cache.search_vector tsvector` (Unsupported column);
migration adds it plus a GIN index (raw SQL — the index is a production
perf optimization; correctness holds without it, so schema-pushed test DBs
work unchanged).
- shared: `normalizeForSearch` (NFKD + strip diacritics + lowercase) folds
both the indexed text and the query, so 'Baume' finds 'Bäume' without the
Postgres `unaccent` extension; search query schema + result view + highlight
sentinels.
- api search module:
- abstract `SearchProvider` (DI token: indexPage / removePage / search /
reindexAll) so an external engine can replace the binding — a fake proves
the seam in a test.
- `PostgresSearchProvider`: weighted vector (title A, labels B, body C),
`websearch_to_tsquery`, `ts_headline` snippets, results filtered to the
ponds the user may read; `GET /search?q=&pondId=&labels=`.
- `search:reindex` CLI (rebuilds from the content cache, idempotent).
- reindex hooks: page create/rename (title) and label assign/unassign/
rename/delete (labels are weight-B).
- collab: the persistence hook maintains `search_vector` in the same
transaction as the content cache (same weighting, normalized).
- tests: shared normalize/schema; api db (title ranks above body, highlight,
diacritic-insensitive match, permission filter, idempotent reindex) and the
fake-provider DI test; collab persistence already covers the write path.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PGdhRiwU1WRL4XxJfZYipY
60 lines
1.7 KiB
JSON
60 lines
1.7 KiB
JSON
{
|
|
"name": "@dorfteich/api",
|
|
"version": "0.0.0",
|
|
"private": true,
|
|
"description": "Dorfteich REST API server",
|
|
"license": "MIT",
|
|
"scripts": {
|
|
"build": "prisma generate && nest build",
|
|
"start": "node dist/main.js",
|
|
"start:dev": "prisma generate && nest start --watch",
|
|
"typecheck": "tsc --noEmit",
|
|
"test": "vitest run --passWithNoTests",
|
|
"db:migrate:dev": "prisma migrate dev",
|
|
"db:seed": "tsx prisma/seed.ts",
|
|
"fixtures:regenerate": "tsx prisma/fixtures/regenerate.ts",
|
|
"search:reindex": "tsx src/search/reindex.cli.ts"
|
|
},
|
|
"dependencies": {
|
|
"@dorfteich/shared": "workspace:*",
|
|
"@nestjs/common": "^11.0.0",
|
|
"@nestjs/core": "^11.0.0",
|
|
"@nestjs/platform-express": "^11.0.0",
|
|
"@prisma/client": "^6.3.0",
|
|
"argon2": "^0.44.0",
|
|
"cookie-parser": "^1.4.7",
|
|
"fractional-indexing": "^4.0.0",
|
|
"i18next": "^26.3.4",
|
|
"multer": "^2.1.1",
|
|
"nestjs-pino": "^4.3.0",
|
|
"nodemailer": "^9.0.3",
|
|
"pino": "^9.6.0",
|
|
"pino-http": "^10.4.0",
|
|
"prisma": "^6.3.0",
|
|
"prosemirror-model": "^1.25.9",
|
|
"prosemirror-state": "^1.4.4",
|
|
"prosemirror-view": "^1.42.0",
|
|
"reflect-metadata": "^0.2.2",
|
|
"rxjs": "^7.8.0",
|
|
"y-prosemirror": "^1.3.7",
|
|
"y-protocols": "^1.0.7",
|
|
"yjs": "^13.6.31",
|
|
"zod": "^3.25.76"
|
|
},
|
|
"devDependencies": {
|
|
"@nestjs/cli": "^11.0.0",
|
|
"@nestjs/testing": "^11.0.0",
|
|
"@swc/core": "^1.10.0",
|
|
"@types/cookie-parser": "^1.4.10",
|
|
"@types/express": "^5.0.0",
|
|
"@types/multer": "^2.0.0",
|
|
"@types/nodemailer": "^8.0.1",
|
|
"@types/supertest": "^6.0.0",
|
|
"pino-pretty": "^13.0.0",
|
|
"supertest": "^7.0.0",
|
|
"tsx": "^4.19.0",
|
|
"unplugin-swc": "^1.5.0",
|
|
"vitest": "^3.0.0"
|
|
}
|
|
}
|