Skip to content

feat(api): publications endpoints backed by the publication DB#2516

Merged
topherwhite merged 1 commit into
masterfrom
agent/ms4-publications-api-20260629
Jun 29, 2026
Merged

feat(api): publications endpoints backed by the publication DB#2516
topherwhite merged 1 commit into
masterfrom
agent/ms4-publications-api-20260629

Conversation

@topherwhite

Copy link
Copy Markdown
Member

What

Replaces the placeholder Google-Sheet source for publications with the publication / publication_technique / arbimon_technique tables (insights DB, shipped in 260629-01/02), and adds a richer faceted browse API for the planned arbimon.org publications page. No UI in this PR.

Endpoints

  • GET /landing/publications (existing) — BLL rewritten to read the RFCx-curated subset (in_rfcx_curated_list) from the DB instead of the hardcoded Google Sheet. Same response contract (Publication[]) so the current frontend + its int-test are unchanged. GOOGLE_SPREADSHEET_API_KEY left as an optional env (now unused).
  • GET /publications (new) — paginated, filterable list:
    • search over title + abstract + authors
    • technique[] (AND semantics), tier[], yearFrom/yearTo, rfcxAuthored
    • sort = year | citations | title; limit/offset
    • returns items + per-technique facet counts over the filtered set
    • respects is_visible/review_status → Tier C pending stays hidden
  • GET /publications/techniques (new) — the technique taxonomy lookup.

Implementation

  • Raw parameterized SQL via Sequelize (QueryTypes.SELECT, replacements); BLL uses getSequelize(). Mirrors the richness/species DAO pattern.
  • New common contract api-bio/publications (types + client + route consts).
  • Public (no-auth) routes, edge-cached 1h.

Validation

  • New int-tests for both routes (mocked BLL); existing landing-publications test still green.
  • tsc --noEmit -p tsconfig.build.json: 0 errors (api + common). eslint clean.

Follow-up (separate)

OpenSearch publications index + indexer (sync-all/incremental) for full-text + technique-faceted search; arbimon.org UI.

Replaces the placeholder Google-Sheet source for publications with the
`publication`/`publication_technique`/`arbimon_technique` tables (insights DB,
shipped in migrations 260629-01/02), and adds a richer faceted browse API.

- landing/publications: rewrite the BLL to read the RFCx-curated subset
  (in_rfcx_curated_list) from the DB instead of the hardcoded Google Sheet.
  Same response contract (Publication[]) — existing frontend + test unchanged.
  GOOGLE_SPREADSHEET_API_KEY left as an optional env (now unused).
- NEW GET /publications: paginated, filterable list (search over
  title/abstract/authors, technique[] with AND semantics, tier[], year range,
  rfcxAuthored, sort by year|citations|title) + per-technique facet counts.
  Respects is_visible/review_status (Tier C pending stays hidden).
- NEW GET /publications/techniques: the technique taxonomy lookup.
- common: new api-bio/publications contract (types + client + route consts).
- Raw parameterized SQL via sequelize (QueryTypes.SELECT); BLL uses getSequelize.
- Int tests for both new routes; existing landing test still green.
  tsc(build) 0 errors, eslint clean.

No UI in this PR. Public (no-auth) routes, edge-cached 1h.
@topherwhite topherwhite merged commit 80b5e76 into master Jun 29, 2026
2 checks passed
@topherwhite topherwhite deleted the agent/ms4-publications-api-20260629 branch June 29, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant