Docs: refresh README and AGENTS with latest ZXDB features

Update documentation to reflect the expanded ZXDB Explorer coverage, including releases, magazines, and issues. Document new API endpoints and the graceful schema fallback mechanism in the repository.

Changes:
- README.md: Add /zxdb/releases, /zxdb/magazines, and /zxdb/issues/[id] routes; document /api/zxdb/releases/search and lookup endpoints; add note on information_schema table checks.
- AGENTS.md: Update project overview and structure to include releases, magazines, and issues; note schema capability checks in the repository description.

Signed-off-by: Junie@lucy.xalior.com
This commit is contained in:
2025-12-18 19:43:16 +00:00
parent a1a04a89cf
commit 616d775303
2 changed files with 12 additions and 3 deletions

View File

@@ -28,12 +28,16 @@ Project scripts (package.json)
Routes
- `/` — Home
- `/registers` — Register Explorer
- `/zxdb` — ZXDB Explorer (search + filters)
- `/zxdb` — ZXDB Explorer (hub)
- `/zxdb/entries` — Entries search + filters
- `/zxdb/entries/[id]` — Entry detail
- `/zxdb/releases` — Releases search + filters
- `/zxdb/labels` and `/zxdb/labels/[id]` — Labels search and detail
- `/zxdb/genres` and `/zxdb/genres/[id]` — Genres list and entries
- `/zxdb/languages` and `/zxdb/languages/[id]` — Languages list and entries
- `/zxdb/machinetypes` and `/zxdb/machinetypes/[id]` — Machine types list and entries
- `/zxdb/magazines` and `/zxdb/magazines/[id]` — Magazines list and issues
- `/zxdb/issues/[id]` — Issue detail (contents and references)
ZXDB setup (database, env, and helper tables)
The Registers section works without any database. The ZXDB Explorer requires a MySQL ZXDB database and one environment variable.
@@ -58,16 +62,19 @@ The Registers section works without any database. The ZXDB Explorer requires a M
API (selected endpoints)
- `GET /api/zxdb/search?q=...&page=1&pageSize=20&genreId=...&languageId=...&machinetypeId=...&sort=title&facets=1`
- `GET /api/zxdb/entries/[id]`
- `GET /api/zxdb/releases/search?q=...&year=...&languageId=...&machinetypeId=...&sort=...`
- `GET /api/zxdb/labels/search?q=...`
- `GET /api/zxdb/labels/[id]?page=1&pageSize=20`
- `GET /api/zxdb/genres` and `/api/zxdb/genres/[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/{availabletypes,casetypes,currencies,filetypes,roletypes,schemetypes,sourcetypes}`
Implementation notes
- Next.js 15 dynamic params: pages and API routes that consume `params` must await it, e.g. `export default async function Page({ params }: { params: Promise<{ id: string }> }) { const { id } = await params; }`
- 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 serverrender initial content and use ISR (`revalidate = 3600`) for fast timetocontent; 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.
Further reading
- ZXDB details and API usage: `docs/ZXDB.md`