feat(api): publications endpoints backed by the publication DB#2516
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Replaces the placeholder Google-Sheet source for publications with the
publication/publication_technique/arbimon_techniquetables (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_KEYleft as an optional env (now unused).GET /publications(new) — paginated, filterable list:searchover title + abstract + authorstechnique[](AND semantics),tier[],yearFrom/yearTo,rfcxAuthoredsort= year | citations | title;limit/offsetis_visible/review_status→ Tier Cpendingstays hiddenGET /publications/techniques(new) — the technique taxonomy lookup.Implementation
QueryTypes.SELECT, replacements); BLL usesgetSequelize(). Mirrors the richness/species DAO pattern.commoncontractapi-bio/publications(types + client + route consts).Validation
tsc --noEmit -p tsconfig.build.json: 0 errors (api + common). eslint clean.Follow-up (separate)
OpenSearch
publicationsindex + indexer (sync-all/incremental) for full-text + technique-faceted search; arbimon.org UI.