Spaces:
Running
Running
Sync from felladrin/MiniSearch@5f0835f (part 2)
Browse filesFiles changed (6)
14 unmodified lines1516171819202114 unmodified lines- Minimal visual clutter with Mantine v9 components- Clear hierarchy and information architecture- Keyboard-first navigation with comprehensive shortcuts- Semantic HTML and ARIA labels for WCAG 2.1 AA compliance- Responsive design for desktop and mobile- Dark mode by default (via Mantine's `MantineProvider`)14 unmodified lines1516171819202114 unmodified lines- Minimal visual clutter with Mantine v9 components- Clear hierarchy and information architecture- Keyboard-first navigation with comprehensive shortcuts- Semantic HTML and ARIA labels- Responsive design for desktop and mobile- Dark mode by default (via Mantine's `MantineProvider`)
36 unmodified lines3738394041424336 unmodified linesA secondary search stage that takes initial results from SearXNG and re-orders them based on relevance to the query using a multilingual cross-encoder model (`mmarco-mMiniLMv2-L12-H384-v1`) running in-process via ONNX Runtime.- **Implementation**: Loads the model's ONNX export with `onnxruntime-node`; no child process- **Health Check**: Polls `/health` endpoint via `getRerankerStatus`- **Scoring**: Results filtered using standard deviation thresholds (`kStandardDeviationFactor = 0.3`)- **Fallback**: If reranker is unhealthy, returns unranked SearXNG results36 unmodified lines3738394041424336 unmodified linesA secondary search stage that takes initial results from SearXNG and re-orders them based on relevance to the query using a multilingual cross-encoder model (`mmarco-mMiniLMv2-L12-H384-v1`) running in-process via ONNX Runtime.- **Implementation**: Loads the model's ONNX export with `onnxruntime-node`; no child process- **Health Check**: `getRerankerStatus` reads the in-process readiness flag; there is no port or health endpoint to poll- **Scoring**: Results filtered using standard deviation thresholds (`kStandardDeviationFactor = 0.3`)- **Fallback**: If reranker is unhealthy, returns unranked SearXNG results
514 unmodified lines515516517518519520521522523514 unmodified lines### Server-Side Bootstrap (vite.config.ts)1. Loads environment variables via `dotenv.config`2. Regenerates the search token used for CSRF protection, on build only3. Injects build metadata as compile-time replacements (`VITE_BUILD_DATE_TIME`, `VITE_COMMIT_SHORT_HASH`, the last one taken from `.source-commit` when the deploy workflow wrote it)4. Registers all middleware hooks (see Server Hook System above)### Client-Side Bootstrap (client/index.tsx)514 unmodified lines515516517518519520521522523524514 unmodified lines### Server-Side Bootstrap (vite.config.ts)1. Loads environment variables via `dotenv.config`2. Injects build metadata as compile-time replacements (`VITE_BUILD_DATE_TIME`, `VITE_COMMIT_SHORT_HASH`, the last one taken from `.source-commit` when the deploy workflow wrote it)3. Registers all middleware hooks (see Server Hook System above)The CSRF search token is not part of this list. `server/searchToken.ts` draws it on first use in each process and holds it for that process's life, so nothing is written at build time: a token baked into the image would be one every container of that build shares. The whole lifecycle is in the search token lifecycle section of `docs/security.md`.### Client-Side Bootstrap (client/index.tsx)
83 unmodified lines8485868788899083 unmodified lines- **Internal API**: Configure OpenAI-compatible endpoint- **AI Horde**: Pre-configured distributed computing5. The app will download ~300MB-1GB model files on first use (browser mode)6. Subsequent loads are instant (cached in IndexedDB)### Optional: Restrict Access83 unmodified lines8485868788899083 unmodified lines- **Internal API**: Configure OpenAI-compatible endpoint- **AI Horde**: Pre-configured distributed computing5. The app will download ~300MB-1GB model files on first use (browser mode)6. Subsequent loads are instant (cached in the browser's Origin Private File System)### Optional: Restrict Access
79 unmodified lines8081828384858679 unmodified lines- Input validation on all endpoints- Sanitization of user-generated content- Search token generation: a per-process token generated on first use and recorded in a temp file (`server/searchToken.ts`), using 32 bytes from the `node:crypto` CSPRNG, with the file restricted to its owner (`0600`)- HTTPS enforcement in production- Regular dependency updates via Renovate- **Argon2 Hashing**: Access keys hashed using argon2id for secure validation (not storage encryption)- **Cross-Origin Isolation**: COOP/COEP headers for SharedArrayBuffer security79 unmodified lines8081828384858679 unmodified lines- Input validation on all endpoints- Sanitization of user-generated content- Search token generation: a per-process token generated on first use and recorded in a temp file (`server/searchToken.ts`), using 32 bytes from the `node:crypto` CSPRNG, with the file restricted to its owner (`0600`)- Transport security sits in front of the container: the app serves plain HTTP, so TLS and any `Strict-Transport-Security` header belong to the reverse proxy or the hosting platform- Regular dependency updates via Renovate- **Argon2 Hashing**: Access keys hashed using argon2id for secure validation (not storage encryption)- **Cross-Origin Isolation**: COOP/COEP headers for SharedArrayBuffer security
2094 unmodified lines2095209620972098209921002101210221031 unmodified line2105210621072108210921102111211221132114211521162094 unmodified lines"license": "MIT"},"node_modules/@tabler/icons": {"version": "3.53.0","resolved": "https://registry.npmjs.org/@tabler/icons/-/icons-3.53.0.tgz","integrity": "sha512-7V77PESErZob7+Ie4ibDs9tjRoMmZyjr3RpxRK3KLJejwggzxrkhVunbQ7xGYewjwdUyPc6dHpMvvft0prkkzQ==","license": "MIT","funding": {"type": "github",1 unmodified line}},"node_modules/@tabler/icons-react": {"version": "3.53.0","resolved": "https://registry.npmjs.org/@tabler/icons-react/-/icons-react-3.53.0.tgz","integrity": "sha512-uaj3Pne8ULNIOhYYHCX1kK6q1AVzxB2qCoyRnb67Q36YTA+1ctSmrrzZS/VptG/OQWOsXYz4prA7lQMTG2llcw==","license": "MIT","dependencies": {"@tabler/icons": "3.53.0"},"funding": {"type": "github",2094 unmodified lines2095209620972098209921002101210221031 unmodified line2105210621072108210921102111211221132114211521162094 unmodified lines"license": "MIT"},"node_modules/@tabler/icons": {"version": "3.54.0","resolved": "https://registry.npmjs.org/@tabler/icons/-/icons-3.54.0.tgz","integrity": "sha512-Qak+rt5Q89k2fa5yQOE8IulUDoUJneuzEHMJ3NOQf5mvSnmlCY5xARiCi60ba4Doxqv+KbYOhzWtCauehEitBA==","license": "MIT","funding": {"type": "github",1 unmodified line}},"node_modules/@tabler/icons-react": {"version": "3.54.0","resolved": "https://registry.npmjs.org/@tabler/icons-react/-/icons-react-3.54.0.tgz","integrity": "sha512-KK6d4X2kBMma9IQ3MpVM6tTw/va3Zq0m1sG4ZvjnlhBNY8oQ9Slx8DmYf9AQbrG2B4f27LlR4tLM1T0sKopeHA==","license": "MIT","dependencies": {"@tabler/icons": "3.54.0"},"funding": {"type": "github",
docs/design.md+1-1
docs/glossary.md+1-1
docs/overview.md+4-3
docs/quick-start.md+1-1
docs/security.md+1-1
package-lock.json+7-7