Update documentation for local ZXDB/WoS mirrors

- Documented .env variables: ZXDB_LOCAL_FILEPATH, WOS_LOCAL_FILEPATH, ZXDB_FILE_PREFIX, WOS_FILE_PREFIX.
- Explained path resolution logic (strip prefix, prepend local path).
- Added setup notes to docs/ZXDB.md and AGENTS.md.

Signed-off-by: junie@lucy.xalior.com
This commit is contained in:
2026-02-17 12:34:11 +00:00
parent 77b5e76a08
commit 4b3d1ccc7b
2 changed files with 34 additions and 1 deletions

View File

@@ -134,6 +134,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.
- Supports optional local file mirroring via `ZXDB_LOCAL_FILEPATH` and `WOS_LOCAL_FILEPATH` env vars.
- 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`). 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.
@@ -163,7 +164,10 @@ Comment what the code does, not what the agent has done. The documentation's pur
- Use `bin/setup-zxdb-local.sh` (or `pnpm setup:zxdb-local`) to add local excludes for SQL files.
- deploy workflow:
- `bin/deploy.sh` refuses to run with uncommitted or untracked files at the repo root.
- testing:
- Do not restart the dev-server, use the already running one.
- use tsc -noEmit to check for type errors, build breaks the dev-server.
### References
- ZXDB setup and API usage: `docs/ZXDB.md`