AcadeDoc/apps/server/src/database
Corentin 2fc310a2f2 feat(acadenice): add bidirectional backlinks + wikilinks for R3.2
- Migration: acadenice_backlink table (source/target/link_type/excerpt/workspace)
  with 3 indexes and UNIQUE(source,target,type) constraint. Up+down.
- Backend module AcadeniceBacklinksModule:
  BacklinkParserService: walks Tiptap JSON, extracts wikilinks/mentions/databaseView.
  BacklinkIndexerService: idempotent delete-then-insert per page save.
  BacklinkService: permission-aware query (space_members / public visibility).
  BacklinksController: GET /api/acadenice/pages/:pageId/backlinks (JWT auth).
  PageContentUpdatedListener: OnEvent handler for collab saves -> async reindex.
  Tests: 16 Vitest specs (parser/indexer/service/controller).
- PersistenceExtension patch: emits ACADENICE_PAGE_CONTENT_UPDATED_EVENT after
  each collab onStoreDocument (fire-and-forget, no impact on save path).
- CoreModule patch: imports AcadeniceBacklinksModule.
- Frontend WikilinkExtension: Tiptap inline atom node, [[Title]] / [[Title|alias]],
  Suggestion popup (reuses mention pattern + floating-ui), ReactNodeView with
  broken-link state, insertWikilink command.
  Tests: 9 Vitest specs (schema/attrs/commands/HTML parse+render).
- LinkedReferencesPanel: React Query useBacklinks(pageId, staleTime=30s),
  accordion grouped by link_type, excerpt preview, navigate to source page.
  Tests: 7 Vitest specs (loading/error/empty/render/navigate/groups).
- extensions.ts patch: + WikilinkExtension in mainExtensions[].
- full-editor.tsx patch: + LinkedReferencesPanel below editor (Divider + panel).
- i18n: 11 keys added in en-US and fr-FR (backlinks.* + wikilink.*).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 00:51:02 +02:00
..
helpers feat(EE): AI vector search (#1691) 2025-12-01 11:50:25 +00:00
listeners feat(EE): AI vector search (#1691) 2025-12-01 11:50:25 +00:00
migrations feat(acadenice): add bidirectional backlinks + wikilinks for R3.2 2026-05-08 00:51:02 +02:00
pagination feat(ee): page-level access/permissions (#1971) 2026-02-26 19:49:10 +00:00
repos feat(ee): SCIM (#1347) 2026-05-01 14:53:30 +01:00
services fixes 2024-06-07 17:29:34 +01:00
types feat(ee): SCIM (#1347) 2026-05-01 14:53:30 +01:00
database.module.ts feat: favorites (#2103) 2026-04-12 22:06:25 +01:00
migrate.ts refactor(db): migrate from node-postgres to postgres.js (#1846) 2026-01-21 18:12:16 +00:00
utils.ts updates and fixes 2024-05-18 03:19:42 +01:00