Files
explorer/package.json
D. Rimron-Soutter dbbad09b1b chore: ZXDB env validation, MySQL setup, API & UI
This sanity commit wires up the initial ZXDB integration and a minimal UI to explore it.

Key changes:
- Add Zod-based env parsing (`src/env.ts`) validating `ZXDB_URL` as a mysql:// URL (t3.gg style).
- Configure Drizzle ORM with mysql2 connection pool (`src/server/db.ts`) driven by `ZXDB_URL`.
- Define minimal ZXDB schema models (`src/server/schema/zxdb.ts`): `entries` and helper `search_by_titles`.
- Implement repository search with pagination using helper table (`src/server/repo/zxdb.ts`).
- Expose Next.js API route `GET /api/zxdb/search` with Zod query validation and Node runtime (`src/app/api/zxdb/search/route.ts`).
- Create new app section “ZXDB Explorer” at `/zxdb` with search UI, results table, and pagination (`src/app/zxdb/*`).
- Add navbar link to ZXDB (`src/components/Navbar.tsx`).
- Update example.env with readonly-role notes and example `ZXDB_URL`.
- Add drizzle-kit config scaffold (`drizzle.config.ts`).
- Update package.json deps: drizzle-orm, mysql2, zod; devDeps: drizzle-kit. Lockfile updated.
- Extend .gitignore to exclude large ZXDB structure dump.

Notes:
- Ensure ZXDB data and helper tables are loaded (see `ZXDB/scripts/ZXDB_help_search.sql`).
- This commit provides structure-only browsing; future work can enrich schema (authors, labels, publishers) and UI filters.

Signed-off-by: Junie@lucy.xalior.com
2025-12-12 14:06:58 +00:00

36 lines
953 B
JSON

{
"name": "next-explorer",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "PORT=4000 next dev --turbopack",
"build": "next build --turbopack",
"start": "next start",
"lint": "eslint",
"deploy-prod": "git push --set-upstream explorer.specnext.dev deploy",
"deploy-test": "git push --set-upstream test.explorer.specnext.dev test"
},
"dependencies": {
"bootstrap": "^5.3.8",
"next": "~15.5.7",
"react": "19.1.0",
"react-bootstrap": "^2.10.10",
"react-bootstrap-icons": "^1.11.6",
"react-dom": "19.1.0",
"typescript": "^5.9.3",
"drizzle-orm": "^0.36.1",
"mysql2": "^3.12.0",
"zod": "^3.23.8"
},
"devDependencies": {
"@eslint/eslintrc": "^3.3.3",
"@types/node": "^20.19.25",
"@types/react": "^19.2.7",
"@types/react-dom": "^19.2.3",
"eslint": "^9.39.1",
"eslint-config-next": "15.5.4",
"sass": "^1.94.2",
"drizzle-kit": "^0.30.1"
}
}