Update ZXDB docs and notes

Document multi-select filters and shared explorer components.

Signed-off-by: codex@lucy.xalior.com
This commit is contained in:
2026-01-11 13:49:13 +00:00
parent 9807005305
commit 61cc729089
3 changed files with 14 additions and 0 deletions

View File

@@ -76,6 +76,7 @@ All endpoints are under `/api/zxdb` and validate inputs with Zod. Responses are
- `sort``title` or `id_desc`
- `scope``title`, `title_aliases`, or `title_aliases_origins`
- `facets` — boolean; if truthy, includes facet counts for genres/languages/machines
- `machinetypeId` accepts a commaseparated list (e.g. `27,26,8,9`) for multiselect filters
- Entry detail
- `GET /api/zxdb/entries/[id]`
@@ -90,6 +91,13 @@ All endpoints are under `/api/zxdb` and validate inputs with Zod. Responses are
- `GET /api/zxdb/languages` and `/api/zxdb/languages/[id]?page=1`
- `GET /api/zxdb/machinetypes` and `/api/zxdb/machinetypes/[id]?page=1`
- Search releases
- `GET /api/zxdb/releases/search`
- Query params:
- `q`, `page`, `pageSize`, `year`, `sort` — as used in the releases explorer
- `dLanguageId`, `filetypeId`, `schemetypeId`, `sourcetypeId`, `casetypeId`, `isDemo`
- `dMachinetypeId` accepts a commaseparated list for multiselect filters
Runtime: API routes declare `export const runtime = "nodejs"` to support `mysql2`.
## Implementation notes
@@ -103,6 +111,7 @@ Runtime: API routes declare `export const runtime = "nodejs"` to support `mysql2
}
```
- Repository queries parallelize independent calls with `Promise.all` for lower latency.
- When no machine filter is provided, the explorer prefers machine IDs `27,26,8,9` for sorting.
## Troubleshooting

View File

@@ -36,3 +36,7 @@ Deployment shortcuts
- pnpm deploy-test: push the current branch to test.explorer.specnext.dev
- pnpm deploy-prod: push the current branch to explorer.specnext.dev
- Ensure the corresponding Git remotes are configured locally before using these.
Shared explorer UI
- Reusable explorer layout/sidebar components live in `src/components/explorer/`.
- These power both `/zxdb` and `/registers` filtering UIs.