diff --git a/README.md b/README.md index 02175ee..ed08e34 100644 --- a/README.md +++ b/README.md @@ -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"`. - 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. +- Shared explorer UI components live under `src/components/explorer/` and power both `/zxdb` and `/registers` sidebars. Further reading - ZXDB details and API usage: `docs/ZXDB.md` diff --git a/docs/ZXDB.md b/docs/ZXDB.md index 88e4538..c8bf1ab 100644 --- a/docs/ZXDB.md +++ b/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` - `scope` — `title`, `title_aliases`, or `title_aliases_origins` - `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 - `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 comma‑separated list for multi‑select 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 diff --git a/docs/getting-started.md b/docs/getting-started.md index c4abea1..ccda13d 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -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.