chore: deep-init

Signed-off-by: Dmytro Stanchiev <git@dmytros.dev>
This commit is contained in:
2026-04-21 20:46:29 -04:00
parent c58d614948
commit 86191e7a45
8 changed files with 154 additions and 867 deletions

View File

@@ -0,0 +1,23 @@
# packages/api-server
## Scope
- This package is the HTTP transport layer over `@marketplace-scrapers/core`.
- Route files in `src/routes/*.ts` should parse inputs, call core, and map responses/errors.
## Keep Thin
- Do not move scraping, parsing, selector, or cookie-loading logic into routes.
- If route code starts branching on marketplace behavior, push that behavior back into `packages/core`.
## Route Conventions
- Register new routes in `src/index.ts`.
- Follow existing input precedence where present: `query` header first, then `q` search param.
- Preserve existing response shape style: `Response.json(...)`, `400` for bad input/errors, `404` for empty result sets, `200` for success.
- Keep query parameter names aligned with the MCP server because MCP builds URLs against these endpoints.
## Verify
- `bun run --cwd packages/api-server build`
- `bun run ci`