docs.tiesa.tech · en-GB

Architecture & structure

Detailed Mermaid and sequence live here so Search and Home stay light. Mobile-friendly law search tooling is rare — this site is the blueprint for Karolis and for serious readers (including potential competitors) who want the exact structure.

1. Host → project → repo map

  1. tiesa.tech / www.tiesa.tech → Vercel tiesa-radau → git Kuglys/radau (private) — apex home with three product doors (Dora, Radau, MCP). Middleware rewrites //apex.
  2. radau.tiesa.techtiesa-radau / Kuglys/radau · Production (main) — law Search over DORA + NIS2 (EN/LT), MiniSearch BM25 + optional 1-hop cite expand.
  3. beta.radau.tiesa.tech → same project/repo · Preview / branch beta/mcdm-topsis — Prod search plus Beta-only AHP–TOPSIS ranking lane (not merged into main).
  4. dora.tiesa.tech → Vercel tiesa-dora → git Kuglys/dora-graph-rag-prototypes (private) — frozen research PoC (Graph RAG vs Jev). Product routes unchanged.
  5. mcp.tiesa.tech → greeting only today. Historically still shimmed on tiesa-dora (/mcp-greeting); dedicated static project tiesa-mcp / Kuglys/tiesa-mcp is the target host.
  6. docs.tiesa.techtiesa-radau / Production — this page. Middleware rewrites / /docs. Preview on any deploy: ?docs=1.

All three GitHub repos are private. Profile: github.com/Kuglys.

2. Where things sit in the Radau repo

  1. src/app/ — routes: / (product home), /search, /apex (tiesa.tech), /docs (this site).
  2. src/middleware.ts — host rewrites for apex + docs; preview flags ?apex=1 / ?docs=1.
  3. src/lib/search.ts — MiniSearch index build + BM25 query (title boost, fuzzy, prefix).
  4. src/lib/graph-expand.ts — 1-hop cite expand (Prod walk-cap; Beta can expand-all then rank).
  5. src/lib/packs.ts, data.ts, types.ts — pack registry and loaders.
  6. src/lib/mcdm/Beta branch only (AHP–TOPSIS). Absent on main.
  7. public/data/packs/<packId>/ docs.json, graph.json, meta; registry at public/data/registry.json.
  8. scripts/prepare-packs.mjs (+ validate / cleaned-pack builders) — prep pipeline for corpus packs.
  9. src/components/ — Nav, QueryBar, PackPicker, GraphCanvas, Mermaid (docs), etc.

3. Pack layout

  1. Four packs today: dora-en, dora-lt, nis2-en, nis2-lt.
  2. Document IDs are packId:localId (pack-scoped; no cross-pack collisions).
  3. One MiniSearch index and one cite graph per pack (loaded when that pack is selected).
  4. Edge type used for expansion: cites (covers were dropped from the legend — packs only have cites).

4. Query pipeline sequence

  1. Select pack → load its docs + graph from public/data/packs/….
  2. Build / reuse MiniSearch → BM25 over title + text.
  3. Optional: 1-hop cite expand from BM25 seeds.
  4. Prod: walk-cap graph extras (≤ 8 new rows).
  5. Beta only: expand-all qualifying neighbours → AHP–TOPSIS top-k “greens” (query-aware features). Not on main.
  6. Render ranked passages + graph; passages ≠ legal advice.