Public data pipeline and static JSON API for openings.dev.
This repository owns the source catalog, GitHub ingestion pipeline, normalized opportunity snapshots, and static API files consumed by the front-end through raw GitHub URLs.
openings-dev/data-pipeline is the data publication layer. It is intentionally separate from the front-end:
- the data repo generates and stores publishable JSON snapshots;
- the front-end reads those snapshots remotely from
raw.githubusercontent.com; - the front-end must not copy, import, or mock these JSON files locally.
src/
app/
run-build.mjs
config/
env.mjs
modules/
build/ repository selection and country processing
catalog/ source repository catalog reader
github/ GitHub API client
observability/ structured CLI logger
opportunities/ issue normalization and enrichment
snapshot/ segmented snapshot and static API builders
storage/ JSON read/write helpers
validation/ repository validation checks
shared/
errors/
utils/
scripts/
build-opportunities.mjs
migrate-opportunities-snapshot.mjs
validate-repo.mjs
snapshots/
opportunities/ published static API and segmented snapshotsThe source catalog lives at:
src/modules/catalog/repositories.jsonEach catalog entry describes a public GitHub repository that posts opportunities as issues, including repository name, URL, country, country code, and region.
snapshots/opportunities/
index.json
api/
manifest.json
facet-index.json
job-ids.json
page-lookup.json
search-index.json
order/
recent.json
pages/
page-0001.json
jobs/
ab.json
countries/
br/
index.json
repositories/
backend-br-vagas.jsonPrimary files:
api/manifest.json: entry point for front-end list loading.api/order/recent.json: opportunity IDs in default recent order.api/page-lookup.json: maps opportunity IDs to page files.api/pages/*.json: paginated opportunity payloads.api/jobs/*.json: bucketed job detail records.api/job-ids.json: static job IDs used for front-end static params.index.json: global segmented snapshot index.countries/*/index.json: country-level snapshot indexes.countries/*/repositories/*.json: repository-level shards.
There is no monolithic snapshots/opportunities.json file.
The front-end consumes this repository through raw GitHub URLs:
https://raw.githubusercontent.com/openings-dev/data-pipeline/main/snapshots/opportunities
https://raw.githubusercontent.com/openings-dev/data-pipeline/mainExample:
const baseUrl =
"https://raw.githubusercontent.com/openings-dev/data-pipeline/main/snapshots/opportunities";
const manifest = await fetch(`${baseUrl}/api/manifest.json`).then((response) =>
response.json(),
);- Load environment and repository catalog.
- Select repositories using optional country and repository limits.
- Fetch public GitHub issues.
- Normalize opportunities and enrich metadata.
- Build segmented snapshots and static API files.
- Write only changed JSON files.
- Prune stale snapshot files.
GitHub Actions runs the update workflow on a schedule and commits changed files under snapshots/opportunities/**.
Discovery searches open GitHub Issues for repositories that publish jobs. It creates a review inbox; it never adds sources, rebuilds snapshots, commits, or pushes by itself.
Run one query while tuning the rules:
DISCOVERY_MAX_QUERIES=1 npm run discover:communitiesRun the full multilingual sweep:
npm run discover:communitiesThe local report is written to .artifacts/community-discovery/report.json and report.md. A partial report means one or more GitHub operations failed and must not be treated as complete.
After reviewing each Issue URL, create .artifacts/community-discovery/reviews.json:
{
"decisions": [
{
"repository": "owner/jobs",
"decision": "approved",
"reason": "At least one open GitHub Issue is a public job",
"country": "India",
"countryCode": "IN",
"region": "Asia",
"locale": "en-IN",
"scope": "national",
"evidenceUrl": "https://github.com/owner/jobs/issues/123",
"confirmEvidence": true
}
]
}Preview first, then apply explicitly:
npm run review:communities -- --report .artifacts/community-discovery/report.json --reviews .artifacts/community-discovery/reviews.json
npm run review:communities -- --report .artifacts/community-discovery/report.json --reviews .artifacts/community-discovery/reviews.json --applyApplying reviews only updates the source catalog and decision registry. Rebuilding and publishing the snapshot remain separate maintainer actions.
The weekly Discover Communities workflow runs the same review-first process, uploads both reports, and opens one review Issue when qualified candidates exist. It does not mutate the catalog. Partial runs retain their artifacts and fail the final workflow gate.
Requirements:
- Node.js
>=20.0.0 - npm
npm install
cp .env.example .env
npm run validateOPENINGS_GITHUB_TOKEN is optional but recommended to increase GitHub API quota.
Build a snapshot locally:
npm run build:snapshotOPENINGS_GITHUB_TOKEN: optional GitHub token.MAX_ISSUES_PER_REPOSITORY: default30, min1, max100.MAX_REPOSITORIES: default0(0means no cap), max50000.REQUEST_DELAY_MS: default120, min0, max10000.COUNTRY_CODES: optional comma-separated filter, for exampleBR,US,PT.DISCOVERY_OUTPUT_DIR: local discovery report directory.DISCOVERY_MAX_QUERIES: optional query cap;0runs every configured query.DISCOVERY_MAX_RESULTS_PER_QUERY: result cap per GitHub search query.DISCOVERY_REQUEST_DELAY_MS: delay between discovery API requests.
npm run validateValidation checks:
- required JSON files exist and parse;
- segmented snapshot structure is valid;
- monolithic legacy snapshot output is forbidden;
- snapshot JSON files stay under the configured line limit;
- source modules stay under the configured line limit;
- JavaScript modules parse successfully.
npm run migrate:snapshot exists only for maintainers converting an old local monolithic snapshot into the segmented layout. New work must keep the segmented static API structure.
Read CONTRIBUTING.md before opening a pull request.