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:
@@ -8,7 +8,7 @@ Next Explorer is a web application for exploring the Spectrum Next ecosystem. It
|
||||
|
||||
It has two main areas:
|
||||
- Registers: parsed from `data/nextreg.txt`, browsable with real-time filtering and deep links.
|
||||
- ZXDB Explorer: a deep, cross‑linked browser for ZXDB entries, labels, genres, languages, and machine types backed by MySQL using Drizzle ORM.
|
||||
- ZXDB Explorer: a deep, cross‑linked browser for ZXDB entries, releases, labels, magazines, genres, languages, and machine types backed by MySQL using Drizzle ORM.
|
||||
|
||||
## Project Structure
|
||||
|
||||
@@ -69,8 +69,10 @@ next-explorer/
|
||||
- `src/app/zxdb/`: ZXDB Explorer routes and client components.
|
||||
- `page.tsx` + `ZxdbExplorer.tsx`: Search + filters with server-rendered initial content and ISR.
|
||||
- `entries/[id]/page.tsx` + `EntryDetail.tsx`: Entry details (SSR initial data).
|
||||
- `releases/page.tsx` + `ReleasesExplorer.tsx`: Releases search + filters.
|
||||
- `labels/page.tsx`, `labels/[id]/page.tsx` + client: Labels search and detail.
|
||||
- `genres/`, `languages/`, `machinetypes/`: Category hubs and detail pages.
|
||||
- `magazines/`, `issues/`: Magazine and issue browsing.
|
||||
- `src/app/api/zxdb/`: Zod‑validated API routes (Node runtime) for search and category browsing.
|
||||
- `src/server/`:
|
||||
- `env.ts`: Zod env parsing/validation (t3.gg style). Validates `ZXDB_URL` (mysql://).
|
||||
@@ -133,7 +135,7 @@ Comment what the code does, not what the agent has done. The documentation's pur
|
||||
- Database connection via `mysql2` pool wrapped by Drizzle (`src/server/db.ts`).
|
||||
- Env validation via Zod (`src/env.ts`) ensures `ZXDB_URL` is a valid `mysql://` URL.
|
||||
- Minimal Drizzle schema models used for fast search and lookups (`src/server/schema/zxdb.ts`).
|
||||
- Repository consolidates SQL with typed results (`src/server/repo/zxdb.ts`).
|
||||
- Repository consolidates SQL with typed results (`src/server/repo/zxdb.ts`). Gracefully handles missing tables (e.g. `releases`) by checking `information_schema.tables`.
|
||||
- API routes under `/api/zxdb/*` validate inputs with Zod and run on Node runtime.
|
||||
- UI under `/zxdb` is deeply cross‑linked and server‑renders initial data for performance. Links use Next `Link` to enable prefetching.
|
||||
- Helper SQL `ZXDB/scripts/ZXDB_help_search.sql` must be run to create `search_by_*` tables for efficient searches.
|
||||
|
||||
Reference in New Issue
Block a user