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:
@@ -82,6 +82,7 @@ Implementation notes
|
|||||||
- ZXDB integration uses Drizzle ORM over `mysql2` with a singleton pool at `src/server/db.ts`; API routes declare `export const runtime = "nodejs"`.
|
- ZXDB integration uses Drizzle ORM over `mysql2` with a singleton pool at `src/server/db.ts`; API routes declare `export const runtime = "nodejs"`.
|
||||||
- Entry and detail pages server‑render initial content and use ISR (`revalidate = 3600`) for fast time‑to‑content; index pages avoid a blocking first client fetch.
|
- Entry and detail pages server‑render initial content and use ISR (`revalidate = 3600`) for fast time‑to‑content; index pages avoid a blocking first client fetch.
|
||||||
- Database Schema: Repository queries include graceful fallback checks (via `information_schema.tables`) to remain functional even if optional tables (like `releases` or `downloads`) are missing from the connected MySQL instance.
|
- Database Schema: Repository queries include graceful fallback checks (via `information_schema.tables`) to remain functional even if optional tables (like `releases` or `downloads`) are missing from the connected MySQL instance.
|
||||||
|
- Shared explorer UI components live under `src/components/explorer/` and power both `/zxdb` and `/registers` sidebars.
|
||||||
|
|
||||||
Further reading
|
Further reading
|
||||||
- ZXDB details and API usage: `docs/ZXDB.md`
|
- ZXDB details and API usage: `docs/ZXDB.md`
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ All endpoints are under `/api/zxdb` and validate inputs with Zod. Responses are
|
|||||||
- `sort` — `title` or `id_desc`
|
- `sort` — `title` or `id_desc`
|
||||||
- `scope` — `title`, `title_aliases`, or `title_aliases_origins`
|
- `scope` — `title`, `title_aliases`, or `title_aliases_origins`
|
||||||
- `facets` — boolean; if truthy, includes facet counts for genres/languages/machines
|
- `facets` — boolean; if truthy, includes facet counts for genres/languages/machines
|
||||||
|
- `machinetypeId` accepts a comma‑separated list (e.g. `27,26,8,9`) for multi‑select filters
|
||||||
|
|
||||||
- Entry detail
|
- Entry detail
|
||||||
- `GET /api/zxdb/entries/[id]`
|
- `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/languages` and `/api/zxdb/languages/[id]?page=1`
|
||||||
- `GET /api/zxdb/machinetypes` and `/api/zxdb/machinetypes/[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 comma‑separated list for multi‑select filters
|
||||||
|
|
||||||
Runtime: API routes declare `export const runtime = "nodejs"` to support `mysql2`.
|
Runtime: API routes declare `export const runtime = "nodejs"` to support `mysql2`.
|
||||||
|
|
||||||
## Implementation notes
|
## 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.
|
- 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
|
## Troubleshooting
|
||||||
|
|
||||||
|
|||||||
@@ -36,3 +36,7 @@ Deployment shortcuts
|
|||||||
- pnpm deploy-test: push the current branch to test.explorer.specnext.dev
|
- pnpm deploy-test: push the current branch to test.explorer.specnext.dev
|
||||||
- pnpm deploy-prod: push the current branch to 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.
|
- 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.
|
||||||
|
|||||||
Reference in New Issue
Block a user